aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;