From efa8c5705d4584e34adf3ef435e0f83b0bb770a8 Mon Sep 17 00:00:00 2001 From: Jason Liu Date: Thu, 15 Nov 2012 14:51:10 +0800 Subject: [PATCH] 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 --- arch/arm/plat-mxc/devices/platform-imx_vpu.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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; -- 2.39.5