]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00233770 i.mx6q/vpu: Add fuse check for VPU_DISABLE feature
authorJason Liu <r64343@freescale.com>
Thu, 15 Nov 2012 06:51:10 +0000 (14:51 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:43 +0000 (08:35 +0200)
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>
arch/arm/plat-mxc/devices/platform-imx_vpu.c

index c364391387788d4ec9d88e732d889820bae449c6..83faed6e7b6a54f654adaf4681f3db7a8bd174e3 100755 (executable)
@@ -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;