diff options
Diffstat (limited to 'arch/arm/mach-omap1/gpio7xx.c')
-rw-r--r-- | arch/arm/mach-omap1/gpio7xx.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/gpio7xx.c b/arch/arm/mach-omap1/gpio7xx.c index c6ad248d63a6..5ab63eab0ff5 100644 --- a/arch/arm/mach-omap1/gpio7xx.c +++ b/arch/arm/mach-omap1/gpio7xx.c | |||
@@ -39,11 +39,22 @@ static struct __initdata resource omap7xx_mpu_gpio_resources[] = { | |||
39 | }, | 39 | }, |
40 | }; | 40 | }; |
41 | 41 | ||
42 | static struct omap_gpio_reg_offs omap7xx_mpuio_regs = { | ||
43 | .revision = USHRT_MAX, | ||
44 | .direction = OMAP_MPUIO_IO_CNTL / 2, | ||
45 | .datain = OMAP_MPUIO_INPUT_LATCH / 2, | ||
46 | .dataout = OMAP_MPUIO_OUTPUT / 2, | ||
47 | .irqstatus = OMAP_MPUIO_GPIO_INT / 2, | ||
48 | .irqenable = OMAP_MPUIO_GPIO_MASKIT / 2, | ||
49 | .irqenable_inv = true, | ||
50 | }; | ||
51 | |||
42 | static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = { | 52 | static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = { |
43 | .virtual_irq_start = IH_MPUIO_BASE, | 53 | .virtual_irq_start = IH_MPUIO_BASE, |
44 | .bank_type = METHOD_MPUIO, | 54 | .bank_type = METHOD_MPUIO, |
45 | .bank_width = 32, | 55 | .bank_width = 32, |
46 | .bank_stride = 2, | 56 | .bank_stride = 2, |
57 | .regs = &omap7xx_mpuio_regs, | ||
47 | }; | 58 | }; |
48 | 59 | ||
49 | static struct platform_device omap7xx_mpu_gpio = { | 60 | static struct platform_device omap7xx_mpu_gpio = { |
@@ -69,10 +80,21 @@ static struct __initdata resource omap7xx_gpio1_resources[] = { | |||
69 | }, | 80 | }, |
70 | }; | 81 | }; |
71 | 82 | ||
83 | static struct omap_gpio_reg_offs omap7xx_gpio_regs = { | ||
84 | .revision = USHRT_MAX, | ||
85 | .direction = OMAP7XX_GPIO_DIR_CONTROL, | ||
86 | .datain = OMAP7XX_GPIO_DATA_INPUT, | ||
87 | .dataout = OMAP7XX_GPIO_DATA_OUTPUT, | ||
88 | .irqstatus = OMAP7XX_GPIO_INT_STATUS, | ||
89 | .irqenable = OMAP7XX_GPIO_INT_MASK, | ||
90 | .irqenable_inv = true, | ||
91 | }; | ||
92 | |||
72 | static struct __initdata omap_gpio_platform_data omap7xx_gpio1_config = { | 93 | static struct __initdata omap_gpio_platform_data omap7xx_gpio1_config = { |
73 | .virtual_irq_start = IH_GPIO_BASE, | 94 | .virtual_irq_start = IH_GPIO_BASE, |
74 | .bank_type = METHOD_GPIO_7XX, | 95 | .bank_type = METHOD_GPIO_7XX, |
75 | .bank_width = 32, | 96 | .bank_width = 32, |
97 | .regs = &omap7xx_gpio_regs, | ||
76 | }; | 98 | }; |
77 | 99 | ||
78 | static struct platform_device omap7xx_gpio1 = { | 100 | static struct platform_device omap7xx_gpio1 = { |
@@ -102,6 +124,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio2_config = { | |||
102 | .virtual_irq_start = IH_GPIO_BASE + 32, | 124 | .virtual_irq_start = IH_GPIO_BASE + 32, |
103 | .bank_type = METHOD_GPIO_7XX, | 125 | .bank_type = METHOD_GPIO_7XX, |
104 | .bank_width = 32, | 126 | .bank_width = 32, |
127 | .regs = &omap7xx_gpio_regs, | ||
105 | }; | 128 | }; |
106 | 129 | ||
107 | static struct platform_device omap7xx_gpio2 = { | 130 | static struct platform_device omap7xx_gpio2 = { |
@@ -131,6 +154,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio3_config = { | |||
131 | .virtual_irq_start = IH_GPIO_BASE + 64, | 154 | .virtual_irq_start = IH_GPIO_BASE + 64, |
132 | .bank_type = METHOD_GPIO_7XX, | 155 | .bank_type = METHOD_GPIO_7XX, |
133 | .bank_width = 32, | 156 | .bank_width = 32, |
157 | .regs = &omap7xx_gpio_regs, | ||
134 | }; | 158 | }; |
135 | 159 | ||
136 | static struct platform_device omap7xx_gpio3 = { | 160 | static struct platform_device omap7xx_gpio3 = { |
@@ -160,6 +184,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio4_config = { | |||
160 | .virtual_irq_start = IH_GPIO_BASE + 96, | 184 | .virtual_irq_start = IH_GPIO_BASE + 96, |
161 | .bank_type = METHOD_GPIO_7XX, | 185 | .bank_type = METHOD_GPIO_7XX, |
162 | .bank_width = 32, | 186 | .bank_width = 32, |
187 | .regs = &omap7xx_gpio_regs, | ||
163 | }; | 188 | }; |
164 | 189 | ||
165 | static struct platform_device omap7xx_gpio4 = { | 190 | static struct platform_device omap7xx_gpio4 = { |
@@ -189,6 +214,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio5_config = { | |||
189 | .virtual_irq_start = IH_GPIO_BASE + 128, | 214 | .virtual_irq_start = IH_GPIO_BASE + 128, |
190 | .bank_type = METHOD_GPIO_7XX, | 215 | .bank_type = METHOD_GPIO_7XX, |
191 | .bank_width = 32, | 216 | .bank_width = 32, |
217 | .regs = &omap7xx_gpio_regs, | ||
192 | }; | 218 | }; |
193 | 219 | ||
194 | static struct platform_device omap7xx_gpio5 = { | 220 | static struct platform_device omap7xx_gpio5 = { |
@@ -218,6 +244,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio6_config = { | |||
218 | .virtual_irq_start = IH_GPIO_BASE + 160, | 244 | .virtual_irq_start = IH_GPIO_BASE + 160, |
219 | .bank_type = METHOD_GPIO_7XX, | 245 | .bank_type = METHOD_GPIO_7XX, |
220 | .bank_width = 32, | 246 | .bank_width = 32, |
247 | .regs = &omap7xx_gpio_regs, | ||
221 | }; | 248 | }; |
222 | 249 | ||
223 | static struct platform_device omap7xx_gpio6 = { | 250 | static struct platform_device omap7xx_gpio6 = { |