diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/configs/omap1_defconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/Kconfig | 64 | ||||
-rw-r--r-- | arch/arm/mach-omap1/clock.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap1/clock.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap1/clock_data.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap1/opp.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/opp_data.c | 63 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/clkdev_omap.h | 1 |
8 files changed, 45 insertions, 100 deletions
diff --git a/arch/arm/configs/omap1_defconfig b/arch/arm/configs/omap1_defconfig index 945a34f2a34d..dde2a1af7b39 100644 --- a/arch/arm/configs/omap1_defconfig +++ b/arch/arm/configs/omap1_defconfig | |||
@@ -48,7 +48,6 @@ CONFIG_MACH_SX1=y | |||
48 | CONFIG_MACH_NOKIA770=y | 48 | CONFIG_MACH_NOKIA770=y |
49 | CONFIG_MACH_AMS_DELTA=y | 49 | CONFIG_MACH_AMS_DELTA=y |
50 | CONFIG_MACH_OMAP_GENERIC=y | 50 | CONFIG_MACH_OMAP_GENERIC=y |
51 | CONFIG_OMAP_ARM_182MHZ=y | ||
52 | # CONFIG_ARM_THUMB is not set | 51 | # CONFIG_ARM_THUMB is not set |
53 | CONFIG_PCCARD=y | 52 | CONFIG_PCCARD=y |
54 | CONFIG_OMAP_CF=y | 53 | CONFIG_OMAP_CF=y |
diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig index 73f287d6429b..4f8d66f044e7 100644 --- a/arch/arm/mach-omap1/Kconfig +++ b/arch/arm/mach-omap1/Kconfig | |||
@@ -168,70 +168,6 @@ config MACH_OMAP_GENERIC | |||
168 | custom OMAP boards. Say Y here if you have a custom | 168 | custom OMAP boards. Say Y here if you have a custom |
169 | board. | 169 | board. |
170 | 170 | ||
171 | comment "OMAP CPU Speed" | ||
172 | depends on ARCH_OMAP1 | ||
173 | |||
174 | config OMAP_ARM_216MHZ | ||
175 | bool "OMAP ARM 216 MHz CPU (1710 only)" | ||
176 | depends on ARCH_OMAP1 && ARCH_OMAP16XX | ||
177 | help | ||
178 | Enable 216 MHz clock for OMAP1710 CPU. If unsure, say N. | ||
179 | |||
180 | config OMAP_ARM_195MHZ | ||
181 | bool "OMAP ARM 195 MHz CPU" | ||
182 | depends on ARCH_OMAP1 && (ARCH_OMAP730 || ARCH_OMAP850) | ||
183 | help | ||
184 | Enable 195MHz clock for OMAP CPU. If unsure, say N. | ||
185 | |||
186 | config OMAP_ARM_192MHZ | ||
187 | bool "OMAP ARM 192 MHz CPU" | ||
188 | depends on ARCH_OMAP1 && ARCH_OMAP16XX | ||
189 | help | ||
190 | Enable 192MHz clock for OMAP CPU. If unsure, say N. | ||
191 | |||
192 | config OMAP_ARM_182MHZ | ||
193 | bool "OMAP ARM 182 MHz CPU" | ||
194 | depends on ARCH_OMAP1 && (ARCH_OMAP730 || ARCH_OMAP850) | ||
195 | help | ||
196 | Enable 182MHz clock for OMAP CPU. If unsure, say N. | ||
197 | |||
198 | config OMAP_ARM_168MHZ | ||
199 | bool "OMAP ARM 168 MHz CPU" | ||
200 | depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP730 || ARCH_OMAP850) | ||
201 | help | ||
202 | Enable 168MHz clock for OMAP CPU. If unsure, say N. | ||
203 | |||
204 | config OMAP_ARM_150MHZ | ||
205 | bool "OMAP ARM 150 MHz CPU" | ||
206 | depends on ARCH_OMAP1 && ARCH_OMAP15XX | ||
207 | help | ||
208 | Enable 150MHz clock for OMAP CPU. If unsure, say N. | ||
209 | |||
210 | config OMAP_ARM_120MHZ | ||
211 | bool "OMAP ARM 120 MHz CPU" | ||
212 | depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP730 || ARCH_OMAP850) | ||
213 | help | ||
214 | Enable 120MHz clock for OMAP CPU. If unsure, say N. | ||
215 | |||
216 | config OMAP_ARM_96MHZ | ||
217 | bool "OMAP ARM 96 MHz CPU" | ||
218 | depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP730 || ARCH_OMAP850) | ||
219 | help | ||
220 | Enable 96MHz clock for OMAP CPU. If unsure, say N. | ||
221 | |||
222 | config OMAP_ARM_60MHZ | ||
223 | bool "OMAP ARM 60 MHz CPU" | ||
224 | depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP730 || ARCH_OMAP850) | ||
225 | default y | ||
226 | help | ||
227 | Enable 60MHz clock for OMAP CPU. If unsure, say Y. | ||
228 | |||
229 | config OMAP_ARM_30MHZ | ||
230 | bool "OMAP ARM 30 MHz CPU" | ||
231 | depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP730 || ARCH_OMAP850) | ||
232 | help | ||
233 | Enable 30MHz clock for OMAP CPU. If unsure, say N. | ||
234 | |||
235 | endmenu | 171 | endmenu |
236 | 172 | ||
237 | endif | 173 | endif |
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 84ef70476b51..ff27dbdba3d6 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c | |||
@@ -197,6 +197,9 @@ int omap1_select_table_rate(struct clk *clk, unsigned long rate) | |||
197 | ref_rate = ck_ref_p->rate; | 197 | ref_rate = ck_ref_p->rate; |
198 | 198 | ||
199 | for (ptr = omap1_rate_table; ptr->rate; ptr++) { | 199 | for (ptr = omap1_rate_table; ptr->rate; ptr++) { |
200 | if (!(ptr->flags & cpu_mask)) | ||
201 | continue; | ||
202 | |||
200 | if (ptr->xtal != ref_rate) | 203 | if (ptr->xtal != ref_rate) |
201 | continue; | 204 | continue; |
202 | 205 | ||
@@ -290,6 +293,9 @@ long omap1_round_to_table_rate(struct clk *clk, unsigned long rate) | |||
290 | highest_rate = -EINVAL; | 293 | highest_rate = -EINVAL; |
291 | 294 | ||
292 | for (ptr = omap1_rate_table; ptr->rate; ptr++) { | 295 | for (ptr = omap1_rate_table; ptr->rate; ptr++) { |
296 | if (!(ptr->flags & cpu_mask)) | ||
297 | continue; | ||
298 | |||
293 | if (ptr->xtal != ref_rate) | 299 | if (ptr->xtal != ref_rate) |
294 | continue; | 300 | continue; |
295 | 301 | ||
diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h index 16b1423b454a..3d04f4f67676 100644 --- a/arch/arm/mach-omap1/clock.h +++ b/arch/arm/mach-omap1/clock.h | |||
@@ -111,4 +111,7 @@ extern const struct clkops clkops_dummy; | |||
111 | extern const struct clkops clkops_uart_16xx; | 111 | extern const struct clkops clkops_uart_16xx; |
112 | extern const struct clkops clkops_generic; | 112 | extern const struct clkops clkops_generic; |
113 | 113 | ||
114 | /* used for passing SoC type to omap1_{select,round_to}_table_rate() */ | ||
115 | extern u32 cpu_mask; | ||
116 | |||
114 | #endif | 117 | #endif |
diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c index 9ff90a744a21..ff2d5248df23 100644 --- a/arch/arm/mach-omap1/clock_data.c +++ b/arch/arm/mach-omap1/clock_data.c | |||
@@ -778,12 +778,14 @@ static void __init omap1_show_rates(void) | |||
778 | arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10); | 778 | arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10); |
779 | } | 779 | } |
780 | 780 | ||
781 | u32 cpu_mask; | ||
782 | |||
781 | int __init omap1_clk_init(void) | 783 | int __init omap1_clk_init(void) |
782 | { | 784 | { |
783 | struct omap_clk *c; | 785 | struct omap_clk *c; |
784 | const struct omap_clock_config *info; | 786 | const struct omap_clock_config *info; |
785 | int crystal_type = 0; /* Default 12 MHz */ | 787 | int crystal_type = 0; /* Default 12 MHz */ |
786 | u32 reg, cpu_mask; | 788 | u32 reg; |
787 | 789 | ||
788 | #ifdef CONFIG_DEBUG_LL | 790 | #ifdef CONFIG_DEBUG_LL |
789 | /* | 791 | /* |
@@ -808,6 +810,8 @@ int __init omap1_clk_init(void) | |||
808 | clk_preinit(c->lk.clk); | 810 | clk_preinit(c->lk.clk); |
809 | 811 | ||
810 | cpu_mask = 0; | 812 | cpu_mask = 0; |
813 | if (cpu_is_omap1710()) | ||
814 | cpu_mask |= CK_1710; | ||
811 | if (cpu_is_omap16xx()) | 815 | if (cpu_is_omap16xx()) |
812 | cpu_mask |= CK_16XX; | 816 | cpu_mask |= CK_16XX; |
813 | if (cpu_is_omap1510()) | 817 | if (cpu_is_omap1510()) |
diff --git a/arch/arm/mach-omap1/opp.h b/arch/arm/mach-omap1/opp.h index 07074d79adce..79a683864a5c 100644 --- a/arch/arm/mach-omap1/opp.h +++ b/arch/arm/mach-omap1/opp.h | |||
@@ -21,6 +21,7 @@ struct mpu_rate { | |||
21 | unsigned long pll_rate; | 21 | unsigned long pll_rate; |
22 | __u16 ckctl_val; | 22 | __u16 ckctl_val; |
23 | __u16 dpllctl_val; | 23 | __u16 dpllctl_val; |
24 | u32 flags; | ||
24 | }; | 25 | }; |
25 | 26 | ||
26 | extern struct mpu_rate omap1_rate_table[]; | 27 | extern struct mpu_rate omap1_rate_table[]; |
diff --git a/arch/arm/mach-omap1/opp_data.c b/arch/arm/mach-omap1/opp_data.c index 75a546514994..9cd4ddb51397 100644 --- a/arch/arm/mach-omap1/opp_data.c +++ b/arch/arm/mach-omap1/opp_data.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <plat/clkdev_omap.h> | ||
13 | #include "opp.h" | 14 | #include "opp.h" |
14 | 15 | ||
15 | /*------------------------------------------------------------------------- | 16 | /*------------------------------------------------------------------------- |
@@ -20,40 +21,34 @@ struct mpu_rate omap1_rate_table[] = { | |||
20 | * NOTE: Comment order here is different from bits in CKCTL value: | 21 | * NOTE: Comment order here is different from bits in CKCTL value: |
21 | * armdiv, dspdiv, dspmmu, tcdiv, perdiv, lcddiv | 22 | * armdiv, dspdiv, dspmmu, tcdiv, perdiv, lcddiv |
22 | */ | 23 | */ |
23 | #if defined(CONFIG_OMAP_ARM_216MHZ) | 24 | { 216000000, 12000000, 216000000, 0x050d, 0x2910, /* 1/1/2/2/2/8 */ |
24 | { 216000000, 12000000, 216000000, 0x050d, 0x2910 }, /* 1/1/2/2/2/8 */ | 25 | CK_1710 }, |
25 | #endif | 26 | { 195000000, 13000000, 195000000, 0x050e, 0x2790, /* 1/1/2/2/4/8 */ |
26 | #if defined(CONFIG_OMAP_ARM_195MHZ) | 27 | CK_7XX }, |
27 | { 195000000, 13000000, 195000000, 0x050e, 0x2790 }, /* 1/1/2/2/4/8 */ | 28 | { 192000000, 19200000, 192000000, 0x050f, 0x2510, /* 1/1/2/2/8/8 */ |
28 | #endif | 29 | CK_16XX }, |
29 | #if defined(CONFIG_OMAP_ARM_192MHZ) | 30 | { 192000000, 12000000, 192000000, 0x050f, 0x2810, /* 1/1/2/2/8/8 */ |
30 | { 192000000, 19200000, 192000000, 0x050f, 0x2510 }, /* 1/1/2/2/8/8 */ | 31 | CK_16XX }, |
31 | { 192000000, 12000000, 192000000, 0x050f, 0x2810 }, /* 1/1/2/2/8/8 */ | 32 | { 96000000, 12000000, 192000000, 0x055f, 0x2810, /* 2/2/2/2/8/8 */ |
32 | { 96000000, 12000000, 192000000, 0x055f, 0x2810 }, /* 2/2/2/2/8/8 */ | 33 | CK_16XX }, |
33 | { 48000000, 12000000, 192000000, 0x0baf, 0x2810 }, /* 4/4/4/8/8/8 */ | 34 | { 48000000, 12000000, 192000000, 0x0baf, 0x2810, /* 4/4/4/8/8/8 */ |
34 | { 24000000, 12000000, 192000000, 0x0fff, 0x2810 }, /* 8/8/8/8/8/8 */ | 35 | CK_16XX }, |
35 | #endif | 36 | { 24000000, 12000000, 192000000, 0x0fff, 0x2810, /* 8/8/8/8/8/8 */ |
36 | #if defined(CONFIG_OMAP_ARM_182MHZ) | 37 | CK_16XX }, |
37 | { 182000000, 13000000, 182000000, 0x050e, 0x2710 }, /* 1/1/2/2/4/8 */ | 38 | { 182000000, 13000000, 182000000, 0x050e, 0x2710, /* 1/1/2/2/4/8 */ |
38 | #endif | 39 | CK_7XX }, |
39 | #if defined(CONFIG_OMAP_ARM_168MHZ) | 40 | { 168000000, 12000000, 168000000, 0x010f, 0x2710, /* 1/1/1/2/8/8 */ |
40 | { 168000000, 12000000, 168000000, 0x010f, 0x2710 }, /* 1/1/1/2/8/8 */ | 41 | CK_16XX|CK_7XX }, |
41 | #endif | 42 | { 150000000, 12000000, 150000000, 0x010a, 0x2cb0, /* 1/1/1/2/4/4 */ |
42 | #if defined(CONFIG_OMAP_ARM_150MHZ) | 43 | CK_1510 }, |
43 | { 150000000, 12000000, 150000000, 0x010a, 0x2cb0 }, /* 1/1/1/2/4/4 */ | 44 | { 120000000, 12000000, 120000000, 0x010a, 0x2510, /* 1/1/1/2/4/4 */ |
44 | #endif | 45 | CK_16XX|CK_1510|CK_310|CK_7XX }, |
45 | #if defined(CONFIG_OMAP_ARM_120MHZ) | 46 | { 96000000, 12000000, 96000000, 0x0005, 0x2410, /* 1/1/1/1/2/2 */ |
46 | { 120000000, 12000000, 120000000, 0x010a, 0x2510 }, /* 1/1/1/2/4/4 */ | 47 | CK_16XX|CK_1510|CK_310|CK_7XX }, |
47 | #endif | 48 | { 60000000, 12000000, 60000000, 0x0005, 0x2290, /* 1/1/1/1/2/2 */ |
48 | #if defined(CONFIG_OMAP_ARM_96MHZ) | 49 | CK_16XX|CK_1510|CK_310|CK_7XX }, |
49 | { 96000000, 12000000, 96000000, 0x0005, 0x2410 }, /* 1/1/1/1/2/2 */ | 50 | { 30000000, 12000000, 60000000, 0x0555, 0x2290, /* 2/2/2/2/2/2 */ |
50 | #endif | 51 | CK_16XX|CK_1510|CK_310|CK_7XX }, |
51 | #if defined(CONFIG_OMAP_ARM_60MHZ) | ||
52 | { 60000000, 12000000, 60000000, 0x0005, 0x2290 }, /* 1/1/1/1/2/2 */ | ||
53 | #endif | ||
54 | #if defined(CONFIG_OMAP_ARM_30MHZ) | ||
55 | { 30000000, 12000000, 60000000, 0x0555, 0x2290 }, /* 2/2/2/2/2/2 */ | ||
56 | #endif | ||
57 | { 0, 0, 0, 0, 0 }, | 52 | { 0, 0, 0, 0, 0 }, |
58 | }; | 53 | }; |
59 | 54 | ||
diff --git a/arch/arm/plat-omap/include/plat/clkdev_omap.h b/arch/arm/plat-omap/include/plat/clkdev_omap.h index 387a9638991b..b299b8d201c8 100644 --- a/arch/arm/plat-omap/include/plat/clkdev_omap.h +++ b/arch/arm/plat-omap/include/plat/clkdev_omap.h | |||
@@ -40,6 +40,7 @@ struct omap_clk { | |||
40 | #define CK_443X (1 << 11) | 40 | #define CK_443X (1 << 11) |
41 | #define CK_TI816X (1 << 12) | 41 | #define CK_TI816X (1 << 12) |
42 | #define CK_446X (1 << 13) | 42 | #define CK_446X (1 << 13) |
43 | #define CK_1710 (1 << 15) /* 1710 extra for rate selection */ | ||
43 | 44 | ||
44 | 45 | ||
45 | #define CK_34XX (CK_3430ES1 | CK_3430ES2PLUS) | 46 | #define CK_34XX (CK_3430ES1 | CK_3430ES2PLUS) |