aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/pcm037.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-06-23 07:21:28 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2009-08-07 06:11:09 -0400
commit91bf9a2566a6f507f45ad2fb59802e528f5a9c3f (patch)
treec0b1084e805a5a7d29be2f3889e54549dc93dc19 /arch/arm/mach-mx3/pcm037.c
parent343684ffb793a3c371579b7bbc16724713ee5ac7 (diff)
pcm037: Add support for SJA1000 on baseboard
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3/pcm037.c')
-rw-r--r--arch/arm/mach-mx3/pcm037.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c
index c755c06b75d1..1b9140e23033 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
@@ -514,6 +515,33 @@ static struct mx3fb_platform_data mx3fb_pdata = {
514 .num_modes = ARRAY_SIZE(fb_modedb), 515 .num_modes = ARRAY_SIZE(fb_modedb),
515}; 516};
516 517
518static struct resource pcm970_sja1000_resources[] = {
519 {
520 .start = CS5_BASE_ADDR,
521 .end = CS5_BASE_ADDR + 0x100 - 1,
522 .flags = IORESOURCE_MEM,
523 }, {
524 .start = IOMUX_TO_IRQ(IOMUX_PIN(48, 105)),
525 .end = IOMUX_TO_IRQ(IOMUX_PIN(48, 105)),
526 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
527 },
528};
529
530struct sja1000_platform_data pcm970_sja1000_platform_data = {
531 .clock = 16000000 / 2,
532 .ocr = 0x40 | 0x18,
533 .cdr = 0x40,
534};
535
536static struct platform_device pcm970_sja1000 = {
537 .name = "sja1000_platform",
538 .dev = {
539 .platform_data = &pcm970_sja1000_platform_data,
540 },
541 .resource = pcm970_sja1000_resources,
542 .num_resources = ARRAY_SIZE(pcm970_sja1000_resources),
543};
544
517/* 545/*
518 * Board specific initialization. 546 * Board specific initialization.
519 */ 547 */
@@ -574,6 +602,8 @@ static void __init mxc_board_init(void)
574 602
575 if (!pcm037_camera_alloc_dma(4 * 1024 * 1024)) 603 if (!pcm037_camera_alloc_dma(4 * 1024 * 1024))
576 mxc_register_device(&mx3_camera, &camera_pdata); 604 mxc_register_device(&mx3_camera, &camera_pdata);
605
606 platform_device_register(&pcm970_sja1000);
577} 607}
578 608
579static void __init pcm037_timer_init(void) 609static void __init pcm037_timer_init(void)