summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorTerry Lv <r65388@freescale.com>2011-08-16 16:04:44 +0800
committerTerry Lv <r65388@freescale.com>2011-08-16 17:01:32 +0800
commitb3f710aa160a9d190c7d6800f74f2da490a048d5 (patch)
tree7a4cbcdad3a1e0e832c2e96d9bc56c071d9de9a0 /arch/arm
parentfc8e7f42bff479718cd40ee37c1dea4434a9e9cb (diff)
ENGR00154889-1: Add virtual iim driver to imx5 and imx6 platform
This patch adds platform changes to system files, including: 1. Add viim platform deivce. 2. Add viim menu. Signed-off-by: Terry Lv <r65388@freescale.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/configs/imx6_defconfig6
-rw-r--r--arch/arm/mach-mx5/Kconfig1
-rw-r--r--arch/arm/mach-mx5/board-mx50_rdp.c1
-rw-r--r--arch/arm/mach-mx5/devices-imx50.h4
-rw-r--r--arch/arm/mach-mx6/Kconfig1
-rw-r--r--arch/arm/mach-mx6/board-mx6q_sabreauto.c1
-rw-r--r--arch/arm/mach-mx6/devices-imx6q.h6
-rw-r--r--arch/arm/plat-mxc/devices/Kconfig3
-rw-r--r--arch/arm/plat-mxc/devices/Makefile1
-rw-r--r--arch/arm/plat-mxc/devices/platform-imx-viim.c45
-rw-r--r--arch/arm/plat-mxc/include/mach/devices-common.h7
11 files changed, 73 insertions, 3 deletions
diff --git a/arch/arm/configs/imx6_defconfig b/arch/arm/configs/imx6_defconfig
index 3ef30a90b404..7c19d2bc8840 100644
--- a/arch/arm/configs/imx6_defconfig
+++ b/arch/arm/configs/imx6_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux/arm 2.6.38 Kernel Configuration
-# Wed Jul 27 13:18:10 2011
+# Tue Aug 16 14:53:37 2011
#
CONFIG_ARM=y
CONFIG_HAVE_PWM=y
@@ -270,6 +270,7 @@ CONFIG_IMX_HAVE_PLATFORM_IMX_IPUV3=y
CONFIG_IMX_HAVE_PLATFORM_IMX_VPU=y
CONFIG_IMX_HAVE_PLATFORM_AHCI=y
CONFIG_IMX_HAVE_PLATFORM_IMX_OCOTP=y
+CONFIG_IMX_HAVE_PLATFORM_IMX_VIIM=y
CONFIG_IMX_HAVE_PLATFORM_LDB=y
CONFIG_IMX_HAVE_PLATFORM_VIV_GPU=y
CONFIG_IMX_HAVE_PLATFORM_MXC_HDMI=y
@@ -290,6 +291,7 @@ CONFIG_IMX_HAVE_PLATFORM_IMX_ASRC=y
# CONFIG_ARCH_MX5 is not set
CONFIG_ARCH_MX6=y
CONFIG_FORCE_MAX_ZONEORDER=13
+CONFIG_DMA_ZONE_SIZE=96
CONFIG_ARCH_MX6Q=y
CONFIG_SOC_IMX6Q=y
CONFIG_MACH_MX6Q_SABREAUTO=y
@@ -303,7 +305,6 @@ CONFIG_MXC_PWM=y
# CONFIG_MXC_DEBUG_BOARD is not set
CONFIG_ARCH_MXC_IOMUX_V3=y
CONFIG_IRAM_ALLOC=y
-CONFIG_DMA_ZONE_SIZE=96
CONFIG_CLK_DEBUG=y
#
@@ -1023,6 +1024,7 @@ CONFIG_HW_RANDOM=y
# CONFIG_RAW_DRIVER is not set
# CONFIG_TCG_TPM is not set
# CONFIG_RAMOOPS is not set
+CONFIG_MXS_VIIM=y
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig
index 6ab106d7aa6f..2ee02647136c 100644
--- a/arch/arm/mach-mx5/Kconfig
+++ b/arch/arm/mach-mx5/Kconfig
@@ -229,6 +229,7 @@ config MACH_MX50_RDP
select IMX_HAVE_PLATFORM_FEC
select IMX_HAVE_PLATFORM_GPMI_NFC
select IMX_HAVE_PLATFORM_IMX_OCOTP
+ select IMX_HAVE_PLATFORM_IMX_VIIM
select IMX_HAVE_PLATFORM_IMX_DCP
select IMX_HAVE_PLATFORM_RANDOM_RNGC
select IMX_HAVE_PLATFORM_PERFMON
diff --git a/arch/arm/mach-mx5/board-mx50_rdp.c b/arch/arm/mach-mx5/board-mx50_rdp.c
index 498f320d94f7..8ea5a4a9bbaa 100644
--- a/arch/arm/mach-mx5/board-mx50_rdp.c
+++ b/arch/arm/mach-mx5/board-mx50_rdp.c
@@ -846,6 +846,7 @@ static void __init mx50_rdp_board_init(void)
imx50_add_sdhci_esdhc_imx(1, &mx50_rdp_sd2_data);
imx50_add_sdhci_esdhc_imx(2, &mx50_rdp_sd3_data);
imx50_add_otp();
+ imx50_add_viim();
imx50_add_dcp();
imx50_add_rngb();
imx50_add_perfmon();
diff --git a/arch/arm/mach-mx5/devices-imx50.h b/arch/arm/mach-mx5/devices-imx50.h
index 74b4988f6ab3..09df1a288676 100644
--- a/arch/arm/mach-mx5/devices-imx50.h
+++ b/arch/arm/mach-mx5/devices-imx50.h
@@ -63,6 +63,10 @@ extern const struct imx_otp_data imx50_otp_data __initconst;
#define imx50_add_otp() \
imx_add_otp(&imx50_otp_data);
+extern const struct imx_viim_data imx50_viim_data __initconst;
+#define imx50_add_viim() \
+ imx_add_viim(&imx50_viim_data)
+
extern const struct imx_dcp_data imx50_dcp_data __initconst;
#define imx50_add_dcp() \
imx_add_dcp(&imx50_dcp_data);
diff --git a/arch/arm/mach-mx6/Kconfig b/arch/arm/mach-mx6/Kconfig
index 847e6ab0af1b..8d0d3c766046 100644
--- a/arch/arm/mach-mx6/Kconfig
+++ b/arch/arm/mach-mx6/Kconfig
@@ -40,6 +40,7 @@ config MACH_MX6Q_SABREAUTO
select IMX_HAVE_PLATFORM_FSL_USB_WAKEUP
select IMX_HAVE_PLATFORM_AHCI
select IMX_HAVE_PLATFORM_IMX_OCOTP
+ select IMX_HAVE_PLATFORM_IMX_VIIM
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_SNVS_RTC
select IMX_HAVE_PLATFORM_IMX_PM
diff --git a/arch/arm/mach-mx6/board-mx6q_sabreauto.c b/arch/arm/mach-mx6/board-mx6q_sabreauto.c
index 80d769533c04..4eebd2ba728f 100644
--- a/arch/arm/mach-mx6/board-mx6q_sabreauto.c
+++ b/arch/arm/mach-mx6/board-mx6q_sabreauto.c
@@ -739,6 +739,7 @@ static void __init mx6_board_init(void)
gpio_request(MX6Q_SABREAUTO_LDB_BACKLIGHT, "ldb-backlight");
gpio_direction_output(MX6Q_SABREAUTO_LDB_BACKLIGHT, 1);
imx6q_add_otp();
+ imx6q_add_viim();
imx6q_add_imx2_wdt(0, NULL);
imx6q_add_dma();
imx6q_add_gpmi(&mx6q_gpmi_nfc_platform_data);
diff --git a/arch/arm/mach-mx6/devices-imx6q.h b/arch/arm/mach-mx6/devices-imx6q.h
index 8e790c72f423..c9cf454629f1 100644
--- a/arch/arm/mach-mx6/devices-imx6q.h
+++ b/arch/arm/mach-mx6/devices-imx6q.h
@@ -117,7 +117,11 @@ extern const struct imx_vpu_data imx6q_vpu_data __initconst;
extern const struct imx_otp_data imx6q_otp_data __initconst;
#define imx6q_add_otp() \
- imx_add_otp(&imx6q_otp_data);
+ imx_add_otp(&imx6q_otp_data)
+
+extern const struct imx_viim_data imx6q_viim_data __initconst;
+#define imx6q_add_viim() \
+ imx_add_viim(&imx6q_viim_data)
extern const struct imx_imx2_wdt_data imx6q_imx2_wdt_data[] __initconst;
#define imx6q_add_imx2_wdt(id, pdata) \
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig
index 3d6c53fe2974..06b383aa32ec 100644
--- a/arch/arm/plat-mxc/devices/Kconfig
+++ b/arch/arm/plat-mxc/devices/Kconfig
@@ -110,6 +110,9 @@ config IMX_HAVE_PLATFORM_MXC_GPU
config IMX_HAVE_PLATFORM_IMX_OCOTP
bool
+config IMX_HAVE_PLATFORM_IMX_VIIM
+ bool
+
config IMX_HAVE_PLATFORM_IMX_DCP
bool
diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile
index 00d5f5160895..d4c1b24c9bad 100644
--- a/arch/arm/plat-mxc/devices/Makefile
+++ b/arch/arm/plat-mxc/devices/Makefile
@@ -35,6 +35,7 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) += platform-ahci-imx.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_IIM) += platform-imx-iim.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_GPU) += platform-mxc_gpu.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_OCOTP) += platform-imx-ocotp.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_VIIM) += platform-imx-viim.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_DCP) += platform-imx-dcp.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_RANDOM_RNGC) += platform-imx-rngb.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_PERFMON) += platform-imx-perfmon.o
diff --git a/arch/arm/plat-mxc/devices/platform-imx-viim.c b/arch/arm/plat-mxc/devices/platform-imx-viim.c
new file mode 100644
index 000000000000..1abc2acb0fdd
--- /dev/null
+++ b/arch/arm/plat-mxc/devices/platform-imx-viim.c
@@ -0,0 +1,45 @@
+/*
+ * 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 version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include <mach/devices-common.h>
+#include <linux/fsl_devices.h>
+
+#ifdef CONFIG_SOC_IMX51
+#define GPT_REG_BASE_ADDR (MX50_GPT1_BASE_ADDR)
+const struct imx_viim_data imx50_viim_data = {
+ .iobase = MX50_OCOTP_CTRL_BASE_ADDR,
+};
+#endif
+
+#ifdef CONFIG_SOC_IMX6Q
+#define GPT_REG_BASE_ADDR (GPT_BASE_ADDR)
+const struct imx_viim_data imx6q_viim_data = {
+ .iobase = OCOTP_BASE_ADDR,
+};
+#endif
+
+struct platform_device *__init imx_add_viim(
+ const struct imx_viim_data *data)
+{
+ struct resource res[] = {
+ [0] = {
+ .start = GPT_REG_BASE_ADDR,
+ .end = GPT_REG_BASE_ADDR + PAGE_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = data->iobase,
+ .end = data->iobase + PAGE_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ };
+
+ return imx_add_platform_device("mxs-viim", 0,
+ res, ARRAY_SIZE(res), NULL, 0);
+}
+
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h
index b06cc6b6f292..b1803be4db94 100644
--- a/arch/arm/plat-mxc/include/mach/devices-common.h
+++ b/arch/arm/plat-mxc/include/mach/devices-common.h
@@ -394,6 +394,13 @@ struct imx_otp_data {
struct platform_device *__init imx_add_otp(
const struct imx_otp_data *data);
+struct imx_viim_data {
+ resource_size_t iobase;
+};
+
+struct platform_device *__init imx_add_viim(
+ const struct imx_viim_data *data);
+
struct imx_dcp_data {
resource_size_t iobase;
resource_size_t irq1;