aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/devices.c
diff options
context:
space:
mode:
authorAndrii Tseglytskyi <andrii.tseglytskyi@ti.com>2012-05-28 14:46:00 +0300
committerZiyann <jaraidaniel@gmail.com>2014-10-01 12:59:47 +0200
commitf80fb7dfd1c0e294f24ae5cd413571fbaeae6ff0 (patch)
treef0bbddbe3416e5b19d966cb2be99c0d88f29aa51 /arch/arm/mach-omap2/devices.c
parent1ee75fff45badca8807cedf0001781137e95a08b (diff)
downloadkernel_samsung_tuna-f80fb7dfd1c0e294f24ae5cd413571fbaeae6ff0.zip
kernel_samsung_tuna-f80fb7dfd1c0e294f24ae5cd413571fbaeae6ff0.tar.gz
kernel_samsung_tuna-f80fb7dfd1c0e294f24ae5cd413571fbaeae6ff0.tar.bz2
OMAP4: DPLL cascading: introduce devise scale function for GPU
GPU driver should be able to manage DPLL cascading constraint. Right now sources of GPU driver are not in the kernel mainline. So, patch introduces simple wrapper function for omap_device_scale(), which holds DPLL cascading blocker when GPU scales to OPP higher, than OPP50 Change-Id: I3f83b8b1c49118625f550aea031e86546ceb97fc Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r--arch/arm/mach-omap2/devices.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index b987208..7eb9306 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -24,6 +24,10 @@
#include <asm/mach/map.h>
#include <asm/pmu.h>
+#ifdef CONFIG_OMAP4_DPLL_CASCADING
+#include <mach/omap4-common.h>
+#endif
+
#include <plat/tc.h>
#include <plat/board.h>
#include <plat/mcbsp.h>
@@ -904,6 +908,24 @@ static struct omap_device_pm_latency omap_gpu_latency[] = {
},
};
+#ifdef CONFIG_OMAP4_DPLL_CASCADING
+int omap_device_scale_gpu(struct device *req_dev, struct device *target_dev,
+ unsigned long rate)
+{
+ unsigned long freq = 0;
+
+ /* find lowest frequency */
+ opp_find_freq_ceil(target_dev, &freq);
+
+ if (rate > freq)
+ omap4_dpll_cascading_blocker_hold(target_dev);
+ else
+ omap4_dpll_cascading_blocker_release(target_dev);
+
+ return omap_device_scale(req_dev, target_dev, rate);
+}
+#endif
+
static void omap_init_gpu(void)
{
struct omap_hwmod *oh;
@@ -932,8 +954,11 @@ static void omap_init_gpu(void)
pr_err("omap_init_gpu: Platform data memory allocation failed\n");
return;
}
-
+#ifdef CONFIG_OMAP4_DPLL_CASCADING
+ pdata->device_scale = omap_device_scale_gpu;
+#else
pdata->device_scale = omap_device_scale;
+#endif
pdata->device_enable = omap_device_enable;
pdata->device_idle = omap_device_idle;
pdata->device_shutdown = omap_device_shutdown;