summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/powervr-drivers/omap3-sgx-modules-5.01.01.01/0002-SGX-linux-use-platform-data-to-provide-reset-info.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@ti.com>2016-04-25 23:56:27 +0000
committerDenys Dmytriyenko <denys@ti.com>2016-04-26 14:54:59 -0400
commit6dea1b68af73cc1c6bcf4c3f780ed6fcce770adb (patch)
tree6565e4ee1707efdfb95c13db21179d088cdb02d5 /recipes-bsp/powervr-drivers/omap3-sgx-modules-5.01.01.01/0002-SGX-linux-use-platform-data-to-provide-reset-info.patch
parentc70102c671f120822edc7743401e821ea4f40e4f (diff)
downloadmeta-ti-6dea1b68af73cc1c6bcf4c3f780ed6fcce770adb.tar.gz
sgx: drop old outdated omap3-sgx-modules and libgles-omap3 recipes
Besides being outdated and deprecated in favor of new ti-sgx-ddk recipes (previously known as omapdrm-pvr and omap5-sgx-ddk), 3D graphics drivers are kernel specific and corresponding kernel versions (prior to 4.0) have all been dropped already. Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-bsp/powervr-drivers/omap3-sgx-modules-5.01.01.01/0002-SGX-linux-use-platform-data-to-provide-reset-info.patch')
-rw-r--r--recipes-bsp/powervr-drivers/omap3-sgx-modules-5.01.01.01/0002-SGX-linux-use-platform-data-to-provide-reset-info.patch121
1 files changed, 0 insertions, 121 deletions
diff --git a/recipes-bsp/powervr-drivers/omap3-sgx-modules-5.01.01.01/0002-SGX-linux-use-platform-data-to-provide-reset-info.patch b/recipes-bsp/powervr-drivers/omap3-sgx-modules-5.01.01.01/0002-SGX-linux-use-platform-data-to-provide-reset-info.patch
deleted file mode 100644
index 5a8d1f1e..00000000
--- a/recipes-bsp/powervr-drivers/omap3-sgx-modules-5.01.01.01/0002-SGX-linux-use-platform-data-to-provide-reset-info.patch
+++ /dev/null
@@ -1,121 +0,0 @@
1From 7886ef77e4b48a7edd14acbcbe48f6a898251e78 Mon Sep 17 00:00:00 2001
2From: Darren Etheridge <detheridge@ti.com>
3Date: Fri, 25 Jul 2014 16:03:14 -0500
4Subject: [PATCH 2/5] SGX: linux: use platform data to provide reset info
5
6In ti-linux-3.14.y we will not have a reset driver unlike ti-linux-3.12.y
7so this commit removes the dependency on the reset driver and instead
8uses the platform data that in a dt environment is configured in
9mach-omap2/pdata-quirks.c
10
11Signed-off-by: Darren Etheridge <detheridge@ti.com>
12---
13 GFX_Linux_KM/services4/srvkm/env/linux/module.c | 34 ++++++++++++++++++++-----
14 1 file changed, 28 insertions(+), 6 deletions(-)
15
16diff --git a/GFX_Linux_KM/services4/srvkm/env/linux/module.c b/GFX_Linux_KM/services4/srvkm/env/linux/module.c
17index e03dc00..90e16ce 100644
18--- a/GFX_Linux_KM/services4/srvkm/env/linux/module.c
19+++ b/GFX_Linux_KM/services4/srvkm/env/linux/module.c
20@@ -47,6 +47,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 #endif
22 #endif
23
24+#ifndef CONFIG_RESET_CONTROLLER
25+#include <linux/platform_data/sgx-omap.h>
26+#endif
27+
28 #if defined(SUPPORT_DRI_DRM) && !defined(SUPPORT_DRI_DRM_PLUGIN)
29 #define PVR_MOD_STATIC
30 #else
31@@ -344,9 +348,11 @@ static LDM_DRV powervr_driver = {
32 LDM_DEV *gpsPVRLDMDev;
33
34 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
35+#ifdef CONFIG_RESET_CONTROLLER
36 struct reset_control *rstc;
37 bool already_deasserted = false;
38 #endif
39+#endif
40
41 #if defined(MODULE) && defined(PVR_LDM_PLATFORM_MODULE) && \
42 !defined(PVR_USE_PRE_REGISTERED_PLATFORM_DEV)
43@@ -388,11 +394,14 @@ static int __devinit PVRSRVDriverProbe(LDM_DEV *pDevice, const struct pci_device
44 #endif
45 {
46 SYS_DATA *psSysData;
47- int ret;
48+ int ret;
49+ struct device *dev = &pDevice->dev;
50+ struct gfx_sgx_platform_data *pdata = dev->platform_data;
51+
52 PVR_TRACE(("PVRSRVDriverProbe(pDevice=%p)", pDevice));
53 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
54+#ifdef CONFIG_RESET_CONTROLLER
55 rstc = reset_control_get(&pDevice->dev, NULL);
56-
57 if (IS_ERR(rstc))
58 {
59 dev_err(&pDevice->dev, "%s: error: reset_control_get\n", __func__);
60@@ -403,7 +412,7 @@ static int __devinit PVRSRVDriverProbe(LDM_DEV *pDevice, const struct pci_device
61
62 if (ret < 0)
63 {
64- dev_err(&pDevice->dev, "%s: error: reset_control_clear_reset\n", __func__);
65+ dev_err(dev, "%s: error: reset_control_clear_reset\n", __func__);
66 return ret;
67 }
68
69@@ -413,11 +422,22 @@ static int __devinit PVRSRVDriverProbe(LDM_DEV *pDevice, const struct pci_device
70 {
71 already_deasserted = true;
72 }
73- else if (ret < 0)
74+ else if (ret < 0)
75 {
76- dev_err(&pDevice->dev, "%s: error: reset_control_deassert\n", __func__);
77+ dev_err(dev, "%s: error: reset_control_deassert\n", __func__);
78 return ret;
79 }
80+#else
81+ if (pdata && pdata->deassert_reset) {
82+ ret = pdata->deassert_reset(pDevice, pdata->reset_name);
83+ if (ret) {
84+ dev_err(dev, "Unable to reset SGX!\n");
85+ }
86+ } else {
87+ dev_err(dev, "SGX Platform data missing deassert_reset!\n");
88+ return -ENODEV;
89+ }
90+#endif /* CONFIG_RESET_CONTROLLER */
91 #endif
92
93 #if 0 /* INTEGRATION_POINT */
94@@ -432,7 +452,7 @@ static int __devinit PVRSRVDriverProbe(LDM_DEV *pDevice, const struct pci_device
95 {
96 return -EINVAL;
97 }
98-#endif
99+#endif
100 /* SysInitialise only designed to be called once.
101 */
102 psSysData = SysAcquireDataNoCheck();
103@@ -445,6 +465,7 @@ static int __devinit PVRSRVDriverProbe(LDM_DEV *pDevice, const struct pci_device
104 }
105 }
106 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
107+#ifdef CONFIG_RESET_CONTROLLER
108 if (!already_deasserted)
109 {
110 ret = reset_control_is_reset(rstc);
111@@ -454,6 +475,7 @@ static int __devinit PVRSRVDriverProbe(LDM_DEV *pDevice, const struct pci_device
112 }
113 }
114 reset_control_put(rstc);
115+#endif /* CONFIG_RESET_CONTROLLER */
116 #endif
117
118 return PVRSRVIONClientCreate();
119--
1201.9.1
121