summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/devices
diff options
context:
space:
mode:
authorSammy He <r62914@freescale.com>2011-10-22 00:45:25 +0800
committerJason Liu <r64343@freescale.com>2012-01-09 21:02:08 +0800
commit3035f11504b3e2eb2d285a056cf65e4e54abcd3e (patch)
tree81e7138933a3964c21a4c0fff3450ea4f5a2fc52 /arch/arm/plat-mxc/devices
parent8faa726144d48b57985577d8e5acd176149959c7 (diff)
ENGR00160547 vpu: Add vpu_reset function in arch/arm for i.mx6q
Add vpu hardware reset function for i.mx6q platform. Signed-off-by: Sammy He <r62914@freescale.com>
Diffstat (limited to 'arch/arm/plat-mxc/devices')
-rwxr-xr-xarch/arm/plat-mxc/devices/platform-imx_vpu.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-imx_vpu.c b/arch/arm/plat-mxc/devices/platform-imx_vpu.c
index b4edb91c12ed..ed30bc7882b8 100755
--- a/arch/arm/plat-mxc/devices/platform-imx_vpu.c
+++ b/arch/arm/plat-mxc/devices/platform-imx_vpu.c
@@ -110,9 +110,30 @@ const struct imx_vpu_data imx53_vpu_data __initconst =
#endif
#ifdef CONFIG_SOC_IMX6Q
+void mx6q_vpu_reset(void)
+{
+ u32 reg;
+ void __iomem *src_base;
+
+ src_base = ioremap(SRC_BASE_ADDR, PAGE_SIZE);
+
+ /* mask interrupt due to vpu passed reset */
+ reg = __raw_readl(src_base + 0x18);
+ reg |= 0x02;
+ __raw_writel(reg, src_base + 0x18);
+
+ reg = __raw_readl(src_base);
+ reg |= 0x5; /* warm reset vpu */
+ __raw_writel(reg, src_base);
+ while (__raw_readl(src_base) & 0x04)
+ ;
+
+ iounmap(src_base);
+}
+
const struct imx_vpu_data imx6q_vpu_data __initconst =
imx6_vpu_data_entry_single(MX6Q,
- true, 0x21000, NULL, NULL);
+ true, 0x21000, mx6q_vpu_reset, NULL);
#endif
struct platform_device *__init imx_add_vpu(