diff options
author | Jason Chen <b02280@freescale.com> | 2010-03-24 16:07:56 +0800 |
---|---|---|
committer | Jason Chen <b02280@freescale.com> | 2010-03-25 09:20:25 +0800 |
commit | 2213900dfd2effbef71d1ae768e5304accb5aaf4 (patch) | |
tree | b30a84cd3422092f58e03abedef84483c7b045e9 /arch | |
parent | 49ca33c6e4898d39e95adb420bbe796f436b9bfb (diff) |
ENGR00121922 ipuv3: move ipu reset function to MSL
move ipu reset function to MSL.
Signed-off-by: Jason Chen <b02280@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mx37/devices.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-mx5/cpu.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-mx5/mx51_3stack.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx5/mx51_babbage.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx5/mx53_evk.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mxc.h | 1 |
6 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/mach-mx37/devices.c b/arch/arm/mach-mx37/devices.c index 6c8ee6fe5ceb..dfb954a08339 100644 --- a/arch/arm/mach-mx37/devices.c +++ b/arch/arm/mach-mx37/devices.c @@ -194,8 +194,23 @@ static inline void mxc_init_wdt(void) #endif #if defined(CONFIG_MXC_IPU_V3) || defined(CONFIG_MXC_IPU_V3_MODULE) +/*! + * This function resets IPU + */ +void mx37_ipu_reset(void) +{ + u32 *reg; + u32 value; + reg = ioremap(SRC_BASE_ADDR, PAGE_SIZE); + value = __raw_readl(reg); + value = value | 0x8; + __raw_writel(value, reg); + iounmap(reg); +} + static struct mxc_ipu_config mxc_ipu_data = { .rev = 1, + .reset = mx37_ipu_reset, }; static struct resource ipu_resources[] = { diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c index b45f2e9578a7..692d258a4a0c 100644 --- a/arch/arm/mach-mx5/cpu.c +++ b/arch/arm/mach-mx5/cpu.c @@ -63,6 +63,20 @@ static void __init mipi_hsc_disable(void) iounmap(reg_hsc_mcd); } +/*! + * This function resets IPU + */ +void mx5_ipu_reset(void) +{ + u32 *reg; + u32 value; + reg = ioremap(MX53_BASE_ADDR(SRC_BASE_ADDR), PAGE_SIZE); + value = __raw_readl(reg); + value = value | 0x8; + __raw_writel(value, reg); + iounmap(reg); +} + void mx5_vpu_reset(void) { u32 reg; diff --git a/arch/arm/mach-mx5/mx51_3stack.c b/arch/arm/mach-mx5/mx51_3stack.c index c1a2c5f732d6..8b78ebef0320 100644 --- a/arch/arm/mach-mx5/mx51_3stack.c +++ b/arch/arm/mach-mx5/mx51_3stack.c @@ -136,8 +136,10 @@ static struct platform_pwm_backlight_data mxc_pwm_backlight_data = { .pwm_period_ns = 78770, }; +extern void mx5_ipu_reset(void); static struct mxc_ipu_config mxc_ipu_data = { .rev = 2, + .reset = mx5_ipu_reset, }; extern void mx5_vpu_reset(void); diff --git a/arch/arm/mach-mx5/mx51_babbage.c b/arch/arm/mach-mx5/mx51_babbage.c index 9922f5532fce..f44489a806c8 100644 --- a/arch/arm/mach-mx5/mx51_babbage.c +++ b/arch/arm/mach-mx5/mx51_babbage.c @@ -155,8 +155,10 @@ static struct platform_pwm_backlight_data mxc_pwm_backlight_data = { .pwm_period_ns = 78770, }; +extern void mx5_ipu_reset(void); static struct mxc_ipu_config mxc_ipu_data = { .rev = 2, + .reset = mx5_ipu_reset, }; extern void mx5_vpu_reset(void); diff --git a/arch/arm/mach-mx5/mx53_evk.c b/arch/arm/mach-mx5/mx53_evk.c index db1d6ea1b0b7..c30b887678ae 100644 --- a/arch/arm/mach-mx5/mx53_evk.c +++ b/arch/arm/mach-mx5/mx53_evk.c @@ -150,8 +150,10 @@ static struct platform_pwm_backlight_data mxc_pwm_backlight_data = { .pwm_period_ns = 78770, }; +extern void mx5_ipu_reset(void); static struct mxc_ipu_config mxc_ipu_data = { .rev = 3, + .reset = mx5_ipu_reset, }; extern void mx5_vpu_reset(void); diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h index 8ea728f51356..d9730023bbb9 100644 --- a/arch/arm/plat-mxc/include/mach/mxc.h +++ b/arch/arm/plat-mxc/include/mach/mxc.h @@ -220,6 +220,7 @@ struct mxc_spi_master { struct mxc_ipu_config { int rev; + void (*reset) (void); struct clk *di_clk[2]; }; |