summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/devices
diff options
context:
space:
mode:
authorTerry Lv <r65388@freescale.com>2011-12-26 12:16:20 +0800
committerJason Liu <r64343@freescale.com>2012-07-20 13:19:29 +0800
commit0d6aa8d4df3c01a97ed777253005ff7caf7400d2 (patch)
treef30b719fd29c91a53199eef446aba6ce0d267aa7 /arch/arm/plat-mxc/devices
parentb529f997172e35ac96630dafde9c5087f746cbf5 (diff)
downloadlinux-0d6aa8d4df3c01a97ed777253005ff7caf7400d2.tar.gz
ENGR00139278-1: Add MLB driver board level code for mx6q
Add board level code for mlb, including platform data, clock, etc. Signed-off-by: Terry Lv <r65388@freescale.com>
Diffstat (limited to 'arch/arm/plat-mxc/devices')
-rwxr-xr-xarch/arm/plat-mxc/devices/Kconfig3
-rwxr-xr-xarch/arm/plat-mxc/devices/Makefile1
-rw-r--r--arch/arm/plat-mxc/devices/platform-mxc_mlb.c71
3 files changed, 75 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig
index fa09bfbc3341..3eead8ebda92 100755
--- a/arch/arm/plat-mxc/devices/Kconfig
+++ b/arch/arm/plat-mxc/devices/Kconfig
@@ -1,6 +1,9 @@
config IMX_HAVE_PLATFORM_DMA
bool
+config IMX_HAVE_PLATFORM_MXC_MLB
+ bool
+
config IMX_HAVE_PLATFORM_FEC
bool
default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX51 || SOC_IMX53
diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile
index f453b048c5ad..71cfefa7cccb 100755
--- a/arch/arm/plat-mxc/devices/Makefile
+++ b/arch/arm/plat-mxc/devices/Makefile
@@ -1,4 +1,5 @@
obj-$(CONFIG_IMX_HAVE_PLATFORM_DMA) += platform-dma.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_MLB) += platform-mxc_mlb.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_FEC) += platform-fec.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_FSL_USB2_UDC) += platform-fsl-usb2-udc.o
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_mlb.c b/arch/arm/plat-mxc/devices/platform-mxc_mlb.c
new file mode 100644
index 000000000000..a1ede415ed81
--- /dev/null
+++ b/arch/arm/plat-mxc/devices/platform-mxc_mlb.c
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#include <mach/hardware.h>
+#include <mach/devices-common.h>
+
+#ifdef CONFIG_SOC_IMX53
+struct platform_device *__init imx_add_mlb(
+ const struct mxc_mlb_platform_data *pdata)
+{
+ struct resource res[] = {
+ {
+ .start = MX53_MLB_BASE_ADDR,
+ .end = MX53_MLB_BASE_ADDR + SZ_4K - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .start = MX53_INT_MLB,
+ .end = MX53_INT_MLB,
+ .flags = IORESOURCE_IRQ,
+ },
+ };
+ return imx_add_platform_device("mxc_mlb", 0,
+ res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
+}
+#endif /* ifdef CONFIG_SOC_IMX53 */
+
+#ifdef CONFIG_SOC_IMX6Q
+struct platform_device *__init imx_add_mlb(
+ const struct mxc_mlb_platform_data *pdata)
+{
+ struct resource res[] = {
+ {
+ .start = MLB_BASE_ADDR,
+ .end = MLB_BASE_ADDR + SZ_4K - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .start = MXC_INT_MLB,
+ .end = MXC_INT_MLB,
+ .flags = IORESOURCE_IRQ,
+ },
+ {
+ .start = MXC_INT_MLB_AHB0,
+ .end = MXC_INT_MLB_AHB0,
+ .flags = IORESOURCE_IRQ,
+ },
+ {
+ .start = MXC_INT_MLB_AHB1,
+ .end = MXC_INT_MLB_AHB1,
+ .flags = IORESOURCE_IRQ,
+ },
+ };
+ return imx_add_platform_device("mxc_mlb150", 0,
+ res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
+}
+#endif