diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/dvfs/0019-OMAP3-beagle-xm-enable-upto-1GHz-OPP.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap/dvfs/0019-OMAP3-beagle-xm-enable-upto-1GHz-OPP.patch | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/dvfs/0019-OMAP3-beagle-xm-enable-upto-1GHz-OPP.patch b/extras/recipes-kernel/linux/linux-omap/dvfs/0019-OMAP3-beagle-xm-enable-upto-1GHz-OPP.patch new file mode 100644 index 00000000..9d1fa917 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap/dvfs/0019-OMAP3-beagle-xm-enable-upto-1GHz-OPP.patch | |||
@@ -0,0 +1,107 @@ | |||
1 | From 897e90138695dccac0dca1601542fd5f4c85b657 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nishanth Menon <nm@ti.com> | ||
3 | Date: Wed, 5 Jan 2011 14:16:59 -0600 | ||
4 | Subject: [PATCH 19/20] OMAP3: beagle xm: enable upto 1GHz OPP | ||
5 | |||
6 | Beagle XM uses 3730 and the board design allows enabling 800MHz and 1GHz | ||
7 | OPPs. tweak the default table to allow for higher OPP tables | ||
8 | |||
9 | Reported-by: Koen Kooi <koen@beagleboard.org> | ||
10 | Signed-off-by: Nishanth Menon <nm@ti.com> | ||
11 | --- | ||
12 | arch/arm/mach-omap2/board-omap3beagle.c | 54 +++++++++++++++++++++++++++++++ | ||
13 | 1 files changed, 54 insertions(+), 0 deletions(-) | ||
14 | |||
15 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
16 | index ad0c1d8..1e0870e 100644 | ||
17 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
18 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
19 | @@ -24,6 +24,7 @@ | ||
20 | #include <linux/irq.h> | ||
21 | #include <linux/input.h> | ||
22 | #include <linux/gpio_keys.h> | ||
23 | +#include <linux/opp.h> | ||
24 | |||
25 | #include <linux/mtd/mtd.h> | ||
26 | #include <linux/mtd/partitions.h> | ||
27 | @@ -45,10 +46,12 @@ | ||
28 | #include <plat/gpmc.h> | ||
29 | #include <plat/nand.h> | ||
30 | #include <plat/usb.h> | ||
31 | +#include <plat/omap_device.h> | ||
32 | |||
33 | #include "mux.h" | ||
34 | #include "hsmmc.h" | ||
35 | #include "timer-gp.h" | ||
36 | +#include "pm.h" | ||
37 | |||
38 | #define NAND_BLOCK_SIZE SZ_128K | ||
39 | |||
40 | @@ -804,6 +807,56 @@ static int __init expansionboard_setup(char *str) | ||
41 | return 0; | ||
42 | } | ||
43 | |||
44 | +static void __init beagle_opp_init(void) | ||
45 | +{ | ||
46 | + int r = 0; | ||
47 | + | ||
48 | + /* Initialize the omap3 opp table */ | ||
49 | + if (omap3_opp_init()) { | ||
50 | + pr_err("%s: opp default init failed\n", __func__); | ||
51 | + return; | ||
52 | + } | ||
53 | + | ||
54 | + /* Custom OPP enabled for XM */ | ||
55 | + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { | ||
56 | + struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); | ||
57 | + struct omap_hwmod *dh = omap_hwmod_lookup("iva"); | ||
58 | + struct device *dev; | ||
59 | + | ||
60 | + if (!mh || !dh) { | ||
61 | + pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", | ||
62 | + __func__, mh, dh); | ||
63 | + r = -EINVAL; | ||
64 | + } else { | ||
65 | + /* Enable MPU 1GHz and lower opps */ | ||
66 | + dev = &mh->od->pdev.dev; | ||
67 | + r = opp_enable(dev, 800000000); | ||
68 | + r |= opp_enable(dev, 1000000000); | ||
69 | + | ||
70 | + /* Enable IVA 800MHz and lower opps */ | ||
71 | + dev = &dh->od->pdev.dev; | ||
72 | + r |= opp_enable(dev, 660000000); | ||
73 | + r |= opp_enable(dev, 800000000); | ||
74 | + } | ||
75 | + if (r) { | ||
76 | + pr_err("%s: failed to enable higher opp %d\n", | ||
77 | + __func__, r); | ||
78 | + /* | ||
79 | + * Cleanup - disable the higher freqs - we dont care | ||
80 | + * about the results | ||
81 | + */ | ||
82 | + dev = &mh->od->pdev.dev; | ||
83 | + opp_disable(dev, 800000000); | ||
84 | + opp_disable(dev, 1000000000); | ||
85 | + dev = &dh->od->pdev.dev; | ||
86 | + opp_disable(dev, 660000000); | ||
87 | + opp_disable(dev, 800000000); | ||
88 | + } else { | ||
89 | + pr_err("%s: turbo OPPs enabled!\n", __func__); | ||
90 | + } | ||
91 | + } | ||
92 | +} | ||
93 | + | ||
94 | static void __init omap3_beagle_init(void) | ||
95 | { | ||
96 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | ||
97 | @@ -876,6 +929,7 @@ static void __init omap3_beagle_init(void) | ||
98 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); | ||
99 | |||
100 | beagle_display_init(); | ||
101 | + beagle_opp_init(); | ||
102 | } | ||
103 | |||
104 | early_param("buddy", expansionboard_setup); | ||
105 | -- | ||
106 | 1.6.6.1 | ||
107 | |||