diff options
author | Liu Ying <b17645@freescale.com> | 2009-06-26 11:32:29 +0800 |
---|---|---|
committer | Liu Ying <b17645@freescale.com> | 2009-06-26 11:32:29 +0800 |
commit | 6daa7dacc9fbde6d2fe35a501ff566900eb45c63 (patch) | |
tree | 1c338f5960eaf4b637a30d2cdd7c8047be49e3fa /arch/arm/mach-mx25 | |
parent | 833371e7abd32be56d22adb9c29b563ffe426d80 (diff) |
ENGR00113743 MX25:Support IIM driver
1) Support IIM driver for MX25.
2) Build in IIM driver with defconfig for MX25.
Signed-off-by: Liu Ying <b17645@freescale.com>
Diffstat (limited to 'arch/arm/mach-mx25')
-rw-r--r-- | arch/arm/mach-mx25/cpu.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-mx25/devices.c | 32 |
2 files changed, 57 insertions, 0 deletions
diff --git a/arch/arm/mach-mx25/cpu.c b/arch/arm/mach-mx25/cpu.c index 5f24d825b309..27791da4787b 100644 --- a/arch/arm/mach-mx25/cpu.c +++ b/arch/arm/mach-mx25/cpu.c @@ -23,6 +23,7 @@ #include <linux/kernel.h> #include <linux/init.h> #include <mach/hardware.h> +#include <asm/io.h> /*! * CPU initialization. It is called by fixup_mxc_board() @@ -32,3 +33,27 @@ void __init mxc_cpu_init(void) if (!system_rev) mxc_set_system_rev(0x25, CHIP_REV_1_0); } + +static int __init post_cpu_init(void) +{ + unsigned int base, reg; + + base = IO_ADDRESS(AIPS1_BASE_ADDR); + __raw_writel(0x0, base + 0x40); + __raw_writel(0x0, base + 0x44); + __raw_writel(0x0, base + 0x48); + __raw_writel(0x0, base + 0x4C); + reg = __raw_readl(base + 0x50) & 0x00FFFFFF; + __raw_writel(reg, base + 0x50); + + base = IO_ADDRESS(AIPS2_BASE_ADDR); + __raw_writel(0x0, base + 0x40); + __raw_writel(0x0, base + 0x44); + __raw_writel(0x0, base + 0x48); + __raw_writel(0x0, base + 0x4C); + reg = __raw_readl(base + 0x50) & 0x00FFFFFF; + __raw_writel(reg, base + 0x50); + + return 0; +} +postcore_initcall(post_cpu_init); diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c index ef06710c297f..7ef7824c73df 100644 --- a/arch/arm/mach-mx25/devices.c +++ b/arch/arm/mach-mx25/devices.c @@ -556,6 +556,37 @@ static void mxc_init_surround_audio(void) platform_device_register(&mxc_alsa_surround_device); } +#if defined(CONFIG_MXC_IIM) || defined(CONFIG_MXC_IIM_MODULE) +static struct resource mxc_iim_resources[] = { + { + .start = IIM_BASE_ADDR, + .end = IIM_BASE_ADDR + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device mxc_iim_device = { + .name = "mxc_iim", + .id = 0, + .dev = { + .release = mxc_nop_release, + }, + .num_resources = ARRAY_SIZE(mxc_iim_resources), + .resource = mxc_iim_resources +}; + +static inline void mxc_init_iim(void) +{ + if (platform_device_register(&mxc_iim_device) < 0) + dev_err(&mxc_iim_device.dev, + "Unable to register mxc iim device\n"); +} +#else +static inline void mxc_init_iim(void) +{ +} +#endif + static int __init mxc_init_devices(void) { mxc_init_wdt(); @@ -567,6 +598,7 @@ static int __init mxc_init_devices(void) mxc_init_rtc(); imx_init_adc(); mxc_init_flexcan(); + mxc_init_iim(); return 0; } |