summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLoren Huang <b02279@freescale.com>2013-03-05 15:40:22 +0800
committerLoren Huang <b02279@freescale.com>2013-03-05 17:13:52 +0800
commit7345c456c199ab5a02b367cb31a5e07d42efb371 (patch)
tree6371a1894f019a417a18fd33f8cf910d73d2a167 /arch
parentc38a586df28062ca2019d0c5d551810898497aa6 (diff)
ENGR00252727-1 [mxc]Add fuse check for gpu platform device
Add fuse check for gpu platform device. Bypass gpu core initialization if certain core is fused.If all gpu cores are fused, bypass gpu driver loading. Signed-off-by: Loren Huang <b02279@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/plat-mxc/devices/platform-viv_gpu.c35
1 files changed, 29 insertions, 6 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-viv_gpu.c b/arch/arm/plat-mxc/devices/platform-viv_gpu.c
index 9b0219695c00..52c9b082b6ae 100644
--- a/arch/arm/plat-mxc/devices/platform-viv_gpu.c
+++ b/arch/arm/plat-mxc/devices/platform-viv_gpu.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011-2012 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -90,13 +90,36 @@ struct platform_device *__init imx_add_viv_gpu(
},
};
- if (cpu_is_mx6q() || cpu_is_mx6sl())
- res_count = ARRAY_SIZE(res);
- else if (cpu_is_mx6dl())
- /* No openVG on i.mx6 Solo/DL */
- res_count = ARRAY_SIZE(res) - 2;
+ res_count = ARRAY_SIZE(res);
BUG_ON(!res_count);
+ if (!fuse_dev_is_available(MXC_DEV_3D)) {
+ res[1].start = 0;
+ res[1].end = 0;
+ res[2].start = -1;
+ res[2].end = -1;
+ }
+
+ if (!fuse_dev_is_available(MXC_DEV_2D)) {
+ res[3].start = 0;
+ res[3].end = 0;
+ res[4].start = -1;
+ res[4].end = -1;
+ }
+
+ if (!fuse_dev_is_available(MXC_DEV_OVG)) {
+ res[5].start = 0;
+ res[5].end = 0;
+ res[6].start = -1;
+ res[6].end = -1;
+ }
+
+ /* None GPU core exists */
+ if ((res[2].start == -1) &&
+ (res[4].start == -1) &&
+ (res[6].start == -1))
+ return ERR_PTR(-ENODEV);
+
return imx_add_platform_device_dmamask("galcore", 0,
res, res_count,
pdata, sizeof(*pdata),