From: Jason Liu Date: Thu, 15 Nov 2012 06:51:10 +0000 (+0800) Subject: ENGR00233770 i.mx6q/vpu: Add fuse check for VPU_DISABLE feature X-Git-Tag: v3.0.35-fsl~243 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=efa8c5705d4584e34adf3ef435e0f83b0bb770a8;p=karo-tx-linux.git 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 --- 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;