summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/devices
diff options
context:
space:
mode:
authorWayne Zou <b36644@freescale.com>2012-04-04 20:38:37 +0800
committerJason Liu <r64343@freescale.com>2012-07-20 13:34:22 +0800
commitf13f2f6245c36709b90454ca1bda9bd9420b04e8 (patch)
treed3c2df6d20fb7f5db6c99694dc311a4b91819624 /arch/arm/plat-mxc/devices
parentff143240d36c3687542ae021ede4eaa5b3fae641 (diff)
downloadlinux-f13f2f6245c36709b90454ca1bda9bd9420b04e8.tar.gz
ENGR00178875-1 VDOA: Add vdoa support on i.MX6 SOC platform
Add vdoa support on i.MX6 SOC platform Signed-off-by: Wayne Zou <b36644@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-imx-vdoa.c60
3 files changed, 64 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig
index 3eead8ebda92..350845eb64f0 100755
--- a/arch/arm/plat-mxc/devices/Kconfig
+++ b/arch/arm/plat-mxc/devices/Kconfig
@@ -169,3 +169,6 @@ config IMX_HAVE_PLATFORM_IMX_MIPI_DSI
config IMX_HAVE_PLATFORM_IMX_MIPI_CSI2
bool
+
+config IMX_HAVE_PLATFORM_IMX_VDOA
+ bool
diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile
index 71cfefa7cccb..f2741caecfca 100755
--- a/arch/arm/plat-mxc/devices/Makefile
+++ b/arch/arm/plat-mxc/devices/Makefile
@@ -61,3 +61,4 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_HDMI) += platform-imx-hdmi-soc-dai.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_ASRC) += platform-imx-asrc.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_MIPI_DSI) += platform-imx-mipi_dsi.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_MIPI_CSI2) += platform-imx-mipi_csi2.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_VDOA) += platform-imx-vdoa.o
diff --git a/arch/arm/plat-mxc/devices/platform-imx-vdoa.c b/arch/arm/plat-mxc/devices/platform-imx-vdoa.c
new file mode 100644
index 000000000000..057fda6b389e
--- /dev/null
+++ b/arch/arm/plat-mxc/devices/platform-imx-vdoa.c
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2012 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>
+
+#define imx_vdoa_data_entry_single(soc, _id, _hwid, size) \
+ { \
+ .id = _id, \
+ .iobase = soc ## _VDOA ## _hwid ## _BASE_ADDR, \
+ .iosize = size, \
+ .irq = soc ## _INT_VDOA ## _hwid, \
+ }
+
+#define imx_vdoa_data_entry(soc, _id, _hwid, _size) \
+ [_id] = imx_vdoa_data_entry_single(soc, _id, _hwid, _size)
+
+#ifdef CONFIG_SOC_IMX6Q
+#define MX6Q_VDOA_BASE_ADDR VDOA_BASE_ADDR
+#define SOC_VDOA_BASE_ADDR MX6Q_VDOA_BASE_ADDR
+#define MX6Q_INT_VDOA MXC_INT_VDOA
+const struct imx_vdoa_data imx6q_vdoa_data __initconst =
+ imx_vdoa_data_entry_single(MX6Q, 0, , SZ_4K);
+#endif
+
+struct platform_device *__init imx_add_vdoa(
+ const struct imx_vdoa_data *data)
+{
+ struct resource res[] = {
+ {
+ .start = data->iobase,
+ .end = data->iobase + data->iosize - 1,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = data->irq,
+ .end = data->irq,
+ .flags = IORESOURCE_IRQ,
+ },
+ };
+
+ return imx_add_platform_device("mxc_vdoa", -1,
+ res, ARRAY_SIZE(res), NULL, 0);
+}