aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx1
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-06-23 06:14:39 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2009-08-07 06:10:55 -0400
commit9b0e6db0da1ea433f38b8d952108746f3fc67304 (patch)
tree53f29936d7e40eabc75f0da50f9125157fc7bafd /arch/arm/mach-mx1
parent3f4f54b4f0052e9838f6bb98535746464d0c01c3 (diff)
mx1: Codingstyle: Let the compiler count arrays
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx1')
-rw-r--r--arch/arm/mach-mx1/devices.c87
-rw-r--r--arch/arm/mach-mx1/scb9328.c14
2 files changed, 39 insertions, 62 deletions
diff --git a/arch/arm/mach-mx1/devices.c b/arch/arm/mach-mx1/devices.c
index 76d1ffb48079..b6be29d1cb08 100644
--- a/arch/arm/mach-mx1/devices.c
+++ b/arch/arm/mach-mx1/devices.c
@@ -29,12 +29,11 @@
29#include "devices.h" 29#include "devices.h"
30 30
31static struct resource imx_csi_resources[] = { 31static struct resource imx_csi_resources[] = {
32 [0] = { 32 {
33 .start = 0x00224000, 33 .start = 0x00224000,
34 .end = 0x00224010, 34 .end = 0x00224010,
35 .flags = IORESOURCE_MEM, 35 .flags = IORESOURCE_MEM,
36 }, 36 }, {
37 [1] = {
38 .start = CSI_INT, 37 .start = CSI_INT,
39 .end = CSI_INT, 38 .end = CSI_INT,
40 .flags = IORESOURCE_IRQ, 39 .flags = IORESOURCE_IRQ,
@@ -55,12 +54,11 @@ struct platform_device imx_csi_device = {
55}; 54};
56 55
57static struct resource imx_i2c_resources[] = { 56static struct resource imx_i2c_resources[] = {
58 [0] = { 57 {
59 .start = 0x00217000, 58 .start = 0x00217000,
60 .end = 0x00217010, 59 .end = 0x00217010,
61 .flags = IORESOURCE_MEM, 60 .flags = IORESOURCE_MEM,
62 }, 61 }, {
63 [1] = {
64 .start = I2C_INT, 62 .start = I2C_INT,
65 .end = I2C_INT, 63 .end = I2C_INT,
66 .flags = IORESOURCE_IRQ, 64 .flags = IORESOURCE_IRQ,
@@ -75,22 +73,19 @@ struct platform_device imx_i2c_device = {
75}; 73};
76 74
77static struct resource imx_uart1_resources[] = { 75static struct resource imx_uart1_resources[] = {
78 [0] = { 76 {
79 .start = UART1_BASE_ADDR, 77 .start = UART1_BASE_ADDR,
80 .end = UART1_BASE_ADDR + 0xD0, 78 .end = UART1_BASE_ADDR + 0xD0,
81 .flags = IORESOURCE_MEM, 79 .flags = IORESOURCE_MEM,
82 }, 80 }, {
83 [1] = {
84 .start = UART1_MINT_RX, 81 .start = UART1_MINT_RX,
85 .end = UART1_MINT_RX, 82 .end = UART1_MINT_RX,
86 .flags = IORESOURCE_IRQ, 83 .flags = IORESOURCE_IRQ,
87 }, 84 }, {
88 [2] = {
89 .start = UART1_MINT_TX, 85 .start = UART1_MINT_TX,
90 .end = UART1_MINT_TX, 86 .end = UART1_MINT_TX,
91 .flags = IORESOURCE_IRQ, 87 .flags = IORESOURCE_IRQ,
92 }, 88 }, {
93 [3] = {
94 .start = UART1_MINT_RTS, 89 .start = UART1_MINT_RTS,
95 .end = UART1_MINT_RTS, 90 .end = UART1_MINT_RTS,
96 .flags = IORESOURCE_IRQ, 91 .flags = IORESOURCE_IRQ,
@@ -105,22 +100,19 @@ struct platform_device imx_uart1_device = {
105}; 100};
106 101
107static struct resource imx_uart2_resources[] = { 102static struct resource imx_uart2_resources[] = {
108 [0] = { 103 {
109 .start = UART2_BASE_ADDR, 104 .start = UART2_BASE_ADDR,
110 .end = UART2_BASE_ADDR + 0xD0, 105 .end = UART2_BASE_ADDR + 0xD0,
111 .flags = IORESOURCE_MEM, 106 .flags = IORESOURCE_MEM,
112 }, 107 }, {
113 [1] = {
114 .start = UART2_MINT_RX, 108 .start = UART2_MINT_RX,
115 .end = UART2_MINT_RX, 109 .end = UART2_MINT_RX,
116 .flags = IORESOURCE_IRQ, 110 .flags = IORESOURCE_IRQ,
117 }, 111 }, {
118 [2] = {
119 .start = UART2_MINT_TX, 112 .start = UART2_MINT_TX,
120 .end = UART2_MINT_TX, 113 .end = UART2_MINT_TX,
121 .flags = IORESOURCE_IRQ, 114 .flags = IORESOURCE_IRQ,
122 }, 115 }, {
123 [3] = {
124 .start = UART2_MINT_RTS, 116 .start = UART2_MINT_RTS,
125 .end = UART2_MINT_RTS, 117 .end = UART2_MINT_RTS,
126 .flags = IORESOURCE_IRQ, 118 .flags = IORESOURCE_IRQ,
@@ -135,17 +127,15 @@ struct platform_device imx_uart2_device = {
135}; 127};
136 128
137static struct resource imx_rtc_resources[] = { 129static struct resource imx_rtc_resources[] = {
138 [0] = { 130 {
139 .start = 0x00204000, 131 .start = 0x00204000,
140 .end = 0x00204024, 132 .end = 0x00204024,
141 .flags = IORESOURCE_MEM, 133 .flags = IORESOURCE_MEM,
142 }, 134 }, {
143 [1] = {
144 .start = RTC_INT, 135 .start = RTC_INT,
145 .end = RTC_INT, 136 .end = RTC_INT,
146 .flags = IORESOURCE_IRQ, 137 .flags = IORESOURCE_IRQ,
147 }, 138 }, {
148 [2] = {
149 .start = RTC_SAMINT, 139 .start = RTC_SAMINT,
150 .end = RTC_SAMINT, 140 .end = RTC_SAMINT,
151 .flags = IORESOURCE_IRQ, 141 .flags = IORESOURCE_IRQ,
@@ -160,12 +150,11 @@ struct platform_device imx_rtc_device = {
160}; 150};
161 151
162static struct resource imx_wdt_resources[] = { 152static struct resource imx_wdt_resources[] = {
163 [0] = { 153 {
164 .start = 0x00201000, 154 .start = 0x00201000,
165 .end = 0x00201008, 155 .end = 0x00201008,
166 .flags = IORESOURCE_MEM, 156 .flags = IORESOURCE_MEM,
167 }, 157 }, {
168 [1] = {
169 .start = WDT_INT, 158 .start = WDT_INT,
170 .end = WDT_INT, 159 .end = WDT_INT,
171 .flags = IORESOURCE_IRQ, 160 .flags = IORESOURCE_IRQ,
@@ -180,42 +169,35 @@ struct platform_device imx_wdt_device = {
180}; 169};
181 170
182static struct resource imx_usb_resources[] = { 171static struct resource imx_usb_resources[] = {
183 [0] = { 172 {
184 .start = 0x00212000, 173 .start = 0x00212000,
185 .end = 0x00212148, 174 .end = 0x00212148,
186 .flags = IORESOURCE_MEM, 175 .flags = IORESOURCE_MEM,
187 }, 176 }, {
188 [1] = {
189 .start = USBD_INT0, 177 .start = USBD_INT0,
190 .end = USBD_INT0, 178 .end = USBD_INT0,
191 .flags = IORESOURCE_IRQ, 179 .flags = IORESOURCE_IRQ,
192 }, 180 }, {
193 [2] = {
194 .start = USBD_INT1, 181 .start = USBD_INT1,
195 .end = USBD_INT1, 182 .end = USBD_INT1,
196 .flags = IORESOURCE_IRQ, 183 .flags = IORESOURCE_IRQ,
197 }, 184 }, {
198 [3] = {
199 .start = USBD_INT2, 185 .start = USBD_INT2,
200 .end = USBD_INT2, 186 .end = USBD_INT2,
201 .flags = IORESOURCE_IRQ, 187 .flags = IORESOURCE_IRQ,
202 }, 188 }, {
203 [4] = {
204 .start = USBD_INT3, 189 .start = USBD_INT3,
205 .end = USBD_INT3, 190 .end = USBD_INT3,
206 .flags = IORESOURCE_IRQ, 191 .flags = IORESOURCE_IRQ,
207 }, 192 }, {
208 [5] = {
209 .start = USBD_INT4, 193 .start = USBD_INT4,
210 .end = USBD_INT4, 194 .end = USBD_INT4,
211 .flags = IORESOURCE_IRQ, 195 .flags = IORESOURCE_IRQ,
212 }, 196 }, {
213 [6] = {
214 .start = USBD_INT5, 197 .start = USBD_INT5,
215 .end = USBD_INT5, 198 .end = USBD_INT5,
216 .flags = IORESOURCE_IRQ, 199 .flags = IORESOURCE_IRQ,
217 }, 200 }, {
218 [7] = {
219 .start = USBD_INT6, 201 .start = USBD_INT6,
220 .end = USBD_INT6, 202 .end = USBD_INT6,
221 .flags = IORESOURCE_IRQ, 203 .flags = IORESOURCE_IRQ,
@@ -231,29 +213,26 @@ struct platform_device imx_usb_device = {
231 213
232/* GPIO port description */ 214/* GPIO port description */
233static struct mxc_gpio_port imx_gpio_ports[] = { 215static struct mxc_gpio_port imx_gpio_ports[] = {
234 [0] = { 216 {
235 .chip.label = "gpio-0", 217 .chip.label = "gpio-0",
236 .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR), 218 .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR),
237 .irq = GPIO_INT_PORTA, 219 .irq = GPIO_INT_PORTA,
238 .virtual_irq_start = MXC_GPIO_IRQ_START 220 .virtual_irq_start = MXC_GPIO_IRQ_START,
239 }, 221 }, {
240 [1] = {
241 .chip.label = "gpio-1", 222 .chip.label = "gpio-1",
242 .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x100), 223 .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x100),
243 .irq = GPIO_INT_PORTB, 224 .irq = GPIO_INT_PORTB,
244 .virtual_irq_start = MXC_GPIO_IRQ_START + 32 225 .virtual_irq_start = MXC_GPIO_IRQ_START + 32,
245 }, 226 }, {
246 [2] = {
247 .chip.label = "gpio-2", 227 .chip.label = "gpio-2",
248 .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x200), 228 .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x200),
249 .irq = GPIO_INT_PORTC, 229 .irq = GPIO_INT_PORTC,
250 .virtual_irq_start = MXC_GPIO_IRQ_START + 64 230 .virtual_irq_start = MXC_GPIO_IRQ_START + 64,
251 }, 231 }, {
252 [3] = {
253 .chip.label = "gpio-3", 232 .chip.label = "gpio-3",
254 .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x300), 233 .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x300),
255 .irq = GPIO_INT_PORTD, 234 .irq = GPIO_INT_PORTD,
256 .virtual_irq_start = MXC_GPIO_IRQ_START + 96 235 .virtual_irq_start = MXC_GPIO_IRQ_START + 96,
257 } 236 }
258}; 237};
259 238
diff --git a/arch/arm/mach-mx1/scb9328.c b/arch/arm/mach-mx1/scb9328.c
index 125d495e9c73..325d98df6053 100644
--- a/arch/arm/mach-mx1/scb9328.c
+++ b/arch/arm/mach-mx1/scb9328.c
@@ -68,22 +68,20 @@ static struct dm9000_plat_data dm9000_platdata = {
68 * to gain access to address latch registers and the data path. 68 * to gain access to address latch registers and the data path.
69 */ 69 */
70static struct resource dm9000x_resources[] = { 70static struct resource dm9000x_resources[] = {
71 [0] = { 71 {
72 .name = "address area", 72 .name = "address area",
73 .start = IMX_CS5_PHYS, 73 .start = IMX_CS5_PHYS,
74 .end = IMX_CS5_PHYS + 1, 74 .end = IMX_CS5_PHYS + 1,
75 .flags = IORESOURCE_MEM /* address access */ 75 .flags = IORESOURCE_MEM, /* address access */
76 }, 76 }, {
77 [1] = {
78 .name = "data area", 77 .name = "data area",
79 .start = IMX_CS5_PHYS + 4, 78 .start = IMX_CS5_PHYS + 4,
80 .end = IMX_CS5_PHYS + 5, 79 .end = IMX_CS5_PHYS + 5,
81 .flags = IORESOURCE_MEM /* data access */ 80 .flags = IORESOURCE_MEM, /* data access */
82 }, 81 }, {
83 [2] = {
84 .start = IRQ_GPIOC(3), 82 .start = IRQ_GPIOC(3),
85 .end = IRQ_GPIOC(3), 83 .end = IRQ_GPIOC(3),
86 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL 84 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
87 }, 85 },
88}; 86};
89 87