diff options
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.patch | 121 |
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 @@ | |||
1 | From 7886ef77e4b48a7edd14acbcbe48f6a898251e78 Mon Sep 17 00:00:00 2001 | ||
2 | From: Darren Etheridge <detheridge@ti.com> | ||
3 | Date: Fri, 25 Jul 2014 16:03:14 -0500 | ||
4 | Subject: [PATCH 2/5] SGX: linux: use platform data to provide reset info | ||
5 | |||
6 | In ti-linux-3.14.y we will not have a reset driver unlike ti-linux-3.12.y | ||
7 | so this commit removes the dependency on the reset driver and instead | ||
8 | uses the platform data that in a dt environment is configured in | ||
9 | mach-omap2/pdata-quirks.c | ||
10 | |||
11 | Signed-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 | |||
16 | diff --git a/GFX_Linux_KM/services4/srvkm/env/linux/module.c b/GFX_Linux_KM/services4/srvkm/env/linux/module.c | ||
17 | index 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 | -- | ||
120 | 1.9.1 | ||
121 | |||