diff options
Diffstat (limited to 'arch/arm/mach-mx3/pcm037.c')
-rw-r--r-- | arch/arm/mach-mx3/pcm037.c | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c index 840cfda341d0..6cbaabedf386 100644 --- a/arch/arm/mach-mx3/pcm037.c +++ b/arch/arm/mach-mx3/pcm037.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/spi/spi.h> | 32 | #include <linux/spi/spi.h> |
33 | #include <linux/irq.h> | 33 | #include <linux/irq.h> |
34 | #include <linux/fsl_devices.h> | 34 | #include <linux/fsl_devices.h> |
35 | #include <linux/can/platform/sja1000.h> | ||
35 | 36 | ||
36 | #include <media/soc_camera.h> | 37 | #include <media/soc_camera.h> |
37 | 38 | ||
@@ -169,6 +170,8 @@ static unsigned int pcm037_pins[] = { | |||
169 | MX31_PIN_CSI_MCLK__CSI_MCLK, | 170 | MX31_PIN_CSI_MCLK__CSI_MCLK, |
170 | MX31_PIN_CSI_PIXCLK__CSI_PIXCLK, | 171 | MX31_PIN_CSI_PIXCLK__CSI_PIXCLK, |
171 | MX31_PIN_CSI_VSYNC__CSI_VSYNC, | 172 | MX31_PIN_CSI_VSYNC__CSI_VSYNC, |
173 | /* GPIO */ | ||
174 | IOMUX_MODE(MX31_PIN_ATA_DMACK, IOMUX_CONFIG_GPIO), | ||
172 | }; | 175 | }; |
173 | 176 | ||
174 | static struct physmap_flash_data pcm037_flash_data = { | 177 | static struct physmap_flash_data pcm037_flash_data = { |
@@ -244,12 +247,11 @@ static struct imxuart_platform_data uart_pdata = { | |||
244 | }; | 247 | }; |
245 | 248 | ||
246 | static struct resource smsc911x_resources[] = { | 249 | static struct resource smsc911x_resources[] = { |
247 | [0] = { | 250 | { |
248 | .start = CS1_BASE_ADDR + 0x300, | 251 | .start = CS1_BASE_ADDR + 0x300, |
249 | .end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1, | 252 | .end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1, |
250 | .flags = IORESOURCE_MEM, | 253 | .flags = IORESOURCE_MEM, |
251 | }, | 254 | }, { |
252 | [1] = { | ||
253 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | 255 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), |
254 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | 256 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), |
255 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | 257 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
@@ -339,8 +341,7 @@ static struct i2c_board_info pcm037_i2c_devices[] = { | |||
339 | I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */ | 341 | I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */ |
340 | .platform_data = &board_eeprom, | 342 | .platform_data = &board_eeprom, |
341 | }, { | 343 | }, { |
342 | I2C_BOARD_INFO("rtc-pcf8563", 0x51), | 344 | I2C_BOARD_INFO("pcf8563", 0x51), |
343 | .type = "pcf8563", | ||
344 | } | 345 | } |
345 | }; | 346 | }; |
346 | 347 | ||
@@ -515,6 +516,33 @@ static struct mx3fb_platform_data mx3fb_pdata = { | |||
515 | .num_modes = ARRAY_SIZE(fb_modedb), | 516 | .num_modes = ARRAY_SIZE(fb_modedb), |
516 | }; | 517 | }; |
517 | 518 | ||
519 | static struct resource pcm970_sja1000_resources[] = { | ||
520 | { | ||
521 | .start = CS5_BASE_ADDR, | ||
522 | .end = CS5_BASE_ADDR + 0x100 - 1, | ||
523 | .flags = IORESOURCE_MEM, | ||
524 | }, { | ||
525 | .start = IOMUX_TO_IRQ(IOMUX_PIN(48, 105)), | ||
526 | .end = IOMUX_TO_IRQ(IOMUX_PIN(48, 105)), | ||
527 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, | ||
528 | }, | ||
529 | }; | ||
530 | |||
531 | struct sja1000_platform_data pcm970_sja1000_platform_data = { | ||
532 | .clock = 16000000 / 2, | ||
533 | .ocr = 0x40 | 0x18, | ||
534 | .cdr = 0x40, | ||
535 | }; | ||
536 | |||
537 | static struct platform_device pcm970_sja1000 = { | ||
538 | .name = "sja1000_platform", | ||
539 | .dev = { | ||
540 | .platform_data = &pcm970_sja1000_platform_data, | ||
541 | }, | ||
542 | .resource = pcm970_sja1000_resources, | ||
543 | .num_resources = ARRAY_SIZE(pcm970_sja1000_resources), | ||
544 | }; | ||
545 | |||
518 | /* | 546 | /* |
519 | * Board specific initialization. | 547 | * Board specific initialization. |
520 | */ | 548 | */ |
@@ -575,6 +603,8 @@ static void __init mxc_board_init(void) | |||
575 | 603 | ||
576 | if (!pcm037_camera_alloc_dma(4 * 1024 * 1024)) | 604 | if (!pcm037_camera_alloc_dma(4 * 1024 * 1024)) |
577 | mxc_register_device(&mx3_camera, &camera_pdata); | 605 | mxc_register_device(&mx3_camera, &camera_pdata); |
606 | |||
607 | platform_device_register(&pcm970_sja1000); | ||
578 | } | 608 | } |
579 | 609 | ||
580 | static void __init pcm037_timer_init(void) | 610 | static void __init pcm037_timer_init(void) |
@@ -592,7 +622,7 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037") | |||
592 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 622 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
593 | .boot_params = PHYS_OFFSET + 0x100, | 623 | .boot_params = PHYS_OFFSET + 0x100, |
594 | .map_io = mx31_map_io, | 624 | .map_io = mx31_map_io, |
595 | .init_irq = mxc_init_irq, | 625 | .init_irq = mx31_init_irq, |
596 | .init_machine = mxc_board_init, | 626 | .init_machine = mxc_board_init, |
597 | .timer = &pcm037_timer, | 627 | .timer = &pcm037_timer, |
598 | MACHINE_END | 628 | MACHINE_END |