diff options
author | Terry Lv <r65388@freescale.com> | 2011-08-16 16:04:44 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-01-09 20:23:16 +0800 |
commit | 8dc22327a10b45896f630a4868b82417a8cb3f55 (patch) | |
tree | 055ce33b043b49533a3615ebc249f1dc20c9dc99 /arch/arm/plat-mxc | |
parent | cb9b8a45b67baef7020575ef0e7699078d569d05 (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/plat-mxc')
-rwxr-xr-x | arch/arm/plat-mxc/devices/Kconfig | 3 | ||||
-rwxr-xr-x | arch/arm/plat-mxc/devices/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-imx-viim.c | 45 | ||||
-rwxr-xr-x | arch/arm/plat-mxc/include/mach/devices-common.h | 7 |
4 files changed, 56 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig index b076058a5c49..3be72bcf3568 100755 --- a/arch/arm/plat-mxc/devices/Kconfig +++ b/arch/arm/plat-mxc/devices/Kconfig @@ -116,6 +116,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 5073906e2f48..f1bac4b0a7fc 100755 --- a/arch/arm/plat-mxc/devices/Makefile +++ b/arch/arm/plat-mxc/devices/Makefile @@ -37,6 +37,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 370e681bf022..0eaddcdc1bc8 100755 --- a/arch/arm/plat-mxc/include/mach/devices-common.h +++ b/arch/arm/plat-mxc/include/mach/devices-common.h @@ -513,6 +513,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; |