diff options
Diffstat (limited to 'arch/arm/mach-mx3/devices.c')
| -rw-r--r-- | arch/arm/mach-mx3/devices.c | 66 |
1 files changed, 65 insertions, 1 deletions
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index 380be0c9b213..d927eddcad46 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
| @@ -17,13 +17,17 @@ | |||
| 17 | * Boston, MA 02110-1301, USA. | 17 | * Boston, MA 02110-1301, USA. |
| 18 | */ | 18 | */ |
| 19 | 19 | ||
| 20 | #include <linux/dma-mapping.h> | ||
| 20 | #include <linux/module.h> | 21 | #include <linux/module.h> |
| 21 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
| 22 | #include <linux/serial.h> | 23 | #include <linux/serial.h> |
| 23 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
| 25 | #include <linux/dma-mapping.h> | ||
| 24 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
| 25 | #include <mach/irqs.h> | 27 | #include <mach/irqs.h> |
| 28 | #include <mach/common.h> | ||
| 26 | #include <mach/imx-uart.h> | 29 | #include <mach/imx-uart.h> |
| 30 | #include <mach/mx3_camera.h> | ||
| 27 | 31 | ||
| 28 | #include "devices.h" | 32 | #include "devices.h" |
| 29 | 33 | ||
| @@ -283,6 +287,21 @@ struct platform_device mxcsdhc_device1 = { | |||
| 283 | .num_resources = ARRAY_SIZE(mxcsdhc1_resources), | 287 | .num_resources = ARRAY_SIZE(mxcsdhc1_resources), |
| 284 | .resource = mxcsdhc1_resources, | 288 | .resource = mxcsdhc1_resources, |
| 285 | }; | 289 | }; |
| 290 | |||
| 291 | static struct resource rnga_resources[] = { | ||
| 292 | { | ||
| 293 | .start = RNGA_BASE_ADDR, | ||
| 294 | .end = RNGA_BASE_ADDR + 0x28, | ||
| 295 | .flags = IORESOURCE_MEM, | ||
| 296 | }, | ||
| 297 | }; | ||
| 298 | |||
| 299 | struct platform_device mxc_rnga_device = { | ||
| 300 | .name = "mxc_rnga", | ||
| 301 | .id = -1, | ||
| 302 | .num_resources = 1, | ||
| 303 | .resource = rnga_resources, | ||
| 304 | }; | ||
| 286 | #endif /* CONFIG_ARCH_MX31 */ | 305 | #endif /* CONFIG_ARCH_MX31 */ |
| 287 | 306 | ||
| 288 | /* i.MX31 Image Processing Unit */ | 307 | /* i.MX31 Image Processing Unit */ |
| @@ -329,10 +348,54 @@ struct platform_device mx3_fb = { | |||
| 329 | .num_resources = ARRAY_SIZE(fb_resources), | 348 | .num_resources = ARRAY_SIZE(fb_resources), |
| 330 | .resource = fb_resources, | 349 | .resource = fb_resources, |
| 331 | .dev = { | 350 | .dev = { |
| 332 | .coherent_dma_mask = 0xffffffff, | 351 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 333 | }, | 352 | }, |
| 334 | }; | 353 | }; |
| 335 | 354 | ||
| 355 | static struct resource camera_resources[] = { | ||
| 356 | { | ||
| 357 | .start = IPU_CTRL_BASE_ADDR + 0x60, | ||
| 358 | .end = IPU_CTRL_BASE_ADDR + 0x87, | ||
| 359 | .flags = IORESOURCE_MEM, | ||
| 360 | }, | ||
| 361 | }; | ||
| 362 | |||
| 363 | struct platform_device mx3_camera = { | ||
| 364 | .name = "mx3-camera", | ||
| 365 | .id = 0, | ||
| 366 | .num_resources = ARRAY_SIZE(camera_resources), | ||
| 367 | .resource = camera_resources, | ||
| 368 | .dev = { | ||
| 369 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 370 | }, | ||
| 371 | }; | ||
| 372 | |||
| 373 | static struct resource otg_resources[] = { | ||
| 374 | { | ||
| 375 | .start = OTG_BASE_ADDR, | ||
| 376 | .end = OTG_BASE_ADDR + 0x1ff, | ||
| 377 | .flags = IORESOURCE_MEM, | ||
| 378 | }, { | ||
| 379 | .start = MXC_INT_USB3, | ||
| 380 | .end = MXC_INT_USB3, | ||
| 381 | .flags = IORESOURCE_IRQ, | ||
| 382 | }, | ||
| 383 | }; | ||
| 384 | |||
| 385 | static u64 otg_dmamask = DMA_BIT_MASK(32); | ||
| 386 | |||
| 387 | /* OTG gadget device */ | ||
| 388 | struct platform_device mxc_otg_udc_device = { | ||
| 389 | .name = "fsl-usb2-udc", | ||
| 390 | .id = -1, | ||
| 391 | .dev = { | ||
| 392 | .dma_mask = &otg_dmamask, | ||
| 393 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 394 | }, | ||
| 395 | .resource = otg_resources, | ||
| 396 | .num_resources = ARRAY_SIZE(otg_resources), | ||
| 397 | }; | ||
| 398 | |||
| 336 | #ifdef CONFIG_ARCH_MX35 | 399 | #ifdef CONFIG_ARCH_MX35 |
| 337 | static struct resource mxc_fec_resources[] = { | 400 | static struct resource mxc_fec_resources[] = { |
| 338 | { | 401 | { |
| @@ -359,6 +422,7 @@ static int mx3_devices_init(void) | |||
| 359 | if (cpu_is_mx31()) { | 422 | if (cpu_is_mx31()) { |
| 360 | mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; | 423 | mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; |
| 361 | mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; | 424 | mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; |
| 425 | mxc_register_device(&mxc_rnga_device, NULL); | ||
| 362 | } | 426 | } |
| 363 | if (cpu_is_mx35()) { | 427 | if (cpu_is_mx35()) { |
| 364 | mxc_nand_resources[0].start = MX35_NFC_BASE_ADDR; | 428 | mxc_nand_resources[0].start = MX35_NFC_BASE_ADDR; |
