diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2010-04-16 09:53:23 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-10-22 03:48:44 -0400 |
commit | bf80caf4f14010f73cd4f14b49bba8fe6ae94046 (patch) | |
tree | 733da72e116b3cfb75e322fd2234b8452e4593a6 /arch/blackfin/mach-bf548 | |
parent | 7ba80063e90302287625a105c546c2fc318fcfbf (diff) |
Blackfin: cm-bf548: add support for Socket CAN
Add platform resources for the on-chip CAN peripheral so we can use it.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf548')
-rw-r--r-- | arch/blackfin/mach-bf548/boards/cm_bf548.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c index 0c38eec9ade1..6162833167e9 100644 --- a/arch/blackfin/mach-bf548/boards/cm_bf548.c +++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c | |||
@@ -753,6 +753,44 @@ static struct platform_device bf54x_sdh_device = { | |||
753 | }; | 753 | }; |
754 | #endif | 754 | #endif |
755 | 755 | ||
756 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) | ||
757 | unsigned short bfin_can_peripherals[] = { | ||
758 | P_CAN0_RX, P_CAN0_TX, 0 | ||
759 | }; | ||
760 | |||
761 | static struct resource bfin_can_resources[] = { | ||
762 | { | ||
763 | .start = 0xFFC02A00, | ||
764 | .end = 0xFFC02FFF, | ||
765 | .flags = IORESOURCE_MEM, | ||
766 | }, | ||
767 | { | ||
768 | .start = IRQ_CAN0_RX, | ||
769 | .end = IRQ_CAN0_RX, | ||
770 | .flags = IORESOURCE_IRQ, | ||
771 | }, | ||
772 | { | ||
773 | .start = IRQ_CAN0_TX, | ||
774 | .end = IRQ_CAN0_TX, | ||
775 | .flags = IORESOURCE_IRQ, | ||
776 | }, | ||
777 | { | ||
778 | .start = IRQ_CAN0_ERROR, | ||
779 | .end = IRQ_CAN0_ERROR, | ||
780 | .flags = IORESOURCE_IRQ, | ||
781 | }, | ||
782 | }; | ||
783 | |||
784 | static struct platform_device bfin_can_device = { | ||
785 | .name = "bfin_can", | ||
786 | .num_resources = ARRAY_SIZE(bfin_can_resources), | ||
787 | .resource = bfin_can_resources, | ||
788 | .dev = { | ||
789 | .platform_data = &bfin_can_peripherals, /* Passed to driver */ | ||
790 | }, | ||
791 | }; | ||
792 | #endif | ||
793 | |||
756 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | 794 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
757 | static struct mtd_partition para_partitions[] = { | 795 | static struct mtd_partition para_partitions[] = { |
758 | { | 796 | { |
@@ -1152,6 +1190,11 @@ static struct platform_device *cm_bf548_devices[] __initdata = { | |||
1152 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | 1190 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
1153 | ¶_flash_device, | 1191 | ¶_flash_device, |
1154 | #endif | 1192 | #endif |
1193 | |||
1194 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) | ||
1195 | &bfin_can_device, | ||
1196 | #endif | ||
1197 | |||
1155 | }; | 1198 | }; |
1156 | 1199 | ||
1157 | static int __init cm_bf548_init(void) | 1200 | static int __init cm_bf548_init(void) |