summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0031-omap-overo-Add-opp-init.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0031-omap-overo-Add-opp-init.patch')
-rw-r--r--extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0031-omap-overo-Add-opp-init.patch105
1 files changed, 105 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0031-omap-overo-Add-opp-init.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0031-omap-overo-Add-opp-init.patch
new file mode 100644
index 00000000..07df7634
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0031-omap-overo-Add-opp-init.patch
@@ -0,0 +1,105 @@
1From 530abfee962141f263344b4de3ca48b57e5e514c Mon Sep 17 00:00:00 2001
2From: Steve Sakoman <steve@sakoman.com>
3Date: Tue, 24 May 2011 20:36:07 -0700
4Subject: [PATCH 31/32] omap: overo: Add opp init
5
6omap: overo: Add opp init
7
8Work in progress
9
10Signed-off-by: Steve Sakoman <steve@sakoman.com>
11---
12 arch/arm/mach-omap2/board-overo.c | 49 +++++++++++++++++++++++++++++++++++++
13 1 files changed, 49 insertions(+), 0 deletions(-)
14
15diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
16index 05dd3eb..8c2d21f 100644
17--- a/arch/arm/mach-omap2/board-overo.c
18+++ b/arch/arm/mach-omap2/board-overo.c
19@@ -25,6 +25,7 @@
20 #include <linux/init.h>
21 #include <linux/io.h>
22 #include <linux/kernel.h>
23+#include <linux/opp.h>
24 #include <linux/platform_device.h>
25 #include <linux/i2c/twl.h>
26 #include <linux/regulator/machine.h>
27@@ -43,6 +44,7 @@
28
29 #include <plat/board.h>
30 #include <plat/common.h>
31+#include <plat/omap_device.h>
32 #include <plat/display.h>
33 #include <plat/panel-generic-dpi.h>
34 #include <mach/gpio.h>
35@@ -54,6 +56,7 @@
36 #include <plat/usb.h>
37
38 #include "mux.h"
39+#include "pm.h"
40 #include "sdram-micron-mt46h32m32lf-6.h"
41 #include "hsmmc.h"
42
43@@ -755,6 +758,51 @@ static struct omap_musb_board_data musb_board_data = {
44 .power = 100,
45 };
46
47+static void __init overo_opp_init(void)
48+{
49+ int r = 0;
50+
51+ /* Initialize the omap3 opp table */
52+ if (omap3_opp_init()) {
53+ pr_err("%s: opp default init failed\n", __func__);
54+ return;
55+ }
56+
57+ /* Custom OPP enabled for 36/3730 */
58+ if (cpu_is_omap3630()) {
59+ struct omap_hwmod *mh = omap_hwmod_lookup("mpu");
60+ struct omap_hwmod *dh = omap_hwmod_lookup("iva");
61+ struct device *dev;
62+
63+ if (!mh || !dh) {
64+ pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n",
65+ __func__, mh, dh);
66+ return;
67+ }
68+ /* Enable MPU 1GHz and lower opps */
69+ dev = &mh->od->pdev.dev;
70+ r = opp_enable(dev, 1000000000);
71+
72+ /* Enable IVA 800MHz and lower opps */
73+ dev = &dh->od->pdev.dev;
74+ r |= opp_enable(dev, 800000000);
75+
76+ if (r) {
77+ pr_err("%s: failed to enable higher opp %d\n",
78+ __func__, r);
79+ /*
80+ * Cleanup - disable the higher freqs - we dont care
81+ * about the results
82+ */
83+ dev = &mh->od->pdev.dev;
84+ opp_disable(dev, 1000000000);
85+ dev = &dh->od->pdev.dev;
86+ opp_disable(dev, 800000000);
87+ }
88+ }
89+ return;
90+}
91+
92 static void __init overo_init(void)
93 {
94 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
95@@ -770,6 +818,7 @@ static void __init overo_init(void)
96 overo_display_init();
97 overo_init_led();
98 overo_init_keys();
99+ overo_opp_init();
100
101 /* Ensure SDRC pins are mux'd for self-refresh */
102 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
103--
1041.6.6.1
105