summaryrefslogtreecommitdiffstats
path: root/meta-ti-extras/recipes/powervr-drivers/omap3-sgx-modules/Change-for-interfacing-with-SGX-DT-node.patch
blob: c553354acbaf513bd0fcb3898aaa60d2a641bb4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
diff --git a/services4/srvkm/env/linux/module.c b/services4/srvkm/env/linux/module.c
index 668dc2d..2247aad 100644
--- a/services4/srvkm/env/linux/module.c
+++ b/services4/srvkm/env/linux/module.c
@@ -84,6 +84,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/proc_fs.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#include <linux/of.h>
+#endif
 
 #if defined(SUPPORT_DRI_DRM)
 #include <drm/drmP.h>
@@ -296,10 +299,24 @@ static struct platform_device_id powervr_id_table[] __devinitdata = {
 };
 #endif
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+static const struct of_device_id omap_sgx_of_match[] = {
+	{
+		.compatible = "ti,sgx",
+	},
+	{},
+};
+MODULE_DEVICE_TABLE(of, omap_sgx_of_match);
+#endif
+
+
 static LDM_DRV powervr_driver = {
 #if defined(PVR_LDM_PLATFORM_MODULE)
 	.driver = {
 		.name		= DRVNAME,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+		.of_match_table = of_match_ptr(omap_sgx_of_match),
+#endif
 	},
 #endif
 #if defined(PVR_LDM_PCI_MODULE)
@@ -362,7 +379,7 @@ static int __devinit PVRSRVDriverProbe(LDM_DEV *pDevice, const struct pci_device
 #endif
 {
 	SYS_DATA *psSysData;
-
+	
 	PVR_TRACE(("PVRSRVDriverProbe(pDevice=%p)", pDevice));
 
 #if 0   /* INTEGRATION_POINT */
-- 
1.7.9.5