diff options
author | Robby Cai <R63905@freescale.com> | 2010-03-23 18:40:46 +0800 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-05-25 11:20:16 +0200 |
commit | 36b6880f6503d80a643f32d9dc48e2851660c19c (patch) | |
tree | a8942c189f25ae3568ac81dc0e3818cf148e4ec7 /arch/arm/mach-mx23 | |
parent | f8b9ddfb326707d4c222843c81ae2ba50f31b481 (diff) |
ENGR00121886 Port VIIM driver to new MSL
Port VIIM driver to new MSL
Signed-off-by: Robby Cai <R63905@freescale.com>
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'arch/arm/mach-mx23')
-rw-r--r-- | arch/arm/mach-mx23/device.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-mx23/device.c b/arch/arm/mach-mx23/device.c index 7d504365ddd4..b480c2b73e1c 100644 --- a/arch/arm/mach-mx23/device.c +++ b/arch/arm/mach-mx23/device.c @@ -194,6 +194,38 @@ static void __init mx23_init_pxp(void) } #endif +#if defined(CONFIG_MXS_VIIM) || defined(CONFIG_MXS_VIIM_MODULE) +struct resource viim_resources[] = { + [0] = { + .start = DIGCTL_PHYS_ADDR, + .end = DIGCTL_PHYS_ADDR + PAGE_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = OCOTP_PHYS_ADDR, + .end = OCOTP_PHYS_ADDR + PAGE_SIZE - 1, + .flags = IORESOURCE_MEM, + }, +}; +static void __init mx23_init_viim(void) +{ + struct platform_device *pdev; + + pdev = mxs_get_device("mxs_viim", 0); + if (pdev == NULL || IS_ERR(pdev)) + return; + + pdev->resource = viim_resources; + pdev->num_resources = ARRAY_SIZE(viim_resources); + + mxs_add_device(pdev, 2); +} +#else +static void __init mx23_init_viim(void) +{ +} +#endif + #if defined(CONFIG_I2C_MXS) || \ defined(CONFIG_I2C_MXS_MODULE) static struct resource i2c_resource[] = { @@ -690,6 +722,7 @@ static void mx23_init_battery(void) int __init mx23_device_init(void) { mx23_init_dma(); + mx23_init_viim(); mx23_init_duart(); mx23_init_auart(); mx23_init_lradc(); |