[PATCH 3/6] mx5: add support to dynamically register spi_imx devices (imx51 3ds)

Jason Wang jason77.wang at gmail.com
Thu Sep 2 03:52:01 EDT 2010


Signed-off-by: Jason Wang <jason77.wang at gmail.com>
---
 arch/arm/mach-mx5/Kconfig         |    1 +
 arch/arm/mach-mx5/devices-imx51.h |   20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-mx5/devices-imx51.h

diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig
index 0848db5..898fb47 100644
--- a/arch/arm/mach-mx5/Kconfig
+++ b/arch/arm/mach-mx5/Kconfig
@@ -18,6 +18,7 @@ config MACH_MX51_BABBAGE
 config MACH_MX51_3DS
 	bool "Support MX51PDK (3DS)"
 	select MXC_DEBUG_BOARD
+	select IMX_HAVE_PLATFORM_SPI_IMX
 	help
 	  Include support for MX51PDK (3DS) platform. This includes specific
 	  configurations for the board and its peripherals.
diff --git a/arch/arm/mach-mx5/devices-imx51.h b/arch/arm/mach-mx5/devices-imx51.h
new file mode 100644
index 0000000..d04c7eb
--- /dev/null
+++ b/arch/arm/mach-mx5/devices-imx51.h
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2010 Jason Wang <jason77.wang at gmail.com>
+ *
+ * based on mach-mx3/devices-imx35.h which is
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig at pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/mx51.h>
+#include <mach/devices-common.h>
+
+#define imx51_add_spi_imx0(pdata)	\
+	imx_add_spi_imx(0, MX51_CSPI1_BASE_ADDR, SZ_4K, MX51_MXC_INT_CSPI1, pdata)
+#define imx51_add_spi_imx1(pdata)	\
+	imx_add_spi_imx(1, MX51_CSPI2_BASE_ADDR, SZ_4K, MX51_MXC_INT_CSPI2, pdata)
+#define imx51_add_spi_imx2(pdata)	\
+	imx_add_spi_imx(1, MX51_CSPI3_BASE_ADDR, SZ_4K, MX51_MXC_INT_CSPI, pdata)
-- 
1.5.6.5




More information about the linux-arm-kernel mailing list