aboutsummaryrefslogtreecommitdiffstats
path: root/packages/linux/linux-omap-pm/beagle-cpufreq.diff
blob: f56b27781d810dcca0a9946cfd2524c36b7a49c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
--- /tmp/board-omap3beagle.c	2009-01-11 18:41:58.000000000 +0100
+++ git/arch/arm/mach-omap2/board-omap3beagle.c	2009-01-11 18:47:03.000000000 +0100
@@ -41,12 +41,71 @@
 #include <mach/usb-ehci.h>
 #include <mach/common.h>
 #include <mach/gpmc.h>
+#include <mach/omap-pm.h>
 #include <mach/nand.h>
 #include <mach/mux.h>
+#include <mach/clock.h>
+
 
 #include "twl4030-generic-scripts.h"
 #include "mmc-twl4030.h"
+#include "pm.h"
+
+/* MPU speeds */
+#define S600M   600000000
+#define S550M   550000000
+#define S500M   500000000
+#define S250M   250000000
+#define S125M   125000000
+
+/* DSP speeds */
+#define S430M   430000000
+#define S400M   400000000
+#define S360M   360000000
+#define S180M   180000000
+#define S90M    90000000
+
+/* L3 speeds */
+#define S83M    83000000
+#define S166M   166000000
+
+static struct omap_opp mpu_rate_table[] = {
+	{0, 0, 0},
+	/*OPP1*/
+	{S125M, VDD1_OPP1, 0x18},
+	/*OPP2*/
+	{S250M, VDD1_OPP2, 0x20},
+	/*OPP3*/
+	{S500M, VDD1_OPP3, 0x30},
+	/*OPP4*/
+	{S550M, VDD1_OPP4, 0x36},
+	/*OPP5*/
+	{S600M, VDD1_OPP5, 0x3C},
+};
 
+static struct omap_opp l3_rate_table[] = {
+	{0, 0, 0},
+	/*OPP1*/
+	{0, VDD2_OPP1, 0x18},
+	/*OPP2*/
+	{S83M, VDD2_OPP2, 0x20},
+	/*OPP3*/
+	{S166M, VDD2_OPP3, 0x2C},
+};
+
+struct omap_opp dsp_rate_table[] = {
+	{0, 0, 0},
+	/*OPP1*/
+	{S90M, VDD1_OPP1, 0x18},
+	/*OPP2*/
+	{S180M, VDD1_OPP2, 0x20},
+	/*OPP3*/
+	{S360M, VDD1_OPP3, 0x30},
+	/*OPP4*/
+	{S400M, VDD1_OPP4, 0x36},
+	/*OPP5*/
+	{S430M, VDD1_OPP5, 0x3C},
+};
 
 #define GPMC_CS0_BASE  0x60
 #define GPMC_CS_SIZE   0x30
@@ -233,7 +292,8 @@
 
 static void __init omap3_beagle_init_irq(void)
 {
-	omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL, NULL, NULL);
+	omap2_init_common_hw(mt46h32m32lf6_sdrc_params, mpu_rate_table,
+						 dsp_rate_table, l3_rate_table);
 	omap_init_irq();
 	omap_gpio_init();
 }