diff options
author | Aaron Wu <aaronwu06@gmail.com> | 2010-12-22 01:21:03 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-03-18 03:49:24 -0400 |
commit | 4c131c8c23eeb90d0fe93bd490ffd63ff0f97d10 (patch) | |
tree | 49cdbdd33e7cec926a518533b7294211be18f4d7 /arch/blackfin/mach-bf548/boards/ezkit.c | |
parent | 55835175a03392d2e4d9bff9d482312d118f304e (diff) |
Blackfin: bf548-ezkit: add CAN1 support
Signed-off-by: Aaron Wu <aaronwu06@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf548/boards/ezkit.c')
-rw-r--r-- | arch/blackfin/mach-bf548/boards/ezkit.c | 55 |
1 files changed, 48 insertions, 7 deletions
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index ce5a2bb147dc..93e19a54a880 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -778,11 +778,12 @@ static struct platform_device bfin_sport3_uart_device = { | |||
778 | #endif | 778 | #endif |
779 | 779 | ||
780 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) | 780 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) |
781 | static unsigned short bfin_can_peripherals[] = { | 781 | |
782 | static unsigned short bfin_can0_peripherals[] = { | ||
782 | P_CAN0_RX, P_CAN0_TX, 0 | 783 | P_CAN0_RX, P_CAN0_TX, 0 |
783 | }; | 784 | }; |
784 | 785 | ||
785 | static struct resource bfin_can_resources[] = { | 786 | static struct resource bfin_can0_resources[] = { |
786 | { | 787 | { |
787 | .start = 0xFFC02A00, | 788 | .start = 0xFFC02A00, |
788 | .end = 0xFFC02FFF, | 789 | .end = 0xFFC02FFF, |
@@ -805,14 +806,53 @@ static struct resource bfin_can_resources[] = { | |||
805 | }, | 806 | }, |
806 | }; | 807 | }; |
807 | 808 | ||
808 | static struct platform_device bfin_can_device = { | 809 | static struct platform_device bfin_can0_device = { |
809 | .name = "bfin_can", | 810 | .name = "bfin_can", |
810 | .num_resources = ARRAY_SIZE(bfin_can_resources), | 811 | .id = 0, |
811 | .resource = bfin_can_resources, | 812 | .num_resources = ARRAY_SIZE(bfin_can0_resources), |
813 | .resource = bfin_can0_resources, | ||
812 | .dev = { | 814 | .dev = { |
813 | .platform_data = &bfin_can_peripherals, /* Passed to driver */ | 815 | .platform_data = &bfin_can0_peripherals, /* Passed to driver */ |
814 | }, | 816 | }, |
815 | }; | 817 | }; |
818 | |||
819 | static unsigned short bfin_can1_peripherals[] = { | ||
820 | P_CAN1_RX, P_CAN1_TX, 0 | ||
821 | }; | ||
822 | |||
823 | static struct resource bfin_can1_resources[] = { | ||
824 | { | ||
825 | .start = 0xFFC03200, | ||
826 | .end = 0xFFC037FF, | ||
827 | .flags = IORESOURCE_MEM, | ||
828 | }, | ||
829 | { | ||
830 | .start = IRQ_CAN1_RX, | ||
831 | .end = IRQ_CAN1_RX, | ||
832 | .flags = IORESOURCE_IRQ, | ||
833 | }, | ||
834 | { | ||
835 | .start = IRQ_CAN1_TX, | ||
836 | .end = IRQ_CAN1_TX, | ||
837 | .flags = IORESOURCE_IRQ, | ||
838 | }, | ||
839 | { | ||
840 | .start = IRQ_CAN1_ERROR, | ||
841 | .end = IRQ_CAN1_ERROR, | ||
842 | .flags = IORESOURCE_IRQ, | ||
843 | }, | ||
844 | }; | ||
845 | |||
846 | static struct platform_device bfin_can1_device = { | ||
847 | .name = "bfin_can", | ||
848 | .id = 1, | ||
849 | .num_resources = ARRAY_SIZE(bfin_can1_resources), | ||
850 | .resource = bfin_can1_resources, | ||
851 | .dev = { | ||
852 | .platform_data = &bfin_can1_peripherals, /* Passed to driver */ | ||
853 | }, | ||
854 | }; | ||
855 | |||
816 | #endif | 856 | #endif |
817 | 857 | ||
818 | #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) | 858 | #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) |
@@ -1366,7 +1406,8 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
1366 | #endif | 1406 | #endif |
1367 | 1407 | ||
1368 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) | 1408 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) |
1369 | &bfin_can_device, | 1409 | &bfin_can0_device, |
1410 | &bfin_can1_device, | ||
1370 | #endif | 1411 | #endif |
1371 | 1412 | ||
1372 | #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) | 1413 | #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) |