diff options
author | Jason Liu <r64343@freescale.com> | 2012-11-15 14:51:10 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-11-17 19:40:27 +0800 |
commit | 8b2ec798ba51e003ec45065b2bc67fbebbf39422 (patch) | |
tree | f0d45ba54d1a0de0551594168ec6e55924fc82a6 | |
parent | c694480112b521b65e548078a70807e7c47e2dc3 (diff) |
ENGR00233770 i.mx6q/vpu: Add fuse check for VPU_DISABLE feature
This patch add the fuse check for VPU_DISABLE feature. If the fuse
bit for VPU_DISABLE is 1, which means VPU is disabled, then we will
not register VPU device to the kernel.
Signed-off-by: Jason Liu <r64343@freescale.com>
-rwxr-xr-x | arch/arm/plat-mxc/devices/platform-imx_vpu.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-imx_vpu.c b/arch/arm/plat-mxc/devices/platform-imx_vpu.c index c36439138778..83faed6e7b6a 100755 --- a/arch/arm/plat-mxc/devices/platform-imx_vpu.c +++ b/arch/arm/plat-mxc/devices/platform-imx_vpu.c @@ -167,6 +167,15 @@ struct platform_device *__init imx_add_vpu( pdata.iram_enable = data->iram_enable; pdata.iram_size = data->iram_size; +#ifdef CONFIG_SOC_IMX6Q + if (cpu_is_mx6dl() || cpu_is_mx6q()) { + #define HW_OCOTP_CFGn(n) (0x00000410 + (n) * 0x10) + unsigned int vpu_disable; + vpu_disable = readl(MX6_IO_ADDRESS(OCOTP_BASE_ADDR) + HW_OCOTP_CFGn(3)); + if (vpu_disable & 0x00008000) + return ERR_PTR(-ENODEV); + } +#endif if (cpu_is_mx6dl()) pdata.iram_enable = false; |