blob: 02d05ea7036c5f7588b25a96047235344dfd7afe [file] [log] [blame]
Sascha Hauere3d13ff2008-07-05 10:02:48 +02001/*
2 * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
3 * Copyright 2008 Sascha Hauer, kernel@pengutronix.de
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
Guennadi Liakhovetskieb05bbe2009-05-04 13:13:52 +020020#include <linux/dma-mapping.h>
Sascha Hauere3d13ff2008-07-05 10:02:48 +020021#include <linux/module.h>
22#include <linux/platform_device.h>
23#include <linux/serial.h>
Juergen Beisert07bd1a62008-07-05 10:02:49 +020024#include <linux/gpio.h>
Russell Kinga09e64f2008-08-05 16:14:15 +010025#include <mach/hardware.h>
Russell King80b02c12009-01-08 10:01:47 +000026#include <mach/irqs.h>
Alan Carvalho de Assis45001e92009-04-02 12:38:41 -030027#include <mach/common.h>
Russell Kinga09e64f2008-08-05 16:14:15 +010028#include <mach/imx-uart.h>
Valentin Longchamp9c70e222009-05-07 11:51:42 +020029#include <mach/mx3_camera.h>
Sascha Hauere3d13ff2008-07-05 10:02:48 +020030
Sascha Hauer87bbb192009-01-29 16:00:23 +010031#include "devices.h"
32
Sascha Hauere3d13ff2008-07-05 10:02:48 +020033static struct resource uart0[] = {
34 {
35 .start = UART1_BASE_ADDR,
36 .end = UART1_BASE_ADDR + 0x0B5,
37 .flags = IORESOURCE_MEM,
38 }, {
39 .start = MXC_INT_UART1,
40 .end = MXC_INT_UART1,
41 .flags = IORESOURCE_IRQ,
42 },
43};
44
Sascha Hauer5cf09422008-09-09 10:19:41 +020045struct platform_device mxc_uart_device0 = {
Sascha Hauere3d13ff2008-07-05 10:02:48 +020046 .name = "imx-uart",
47 .id = 0,
48 .resource = uart0,
49 .num_resources = ARRAY_SIZE(uart0),
50};
51
52static struct resource uart1[] = {
53 {
54 .start = UART2_BASE_ADDR,
55 .end = UART2_BASE_ADDR + 0x0B5,
56 .flags = IORESOURCE_MEM,
57 }, {
58 .start = MXC_INT_UART2,
59 .end = MXC_INT_UART2,
60 .flags = IORESOURCE_IRQ,
61 },
62};
63
Sascha Hauer5cf09422008-09-09 10:19:41 +020064struct platform_device mxc_uart_device1 = {
Sascha Hauere3d13ff2008-07-05 10:02:48 +020065 .name = "imx-uart",
66 .id = 1,
67 .resource = uart1,
68 .num_resources = ARRAY_SIZE(uart1),
69};
70
71static struct resource uart2[] = {
72 {
73 .start = UART3_BASE_ADDR,
74 .end = UART3_BASE_ADDR + 0x0B5,
75 .flags = IORESOURCE_MEM,
76 }, {
77 .start = MXC_INT_UART3,
78 .end = MXC_INT_UART3,
79 .flags = IORESOURCE_IRQ,
80 },
81};
82
Sascha Hauer5cf09422008-09-09 10:19:41 +020083struct platform_device mxc_uart_device2 = {
Sascha Hauere3d13ff2008-07-05 10:02:48 +020084 .name = "imx-uart",
85 .id = 2,
86 .resource = uart2,
87 .num_resources = ARRAY_SIZE(uart2),
88};
89
Sascha Hauer9536ff32009-02-06 15:38:51 +010090#ifdef CONFIG_ARCH_MX31
Sascha Hauere3d13ff2008-07-05 10:02:48 +020091static struct resource uart3[] = {
92 {
93 .start = UART4_BASE_ADDR,
94 .end = UART4_BASE_ADDR + 0x0B5,
95 .flags = IORESOURCE_MEM,
96 }, {
97 .start = MXC_INT_UART4,
98 .end = MXC_INT_UART4,
99 .flags = IORESOURCE_IRQ,
100 },
101};
102
Sascha Hauer5cf09422008-09-09 10:19:41 +0200103struct platform_device mxc_uart_device3 = {
Sascha Hauere3d13ff2008-07-05 10:02:48 +0200104 .name = "imx-uart",
105 .id = 3,
106 .resource = uart3,
107 .num_resources = ARRAY_SIZE(uart3),
108};
109
110static struct resource uart4[] = {
111 {
112 .start = UART5_BASE_ADDR,
113 .end = UART5_BASE_ADDR + 0x0B5,
114 .flags = IORESOURCE_MEM,
115 }, {
116 .start = MXC_INT_UART5,
117 .end = MXC_INT_UART5,
118 .flags = IORESOURCE_IRQ,
119 },
120};
121
Sascha Hauer5cf09422008-09-09 10:19:41 +0200122struct platform_device mxc_uart_device4 = {
Sascha Hauere3d13ff2008-07-05 10:02:48 +0200123 .name = "imx-uart",
124 .id = 4,
125 .resource = uart4,
126 .num_resources = ARRAY_SIZE(uart4),
127};
Sascha Hauer9536ff32009-02-06 15:38:51 +0100128#endif /* CONFIG_ARCH_MX31 */
Sascha Hauere3d13ff2008-07-05 10:02:48 +0200129
Juergen Beisert07bd1a62008-07-05 10:02:49 +0200130/* GPIO port description */
131static struct mxc_gpio_port imx_gpio_ports[] = {
Sascha Hauer3f4f54b2009-06-23 12:12:00 +0200132 {
Juergen Beisert07bd1a62008-07-05 10:02:49 +0200133 .chip.label = "gpio-0",
134 .base = IO_ADDRESS(GPIO1_BASE_ADDR),
135 .irq = MXC_INT_GPIO1,
Sascha Hauer9d631b82008-12-18 11:08:55 +0100136 .virtual_irq_start = MXC_GPIO_IRQ_START,
Sascha Hauer3f4f54b2009-06-23 12:12:00 +0200137 }, {
Juergen Beisert07bd1a62008-07-05 10:02:49 +0200138 .chip.label = "gpio-1",
139 .base = IO_ADDRESS(GPIO2_BASE_ADDR),
140 .irq = MXC_INT_GPIO2,
Sascha Hauer9d631b82008-12-18 11:08:55 +0100141 .virtual_irq_start = MXC_GPIO_IRQ_START + 32,
Sascha Hauer3f4f54b2009-06-23 12:12:00 +0200142 }, {
Juergen Beisert07bd1a62008-07-05 10:02:49 +0200143 .chip.label = "gpio-2",
144 .base = IO_ADDRESS(GPIO3_BASE_ADDR),
145 .irq = MXC_INT_GPIO3,
Sascha Hauer9d631b82008-12-18 11:08:55 +0100146 .virtual_irq_start = MXC_GPIO_IRQ_START + 64,
Juergen Beisert07bd1a62008-07-05 10:02:49 +0200147 }
148};
149
Uwe Kleine-König9a763bf2010-06-10 17:11:06 +0200150int __init imx3x_register_gpios(void)
Juergen Beisert07bd1a62008-07-05 10:02:49 +0200151{
152 return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports));
153}
Sascha Hauera8405922008-12-01 14:15:39 -0800154
155static struct resource mxc_w1_master_resources[] = {
156 {
157 .start = OWIRE_BASE_ADDR,
158 .end = OWIRE_BASE_ADDR + SZ_4K - 1,
159 .flags = IORESOURCE_MEM,
160 },
161};
162
163struct platform_device mxc_w1_master_device = {
164 .name = "mxc_w1",
165 .id = 0,
166 .num_resources = ARRAY_SIZE(mxc_w1_master_resources),
167 .resource = mxc_w1_master_resources,
168};
Sascha Hauercb96cf12008-11-11 15:15:39 +0100169
Sascha Hauer2adc1d62008-12-19 14:32:06 +0100170#ifdef CONFIG_ARCH_MX31
171static struct resource mxcsdhc0_resources[] = {
172 {
173 .start = MMC_SDHC1_BASE_ADDR,
174 .end = MMC_SDHC1_BASE_ADDR + SZ_16K - 1,
175 .flags = IORESOURCE_MEM,
176 }, {
177 .start = MXC_INT_MMC_SDHC1,
178 .end = MXC_INT_MMC_SDHC1,
179 .flags = IORESOURCE_IRQ,
180 },
181};
182
183static struct resource mxcsdhc1_resources[] = {
184 {
185 .start = MMC_SDHC2_BASE_ADDR,
186 .end = MMC_SDHC2_BASE_ADDR + SZ_16K - 1,
187 .flags = IORESOURCE_MEM,
188 }, {
189 .start = MXC_INT_MMC_SDHC2,
190 .end = MXC_INT_MMC_SDHC2,
191 .flags = IORESOURCE_IRQ,
192 },
193};
194
195struct platform_device mxcsdhc_device0 = {
196 .name = "mxc-mmc",
197 .id = 0,
198 .num_resources = ARRAY_SIZE(mxcsdhc0_resources),
199 .resource = mxcsdhc0_resources,
200};
201
202struct platform_device mxcsdhc_device1 = {
203 .name = "mxc-mmc",
204 .id = 1,
205 .num_resources = ARRAY_SIZE(mxcsdhc1_resources),
206 .resource = mxcsdhc1_resources,
207};
Alan Carvalho de Assis45001e92009-04-02 12:38:41 -0300208
209static struct resource rnga_resources[] = {
210 {
211 .start = RNGA_BASE_ADDR,
212 .end = RNGA_BASE_ADDR + 0x28,
213 .flags = IORESOURCE_MEM,
214 },
215};
216
217struct platform_device mxc_rnga_device = {
218 .name = "mxc_rnga",
219 .id = -1,
220 .num_resources = 1,
221 .resource = rnga_resources,
222};
Sascha Hauer2adc1d62008-12-19 14:32:06 +0100223#endif /* CONFIG_ARCH_MX31 */
224
Valentin Longchampca489f82009-02-16 12:47:52 +0100225/* i.MX31 Image Processing Unit */
226
227/* The resource order is important! */
228static struct resource mx3_ipu_rsrc[] = {
229 {
230 .start = IPU_CTRL_BASE_ADDR,
231 .end = IPU_CTRL_BASE_ADDR + 0x5F,
232 .flags = IORESOURCE_MEM,
233 }, {
234 .start = IPU_CTRL_BASE_ADDR + 0x88,
235 .end = IPU_CTRL_BASE_ADDR + 0xB3,
236 .flags = IORESOURCE_MEM,
237 }, {
238 .start = MXC_INT_IPU_SYN,
239 .end = MXC_INT_IPU_SYN,
240 .flags = IORESOURCE_IRQ,
241 }, {
242 .start = MXC_INT_IPU_ERR,
243 .end = MXC_INT_IPU_ERR,
244 .flags = IORESOURCE_IRQ,
245 },
246};
247
248struct platform_device mx3_ipu = {
249 .name = "ipu-core",
250 .id = -1,
251 .num_resources = ARRAY_SIZE(mx3_ipu_rsrc),
252 .resource = mx3_ipu_rsrc,
253};
254
255static struct resource fb_resources[] = {
256 {
257 .start = IPU_CTRL_BASE_ADDR + 0xB4,
258 .end = IPU_CTRL_BASE_ADDR + 0x1BF,
259 .flags = IORESOURCE_MEM,
260 },
261};
262
263struct platform_device mx3_fb = {
264 .name = "mx3_sdc_fb",
265 .id = -1,
266 .num_resources = ARRAY_SIZE(fb_resources),
267 .resource = fb_resources,
268 .dev = {
Valentin Longchamp9c70e222009-05-07 11:51:42 +0200269 .coherent_dma_mask = DMA_BIT_MASK(32),
Valentin Longchampca489f82009-02-16 12:47:52 +0100270 },
271};
Sascha Hauer9536ff32009-02-06 15:38:51 +0100272
Valentin Longchamp9c70e222009-05-07 11:51:42 +0200273static struct resource camera_resources[] = {
274 {
275 .start = IPU_CTRL_BASE_ADDR + 0x60,
276 .end = IPU_CTRL_BASE_ADDR + 0x87,
277 .flags = IORESOURCE_MEM,
278 },
279};
280
281struct platform_device mx3_camera = {
282 .name = "mx3-camera",
283 .id = 0,
284 .num_resources = ARRAY_SIZE(camera_resources),
285 .resource = camera_resources,
286 .dev = {
287 .coherent_dma_mask = DMA_BIT_MASK(32),
288 },
289};
290
Guennadi Liakhovetskieb05bbe2009-05-04 13:13:52 +0200291static struct resource otg_resources[] = {
292 {
Sascha Hauer7bc07eb2009-04-17 16:52:25 +0200293 .start = MX31_OTG_BASE_ADDR,
294 .end = MX31_OTG_BASE_ADDR + 0x1ff,
Guennadi Liakhovetskieb05bbe2009-05-04 13:13:52 +0200295 .flags = IORESOURCE_MEM,
296 }, {
297 .start = MXC_INT_USB3,
298 .end = MXC_INT_USB3,
299 .flags = IORESOURCE_IRQ,
300 },
301};
302
303static u64 otg_dmamask = DMA_BIT_MASK(32);
304
305/* OTG gadget device */
306struct platform_device mxc_otg_udc_device = {
307 .name = "fsl-usb2-udc",
308 .id = -1,
309 .dev = {
310 .dma_mask = &otg_dmamask,
311 .coherent_dma_mask = DMA_BIT_MASK(32),
312 },
313 .resource = otg_resources,
314 .num_resources = ARRAY_SIZE(otg_resources),
315};
316
Daniel Mackc13a4822009-06-25 14:11:50 +0200317/* OTG host */
318struct platform_device mxc_otg_host = {
319 .name = "mxc-ehci",
320 .id = 0,
321 .dev = {
322 .coherent_dma_mask = 0xffffffff,
323 .dma_mask = &otg_dmamask,
324 },
325 .resource = otg_resources,
326 .num_resources = ARRAY_SIZE(otg_resources),
327};
328
329/* USB host 1 */
330
331static u64 usbh1_dmamask = ~(u32)0;
332
333static struct resource mxc_usbh1_resources[] = {
334 {
Sascha Hauer7bc07eb2009-04-17 16:52:25 +0200335 .start = MX31_OTG_BASE_ADDR + 0x200,
336 .end = MX31_OTG_BASE_ADDR + 0x3ff,
Daniel Mackc13a4822009-06-25 14:11:50 +0200337 .flags = IORESOURCE_MEM,
338 }, {
339 .start = MXC_INT_USB1,
340 .end = MXC_INT_USB1,
341 .flags = IORESOURCE_IRQ,
342 },
343};
344
345struct platform_device mxc_usbh1 = {
346 .name = "mxc-ehci",
347 .id = 1,
348 .dev = {
349 .coherent_dma_mask = 0xffffffff,
350 .dma_mask = &usbh1_dmamask,
351 },
352 .resource = mxc_usbh1_resources,
353 .num_resources = ARRAY_SIZE(mxc_usbh1_resources),
354};
355
356/* USB host 2 */
357static u64 usbh2_dmamask = ~(u32)0;
358
359static struct resource mxc_usbh2_resources[] = {
360 {
Sascha Hauer7bc07eb2009-04-17 16:52:25 +0200361 .start = MX31_OTG_BASE_ADDR + 0x400,
362 .end = MX31_OTG_BASE_ADDR + 0x5ff,
Daniel Mackc13a4822009-06-25 14:11:50 +0200363 .flags = IORESOURCE_MEM,
364 }, {
365 .start = MXC_INT_USB2,
366 .end = MXC_INT_USB2,
367 .flags = IORESOURCE_IRQ,
368 },
369};
370
371struct platform_device mxc_usbh2 = {
372 .name = "mxc-ehci",
373 .id = 2,
374 .dev = {
375 .coherent_dma_mask = 0xffffffff,
376 .dma_mask = &usbh2_dmamask,
377 },
378 .resource = mxc_usbh2_resources,
379 .num_resources = ARRAY_SIZE(mxc_usbh2_resources),
380};
381
Uwe Kleine-König06606ff2010-06-22 10:09:14 +0200382#if defined(CONFIG_ARCH_MX35)
Sascha Hauerd37ba972008-12-19 14:32:15 +0100383/*
384 * SPI master controller
385 * 3 channels
386 */
Guennadi Liakhovetskid9e8b882009-10-05 16:49:12 +0200387static struct resource mxc_spi_0_resources[] = {
Sascha Hauerd37ba972008-12-19 14:32:15 +0100388 {
389 .start = CSPI1_BASE_ADDR,
390 .end = CSPI1_BASE_ADDR + SZ_4K - 1,
391 .flags = IORESOURCE_MEM,
392 }, {
393 .start = MXC_INT_CSPI1,
394 .end = MXC_INT_CSPI1,
395 .flags = IORESOURCE_IRQ,
396 },
397};
398
Guennadi Liakhovetskid9e8b882009-10-05 16:49:12 +0200399static struct resource mxc_spi_1_resources[] = {
Sascha Hauerd37ba972008-12-19 14:32:15 +0100400 {
401 .start = CSPI2_BASE_ADDR,
402 .end = CSPI2_BASE_ADDR + SZ_4K - 1,
403 .flags = IORESOURCE_MEM,
404 }, {
405 .start = MXC_INT_CSPI2,
406 .end = MXC_INT_CSPI2,
407 .flags = IORESOURCE_IRQ,
408 },
409};
410
Guennadi Liakhovetskid9e8b882009-10-05 16:49:12 +0200411static struct resource mxc_spi_2_resources[] = {
Sascha Hauerd37ba972008-12-19 14:32:15 +0100412 {
413 .start = CSPI3_BASE_ADDR,
414 .end = CSPI3_BASE_ADDR + SZ_4K - 1,
415 .flags = IORESOURCE_MEM,
416 }, {
417 .start = MXC_INT_CSPI3,
418 .end = MXC_INT_CSPI3,
419 .flags = IORESOURCE_IRQ,
420 },
421};
422
Guennadi Liakhovetskid9e8b882009-10-05 16:49:12 +0200423struct platform_device mxc_spi_device0 = {
Sascha Hauerd37ba972008-12-19 14:32:15 +0100424 .name = "spi_imx",
425 .id = 0,
Guennadi Liakhovetskid9e8b882009-10-05 16:49:12 +0200426 .num_resources = ARRAY_SIZE(mxc_spi_0_resources),
427 .resource = mxc_spi_0_resources,
Sascha Hauerd37ba972008-12-19 14:32:15 +0100428};
429
Guennadi Liakhovetskid9e8b882009-10-05 16:49:12 +0200430struct platform_device mxc_spi_device1 = {
Sascha Hauerd37ba972008-12-19 14:32:15 +0100431 .name = "spi_imx",
432 .id = 1,
Guennadi Liakhovetskid9e8b882009-10-05 16:49:12 +0200433 .num_resources = ARRAY_SIZE(mxc_spi_1_resources),
434 .resource = mxc_spi_1_resources,
Sascha Hauerd37ba972008-12-19 14:32:15 +0100435};
436
Guennadi Liakhovetskid9e8b882009-10-05 16:49:12 +0200437struct platform_device mxc_spi_device2 = {
Sascha Hauerd37ba972008-12-19 14:32:15 +0100438 .name = "spi_imx",
439 .id = 2,
Guennadi Liakhovetskid9e8b882009-10-05 16:49:12 +0200440 .num_resources = ARRAY_SIZE(mxc_spi_2_resources),
441 .resource = mxc_spi_2_resources,
Sascha Hauerd37ba972008-12-19 14:32:15 +0100442};
443
Sascha Hauer9536ff32009-02-06 15:38:51 +0100444static struct resource mxc_fec_resources[] = {
445 {
446 .start = MXC_FEC_BASE_ADDR,
447 .end = MXC_FEC_BASE_ADDR + 0xfff,
Sascha Hauer3f4f54b2009-06-23 12:12:00 +0200448 .flags = IORESOURCE_MEM,
Sascha Hauer9536ff32009-02-06 15:38:51 +0100449 }, {
450 .start = MXC_INT_FEC,
451 .end = MXC_INT_FEC,
Sascha Hauer3f4f54b2009-06-23 12:12:00 +0200452 .flags = IORESOURCE_IRQ,
Sascha Hauer9536ff32009-02-06 15:38:51 +0100453 },
454};
455
456struct platform_device mxc_fec_device = {
457 .name = "fec",
458 .id = 0,
459 .num_resources = ARRAY_SIZE(mxc_fec_resources),
460 .resource = mxc_fec_resources,
461};
462#endif
463
Sascha Hauerd8d982b2009-10-29 17:17:42 +0100464static struct resource imx_ssi_resources0[] = {
465 {
466 .start = SSI1_BASE_ADDR,
467 .end = SSI1_BASE_ADDR + 0xfff,
468 .flags = IORESOURCE_MEM,
469 }, {
470 .start = MX31_INT_SSI1,
471 .end = MX31_INT_SSI1,
472 .flags = IORESOURCE_IRQ,
473 },
474};
475
476static struct resource imx_ssi_resources1[] = {
477 {
478 .start = SSI2_BASE_ADDR,
479 .end = SSI2_BASE_ADDR + 0xfff,
480 .flags = IORESOURCE_MEM
481 }, {
482 .start = MX31_INT_SSI2,
483 .end = MX31_INT_SSI2,
484 .flags = IORESOURCE_IRQ,
485 },
486};
487
488struct platform_device imx_ssi_device0 = {
489 .name = "imx-ssi",
490 .id = 0,
491 .num_resources = ARRAY_SIZE(imx_ssi_resources0),
492 .resource = imx_ssi_resources0,
493};
494
495struct platform_device imx_ssi_device1 = {
496 .name = "imx-ssi",
497 .id = 1,
498 .num_resources = ARRAY_SIZE(imx_ssi_resources1),
499 .resource = imx_ssi_resources1,
500};
501
Vladimir Zapolskiya7dc12b2010-03-19 18:16:37 +0300502static struct resource imx_wdt_resources[] = {
503 {
504 .flags = IORESOURCE_MEM,
505 },
506};
507
508struct platform_device imx_wdt_device0 = {
Wolfram Sang6d38c1c2010-04-29 10:03:18 +0200509 .name = "imx2-wdt",
Vladimir Zapolskiya7dc12b2010-03-19 18:16:37 +0300510 .id = 0,
511 .num_resources = ARRAY_SIZE(imx_wdt_resources),
512 .resource = imx_wdt_resources,
513};
514
Vladimir Zapolskiyded518c2010-03-24 14:32:17 +0300515static struct resource imx_rtc_resources[] = {
516 {
517 .start = MX31_RTC_BASE_ADDR,
518 .end = MX31_RTC_BASE_ADDR + 0x3fff,
519 .flags = IORESOURCE_MEM,
520 },
521 {
522 .start = MX31_INT_RTC,
523 .flags = IORESOURCE_IRQ,
524 },
525};
526
527struct platform_device imx_rtc_device0 = {
528 .name = "mxc_rtc",
529 .id = -1,
530 .num_resources = ARRAY_SIZE(imx_rtc_resources),
531 .resource = imx_rtc_resources,
532};
533
Alberto Panizzob1e89952010-05-19 11:33:43 +0200534static struct resource imx_kpp_resources[] = {
535 {
536 .start = MX3x_KPP_BASE_ADDR,
537 .end = MX3x_KPP_BASE_ADDR + 0xf,
538 .flags = IORESOURCE_MEM
539 }, {
540 .start = MX3x_INT_KPP,
541 .end = MX3x_INT_KPP,
542 .flags = IORESOURCE_IRQ,
543 },
544};
545
546struct platform_device imx_kpp_device = {
547 .name = "imx-keypad",
548 .id = -1,
549 .num_resources = ARRAY_SIZE(imx_kpp_resources),
550 .resource = imx_kpp_resources,
551};
552
Vladimir Zapolskiya7dc12b2010-03-19 18:16:37 +0300553static int __init mx3_devices_init(void)
Sascha Hauer9536ff32009-02-06 15:38:51 +0100554{
Uwe Kleine-Königa2ceeef2010-06-16 12:23:11 +0200555#if defined(CONFIG_ARCH_MX31)
Sascha Hauer9536ff32009-02-06 15:38:51 +0100556 if (cpu_is_mx31()) {
Vladimir Zapolskiya7dc12b2010-03-19 18:16:37 +0300557 imx_wdt_resources[0].start = MX31_WDOG_BASE_ADDR;
558 imx_wdt_resources[0].end = MX31_WDOG_BASE_ADDR + 0x3fff;
Alan Carvalho de Assis45001e92009-04-02 12:38:41 -0300559 mxc_register_device(&mxc_rnga_device, NULL);
Sascha Hauer9536ff32009-02-06 15:38:51 +0100560 }
Uwe Kleine-Königa2ceeef2010-06-16 12:23:11 +0200561#endif
562#if defined(CONFIG_ARCH_MX35)
Sascha Hauer9536ff32009-02-06 15:38:51 +0100563 if (cpu_is_mx35()) {
Sascha Hauer7bc07eb2009-04-17 16:52:25 +0200564 otg_resources[0].start = MX35_OTG_BASE_ADDR;
565 otg_resources[0].end = MX35_OTG_BASE_ADDR + 0x1ff;
566 otg_resources[1].start = MXC_INT_USBOTG;
567 otg_resources[1].end = MXC_INT_USBOTG;
568 mxc_usbh1_resources[0].start = MX35_OTG_BASE_ADDR + 0x400;
569 mxc_usbh1_resources[0].end = MX35_OTG_BASE_ADDR + 0x5ff;
570 mxc_usbh1_resources[1].start = MXC_INT_USBHS;
571 mxc_usbh1_resources[1].end = MXC_INT_USBHS;
Sascha Hauerd8d982b2009-10-29 17:17:42 +0100572 imx_ssi_resources0[1].start = MX35_INT_SSI1;
573 imx_ssi_resources0[1].end = MX35_INT_SSI1;
574 imx_ssi_resources1[1].start = MX35_INT_SSI2;
575 imx_ssi_resources1[1].end = MX35_INT_SSI2;
Vladimir Zapolskiya7dc12b2010-03-19 18:16:37 +0300576 imx_wdt_resources[0].start = MX35_WDOG_BASE_ADDR;
577 imx_wdt_resources[0].end = MX35_WDOG_BASE_ADDR + 0x3fff;
Sascha Hauer9536ff32009-02-06 15:38:51 +0100578 }
Uwe Kleine-Königa2ceeef2010-06-16 12:23:11 +0200579#endif
Sascha Hauer9536ff32009-02-06 15:38:51 +0100580
581 return 0;
582}
583
584subsys_initcall(mx3_devices_init);