3 #include <asm/arch/sprd_reg.h>
4 #include <asm/arch/gpio_reg_v0.h>
5 #include <asm/arch/gpio_phy.h>
7 const static struct gpio_section s_gpio_section_table[] = {
8 { (SPRD_ANA_GPIO_PHYS + 0*0x80), 0x8, GPIO_SECTION_GPI },/*GPIO0-7*/
9 { (SPRD_GPIO_PHYS + 0*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO10-15*/
10 { (SPRD_GPIO_PHYS + 1*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO16-31*/
11 { (SPRD_GPIO_PHYS + 2*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO32-47*/
12 { (SPRD_GPIO_PHYS + 3*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO48-63*/
13 { (SPRD_GPIO_PHYS + 4*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO64-79*/
14 { (SPRD_GPIO_PHYS + 5*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO80-95*/
15 { (SPRD_GPIO_PHYS + 6*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO96-111*/
16 { (SPRD_GPIO_PHYS + 7*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO112-127*/
17 { (SPRD_GPIO_PHYS + 8*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO128-143*/
18 { (SPRD_GPIO_PHYS + 9*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO144-159*/
19 { (SPRD_GPIO_PHYS + 10*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO160-175*/
20 { (SPRD_GPIO_PHYS + 11*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO176-191*/
21 { (SPRD_GPIO_PHYS + 12*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO192-207*/
22 { (SPRD_GPIO_PHYS + 13*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO208-223*/
23 { (SPRD_GPIO_PHYS + 14*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO224-239*/
24 { (SPRD_GPIO_PHYS + 15*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO240-255*/
25 { (SPRD_GPIO_PHYS + 16*0x80), 0x10, GPIO_SECTION_GPIO },/*GPIO256-271*/
28 struct gpio_section * gpio_get_section_table (u32 *table_size)
30 *table_size = ARRAY_SIZE(s_gpio_section_table);
32 return (struct gpio_section *) s_gpio_section_table;