1 This patch adjusts the omap3630 portion of the powervr driver to use the new
4 Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
5 [yann.morin.1998@free.fr: rebased ontop of 5.01.00.01]
6 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
7 diff -durN ti-gfx-5_01_00_01.orig/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c ti-gfx-5_01_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c
8 --- ti-gfx-5_01_00_01.orig/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2013-12-23 15:44:20.000000000 +0100
9 +++ ti-gfx-5_01_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2014-02-26 19:17:39.829571846 +0100
13 ******************************************************************************/
14 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)
15 +int clk_disable_unprepare(struct clk *clk)
17 + return clk_disable(clk);
19 +#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
20 +int clk_disable_unprepare(struct clk *clk)
22 + res = clk_disable(clk);
26 + res = clk_unprepare(clk);
35 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)
36 +int clk_prepare_enable(struct clk *clk)
38 + return clk_enable(clk);
40 +#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
41 +int clk_prepare_enable(struct clk *clk)
43 + res = clk_prepare(clk);
47 + res = clk_enable(clk);
57 PVRSRV_ERROR EnableSGXClocks(SYS_DATA *psSysData)
59 #if !defined(NO_HARDWARE)
62 #if !defined(PM_RUNTIME_SUPPORT)
63 PVR_DPF((PVR_DBG_MESSAGE, "EnableSGXClocks: Enabling SGX Clocks"));
64 - res=clk_enable(psSysSpecData->psSGX_FCK);
65 + res=clk_prepare_enable(psSysSpecData->psSGX_FCK);
68 PVR_DPF((PVR_DBG_ERROR, "EnableSGXClocks: Couldn't enable SGX functional clock (%d)", res));
71 PVR_DPF((PVR_DBG_MESSAGE, "DisableSGXClocks: Disabling SGX Clocks"));
72 #if !defined(PM_RUNTIME_SUPPORT)
73 - clk_disable(psSysSpecData->psSGX_FCK);
74 + clk_disable_unprepare(psSysSpecData->psSGX_FCK);
76 SysDisableSGXInterrupts(psSysData);
79 rate = clk_get_rate(psSysSpecData->psGPT11_FCK);
80 PVR_TRACE(("GPTIMER11 clock is %dMHz", HZ_TO_MHZ(rate)));
82 - res = clk_enable(psSysSpecData->psGPT11_FCK);
83 + res = clk_prepare_enable(psSysSpecData->psGPT11_FCK);
86 PVR_DPF((PVR_DBG_ERROR, "EnableSystemClocks: Couldn't enable GPTIMER11 functional clock (%d)", res));
90 - res = clk_enable(psSysSpecData->psGPT11_ICK);
91 + res = clk_prepare_enable(psSysSpecData->psGPT11_ICK);
94 PVR_DPF((PVR_DBG_ERROR, "EnableSystemClocks: Couldn't enable GPTIMER11 interface clock (%d)", res));
98 #if defined(PVR_OMAP4_TIMING_PRCM)
99 - clk_disable(psSysSpecData->psGPT11_ICK);
100 + clk_disable_unprepare(psSysSpecData->psGPT11_ICK);
102 - clk_disable(psSysSpecData->psGPT11_FCK);
103 + clk_disable_unprepare(psSysSpecData->psGPT11_FCK);
105 #endif /* defined(PVR_OMAP4_TIMING_PRCM) */
106 eError = PVRSRV_ERROR_CLOCK_REQUEST_FAILED;
108 psSysSpecData->sTimerRegPhysBase.uiAddr = 0;
110 #if defined(PVR_OMAP4_TIMING_PRCM)
111 - clk_disable(psSysSpecData->psGPT11_ICK);
112 + clk_disable_unprepare(psSysSpecData->psGPT11_ICK);
114 - clk_disable(psSysSpecData->psGPT11_FCK);
115 + clk_disable_unprepare(psSysSpecData->psGPT11_FCK);
116 #endif /* defined(PVR_OMAP4_TIMING_PRCM) */
118 #endif /* PVR_OMAP_USE_DM_TIMER_API */