[PATCH 4/5] mx35: add flexcan devices
Marc Kleine-Budde
mkl at pengutronix.de
Wed Jul 21 17:59:54 EDT 2010
Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
---
arch/arm/mach-mx3/devices.c | 40 ++++++++++++++++++++++++++++++++++++++++
arch/arm/mach-mx3/devices.h | 2 ++
2 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
index a4fd1a2..a8aa157 100644
--- a/arch/arm/mach-mx3/devices.c
+++ b/arch/arm/mach-mx3/devices.c
@@ -29,6 +29,46 @@
#include "devices.h"
+#ifdef CONFIG_ARCH_MX35
+static struct resource mxc_can_1_resources[] = {
+ {
+ .start = 0x53fe4000,
+ .end = 0x53fe7fff,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = 43,
+ .end = 43,
+ .flags = IORESOURCE_IRQ,
+ }
+};
+
+struct platform_device mxc_can_device0 = {
+ .name = "flexcan",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(mxc_can_1_resources),
+ .resource = mxc_can_1_resources,
+};
+
+static struct resource mxc_can_2_resources[] = {
+ {
+ .start = 0x53fe8000,
+ .end = 0x53feffff,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = 44,
+ .end = 44,
+ .flags = IORESOURCE_IRQ,
+ }
+};
+
+struct platform_device mxc_can_device1 = {
+ .name = "flexcan",
+ .id = 1,
+ .num_resources = ARRAY_SIZE(mxc_can_2_resources),
+ .resource = mxc_can_2_resources,
+};
+#endif /* CONFIG_ARCH_MX35 */
+
/* GPIO port description */
static struct mxc_gpio_port imx_gpio_ports[] = {
{
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h
index e553523..c92bc91 100644
--- a/arch/arm/mach-mx3/devices.h
+++ b/arch/arm/mach-mx3/devices.h
@@ -16,3 +16,5 @@ extern struct platform_device imx_ssi_device1;
extern struct platform_device imx_wdt_device0;
extern struct platform_device imx_rtc_device0;
extern struct platform_device imx_kpp_device;
+extern struct platform_device mxc_can_device0;
+extern struct platform_device mxc_can_device1;
--
1.7.1
More information about the linux-arm-kernel
mailing list