static struct rk2818_gpio_bank rk2818_gpioBank[] = {
{
- .id = AT2818_ID_PIOA,
+ .id = RK2818_ID_PIOA,
.offset = RK2818_GPIO0_BASE,
.clock = NULL,
},
{
- .id = AT2818_ID_PIOB,
+ .id = RK2818_ID_PIOB,
.offset = RK2818_GPIO0_BASE,
.clock = NULL,
},
{
- .id = AT2818_ID_PIOC,
+ .id = RK2818_ID_PIOC,
.offset = RK2818_GPIO0_BASE,
.clock = NULL,
},
{
- .id = AT2818_ID_PIOD,
+ .id = RK2818_ID_PIOD,
.offset = RK2818_GPIO0_BASE,
.clock = NULL,
},
{
- .id = AT2818_ID_PIOE,
+ .id = RK2818_ID_PIOE,
.offset = RK2818_GPIO1_BASE,
.clock = NULL,
},
{
- .id = AT2818_ID_PIOF,
+ .id = RK2818_ID_PIOF,
.offset = RK2818_GPIO1_BASE,
.clock = NULL,
},
{
- .id = AT2818_ID_PIOG,
+ .id = RK2818_ID_PIOG,
.offset = RK2818_GPIO1_BASE,
.clock = NULL,
},
{
- .id = AT2818_ID_PIOH,
+ .id = RK2818_ID_PIOH,
.offset = RK2818_GPIO1_BASE,
.clock = NULL,
}
}
mask1 = 0x03<<(2*offset+temp);
mask2 = GPIOPullUpDown <<(2*offset+temp);
- if(rk2818_gpio->bank->id==AT2818_ID_PIOA || rk2818_gpio->bank->id==AT2818_ID_PIOB)
+ if(rk2818_gpio->bank->id==RK2818_ID_PIOA || rk2818_gpio->bank->id==RK2818_ID_PIOB)
{
rk2818_gpio_bitOp(pAPBRegBase,GPIO0_AB_PU_CON,mask1,0);
rk2818_gpio_bitOp(pAPBRegBase,GPIO0_AB_PU_CON,mask2,1);
}
- else if(rk2818_gpio->bank->id==AT2818_ID_PIOC || rk2818_gpio->bank->id==AT2818_ID_PIOD)
+ else if(rk2818_gpio->bank->id==RK2818_ID_PIOC || rk2818_gpio->bank->id==RK2818_ID_PIOD)
{
rk2818_gpio_bitOp(pAPBRegBase,GPIO0_CD_PU_CON,mask1,0);
rk2818_gpio_bitOp(pAPBRegBase,GPIO0_CD_PU_CON,mask2,1);
}
- else if(rk2818_gpio->bank->id==AT2818_ID_PIOE || rk2818_gpio->bank->id==AT2818_ID_PIOF)
+ else if(rk2818_gpio->bank->id==RK2818_ID_PIOE || rk2818_gpio->bank->id==RK2818_ID_PIOF)
{
rk2818_gpio_bitOp(pAPBRegBase,GPIO1_AB_PU_CON,mask1,0);
rk2818_gpio_bitOp(pAPBRegBase,GPIO1_AB_PU_CON,mask2,1);
}
- else if(rk2818_gpio->bank->id==AT2818_ID_PIOG|| rk2818_gpio->bank->id==AT2818_ID_PIOH)
+ else if(rk2818_gpio->bank->id==RK2818_ID_PIOG|| rk2818_gpio->bank->id==RK2818_ID_PIOH)
{
rk2818_gpio_bitOp(pAPBRegBase,GPIO1_CD_PU_CON,mask1,0);
rk2818_gpio_bitOp(pAPBRegBase,GPIO1_CD_PU_CON,mask2,1);
set_irq_handler(pin+j, handle_simple_irq);
set_irq_flags(pin+j, IRQF_VALID);
}
- if(this->bank->id == AT2818_ID_PIOA)
+ if(this->bank->id == RK2818_ID_PIOA)
{
irq = IRQ_NR_GPIO0;
}
- else if(this->bank->id == AT2818_ID_PIOE)
+ else if(this->bank->id == RK2818_ID_PIOE)
{
irq = IRQ_NR_GPIO1;
}
{
return -1;
}
- if(rk2818_gpio->bank->id==AT2818_ID_PIOA)
+ if(rk2818_gpio->bank->id==RK2818_ID_PIOA)
{
return offset + NR_AIC_IRQS;
}
- else if(rk2818_gpio->bank->id==AT2818_ID_PIOE)
+ else if(rk2818_gpio->bank->id==RK2818_ID_PIOE)
{
return offset + NR_AIC_IRQS + NUM_GROUP;
}
#define GPIO_EXT_PORTD 0x5c
#define GPIO_LS_SYNC 0x60
-#define AT2818_ID_PIOA 0
-#define AT2818_ID_PIOB 1
-#define AT2818_ID_PIOC 2
-#define AT2818_ID_PIOD 3
-#define AT2818_ID_PIOE 4
-#define AT2818_ID_PIOF 5
-#define AT2818_ID_PIOG 6
-#define AT2818_ID_PIOH 7
+#define RK2818_ID_PIOA 0
+#define RK2818_ID_PIOB 1
+#define RK2818_ID_PIOC 2
+#define RK2818_ID_PIOD 3
+#define RK2818_ID_PIOE 4
+#define RK2818_ID_PIOF 5
+#define RK2818_ID_PIOG 6
+#define RK2818_ID_PIOH 7
/* these pin numbers double as IRQ numbers, like RK2818xxx_ID_* values */
#define RK2818_PIN_PA0 (PIN_BASE + 0*NUM_GROUP + 0)