diff options
author | Barry Song <barry.song@analog.com> | 2009-11-02 07:29:07 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-12-15 00:16:38 -0500 |
commit | 706a01b1c6d50b0940ca31d2dc21ba54f095f5af (patch) | |
tree | e51ae118ecb0f20febca0e9dea54148c57ce4d67 /arch/blackfin/mach-bf537/boards/stamp.c | |
parent | 1f13f2fdca71408ad211936b85e673b72e91911a (diff) | |
download | blackbird-op-linux-706a01b1c6d50b0940ca31d2dc21ba54f095f5af.tar.gz blackbird-op-linux-706a01b1c6d50b0940ca31d2dc21ba54f095f5af.zip |
Blackfin: bf537-stamp: add CAN resources
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf537/boards/stamp.c')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 187e6fd76968..70349d3817e0 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c @@ -302,6 +302,44 @@ static struct platform_device isp1362_hcd_device = { }; #endif +#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) +unsigned short bfin_can_peripherals[] = { + P_CAN0_RX, P_CAN0_TX, 0 +}; + +static struct resource bfin_can_resources[] = { + { + .start = 0xFFC02A00, + .end = 0xFFC02FFF, + .flags = IORESOURCE_MEM, + }, + { + .start = IRQ_CAN_RX, + .end = IRQ_CAN_RX, + .flags = IORESOURCE_IRQ, + }, + { + .start = IRQ_CAN_TX, + .end = IRQ_CAN_TX, + .flags = IORESOURCE_IRQ, + }, + { + .start = IRQ_CAN_ERROR, + .end = IRQ_CAN_ERROR, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device bfin_can_device = { + .name = "bfin_can", + .num_resources = ARRAY_SIZE(bfin_can_resources), + .resource = bfin_can_resources, + .dev = { + .platform_data = &bfin_can_peripherals, /* Passed to driver */ + }, +}; +#endif + #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) static struct platform_device bfin_mii_bus = { .name = "bfin_mii_bus", @@ -1675,6 +1713,10 @@ static struct platform_device *stamp_devices[] __initdata = { &ax88180_device, #endif +#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) + &bfin_can_device, +#endif + #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) &bfin_mii_bus, &bfin_mac_device, |