All pastes #334645 Raw Edit

ARM Assembler

public text v1 · immutable
#334645 ·published 2007-01-31 19:43 UTC
rendered paste body
void *asic5 = __REG(PXA_CS1_PHYS);void *asic5_b = __REG(PXA_CS1_PHYS + 0x02000000); /* part of asic5? */void *cpld = __REG(PXA_CS3_PHYS);#if 0asic5_phone_on() {        __raw_writew((__raw_readw(asic5+0x28) | 0x3), asic5+0x28);        __raw_writew((__raw_readw(asic5+0x04) | 0x1), asic5+0x04);        __raw_writew((__raw_readw(asic5+0x28) | 0xc), asic5+0x28);        __raw_writew((__raw_readw(asic5+0x04) & 0xfffd), asic5+0x04);        __raw_writew((__raw_readw(asic5+0x28) | 0x30), asic5+0x28);        __raw_writew((__raw_readw(asic5+0x04) | 0x4), asic5+0x04);        __raw_writew((__raw_readw(asic5+0x28) | 0xc0), asic5+0x28);        __raw_writew((__raw_readw(asic5+0x04) & 0xfff7), asic5+0x04);}set_egpio_asic5(int bits, int val) {	static int egpio;	if (val)		egpio |= bits;	else		egpio &= ~bits;	__raw_writew(egpio & 0xffff, asic5_b+0x0);	__raw_writew(egpio>>16, asic5_b+0x2);}#endifset_egpio_cpld(int bits) {	static int egpio;	if (val)		egpio |= bits;	else		egpio &= ~bits;	__raw_writew(egpio & 0x7ff, cpld+0x0);	__raw_writew(((egpio<<10)>>21), cpld+0x2);}static void alpine_gsm_reset(void){        printk ("GSM Reset\n");	GPSR(36) = GPIO_bit(36);	pxa_set_gpio_mode(36 | GPIO_OUT);	/* those should be done by pxa-serial already */	pxa_set_gpio_mode(GPIO42_BTRXD_MD);	pxa_set_gpio_mode(GPIO44_BTCTS_MD);	pxa_set_cken(CKEN7_BTUART);	pxa_set_gpio_mode(10 | GPIO_IN);	pxa_set_gpio_mode(108 | GPIO_IN);//	set_egpio_asic5(1,0);//	set_egpio_asic5(1<<11,0);	GPCR(87) = GPIO_bit(87);	GPCR(74) = GPIO_bit(74);	set_egpio_cpld(1<<15,1);//	set_egpio_asic5(1<<22,1);	msleep(150);	GPSR(74) = GPIO_bit(74);	msleep(150);	GPCR(74) = GPIO_bit(74);//	set_egpio_asic5(1<<11,1);	GPCR(86) = GPIO_bit(86);	GPSR(86) = GPIO_bit(86);//	set_egpio_asic5(1<<9,1);	msleep(150);	GPCR(86) = GPIO_bit(86);	msleep(10);	pxa_set_gpio_mode(GPIO43_BTTXD_MD);	pxa_set_gpio_mode(GPIO45_BTRTS_MD);	pxa_set_gpio_mode(36 | GPIO_IN);//	asic5_phone_on();}