diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-09 17:38:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-09 17:38:51 -0500 |
commit | 5ede3ceb7b2c2843e153a1803edbdc8c56655950 (patch) | |
tree | 4cfa82b619f7d39b671e4a2a213f4d040b09c486 /arch/arm/mach-omap1 | |
parent | 6d889d03ab1417645e76e129834f76204bae37c0 (diff) | |
parent | 3e2762c8f1141ae8dc708034ea41d6827818c328 (diff) |
Merge tag 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
New feature development
This adds support for new features, and contains stuff from most
platforms. A number of these patches could have fit into other
branches, too, but were small enough not to cause too much
confusion here.
* tag 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits)
mfd/db8500-prcmu: remove support for early silicon revisions
ARM: ux500: fix the smp_twd clock calculation
ARM: ux500: remove support for early silicon revisions
ARM: ux500: update register files
ARM: ux500: register DB5500 PMU dynamically
ARM: ux500: update ASIC detection for U5500
ARM: ux500: support DB8520
ARM: picoxcell: implement watchdog restart
ARM: OMAP3+: hwmod data: Add the default clockactivity for I2C
ARM: OMAP3: hwmod data: disable multiblock reads on MMC1/2 on OMAP34xx/35xx <= ES2.1
ARM: OMAP: USB: EHCI and OHCI hwmod structures for OMAP4
ARM: OMAP: USB: EHCI and OHCI hwmod structures for OMAP3
ARM: OMAP: hwmod data: Add support for AM35xx UART4/ttyO3
ARM: Orion: Remove address map info from all platform data structures
ARM: Orion: Get address map from plat-orion instead of via platform_data
ARM: Orion: mbus_dram_info consolidation
ARM: Orion: Consolidate the address map setup
ARM: Kirkwood: Add configuration for MPP12 as GPIO
ARM: Kirkwood: Recognize A1 revision of 6282 chip
ARM: ux500: update the MOP500 GPIO assignments
...
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/Kconfig | 64 | ||||
-rw-r--r-- | arch/arm/mach-omap1/clock.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-omap1/clock.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap1/clock_data.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-omap1/opp.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/opp_data.c | 63 |
6 files changed, 49 insertions, 115 deletions
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..0c50df05d135 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c | |||
@@ -197,11 +197,10 @@ 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->xtal != ref_rate) | 200 | if (!(ptr->flags & cpu_mask)) |
201 | continue; | 201 | continue; |
202 | 202 | ||
203 | /* DPLL1 cannot be reprogrammed without risking system crash */ | 203 | if (ptr->xtal != ref_rate) |
204 | if (likely(dpll1_rate != 0) && ptr->pll_rate != dpll1_rate) | ||
205 | continue; | 204 | continue; |
206 | 205 | ||
207 | /* Can check only after xtal frequency check */ | 206 | /* Can check only after xtal frequency check */ |
@@ -215,12 +214,8 @@ int omap1_select_table_rate(struct clk *clk, unsigned long rate) | |||
215 | /* | 214 | /* |
216 | * In most cases we should not need to reprogram DPLL. | 215 | * In most cases we should not need to reprogram DPLL. |
217 | * Reprogramming the DPLL is tricky, it must be done from SRAM. | 216 | * Reprogramming the DPLL is tricky, it must be done from SRAM. |
218 | * (on 730, bit 13 must always be 1) | ||
219 | */ | 217 | */ |
220 | if (cpu_is_omap7xx()) | 218 | omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val); |
221 | omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val | 0x2000); | ||
222 | else | ||
223 | omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val); | ||
224 | 219 | ||
225 | /* XXX Do we need to recalculate the tree below DPLL1 at this point? */ | 220 | /* XXX Do we need to recalculate the tree below DPLL1 at this point? */ |
226 | ck_dpll1_p->rate = ptr->pll_rate; | 221 | ck_dpll1_p->rate = ptr->pll_rate; |
@@ -290,6 +285,9 @@ long omap1_round_to_table_rate(struct clk *clk, unsigned long rate) | |||
290 | highest_rate = -EINVAL; | 285 | highest_rate = -EINVAL; |
291 | 286 | ||
292 | for (ptr = omap1_rate_table; ptr->rate; ptr++) { | 287 | for (ptr = omap1_rate_table; ptr->rate; ptr++) { |
288 | if (!(ptr->flags & cpu_mask)) | ||
289 | continue; | ||
290 | |||
293 | if (ptr->xtal != ref_rate) | 291 | if (ptr->xtal != ref_rate) |
294 | continue; | 292 | continue; |
295 | 293 | ||
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..94699a82a734 100644 --- a/arch/arm/mach-omap1/clock_data.c +++ b/arch/arm/mach-omap1/clock_data.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <plat/clock.h> | 25 | #include <plat/clock.h> |
26 | #include <plat/cpu.h> | 26 | #include <plat/cpu.h> |
27 | #include <plat/clkdev_omap.h> | 27 | #include <plat/clkdev_omap.h> |
28 | #include <plat/sram.h> /* for omap_sram_reprogram_clock() */ | ||
28 | #include <plat/usb.h> /* for OTG_BASE */ | 29 | #include <plat/usb.h> /* for OTG_BASE */ |
29 | 30 | ||
30 | #include "clock.h" | 31 | #include "clock.h" |
@@ -778,12 +779,14 @@ static void __init omap1_show_rates(void) | |||
778 | arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10); | 779 | arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10); |
779 | } | 780 | } |
780 | 781 | ||
782 | u32 cpu_mask; | ||
783 | |||
781 | int __init omap1_clk_init(void) | 784 | int __init omap1_clk_init(void) |
782 | { | 785 | { |
783 | struct omap_clk *c; | 786 | struct omap_clk *c; |
784 | const struct omap_clock_config *info; | 787 | const struct omap_clock_config *info; |
785 | int crystal_type = 0; /* Default 12 MHz */ | 788 | int crystal_type = 0; /* Default 12 MHz */ |
786 | u32 reg, cpu_mask; | 789 | u32 reg; |
787 | 790 | ||
788 | #ifdef CONFIG_DEBUG_LL | 791 | #ifdef CONFIG_DEBUG_LL |
789 | /* | 792 | /* |
@@ -808,6 +811,8 @@ int __init omap1_clk_init(void) | |||
808 | clk_preinit(c->lk.clk); | 811 | clk_preinit(c->lk.clk); |
809 | 812 | ||
810 | cpu_mask = 0; | 813 | cpu_mask = 0; |
814 | if (cpu_is_omap1710()) | ||
815 | cpu_mask |= CK_1710; | ||
811 | if (cpu_is_omap16xx()) | 816 | if (cpu_is_omap16xx()) |
812 | cpu_mask |= CK_16XX; | 817 | cpu_mask |= CK_16XX; |
813 | if (cpu_is_omap1510()) | 818 | if (cpu_is_omap1510()) |
@@ -931,17 +936,13 @@ void __init omap1_clk_late_init(void) | |||
931 | { | 936 | { |
932 | unsigned long rate = ck_dpll1.rate; | 937 | unsigned long rate = ck_dpll1.rate; |
933 | 938 | ||
934 | if (rate >= OMAP1_DPLL1_SANE_VALUE) | ||
935 | return; | ||
936 | |||
937 | /* System booting at unusable rate, force reprogramming of DPLL1 */ | ||
938 | ck_dpll1_p->rate = 0; | ||
939 | |||
940 | /* Find the highest supported frequency and enable it */ | 939 | /* Find the highest supported frequency and enable it */ |
941 | if (omap1_select_table_rate(&virtual_ck_mpu, ~0)) { | 940 | if (omap1_select_table_rate(&virtual_ck_mpu, ~0)) { |
942 | pr_err("System frequencies not set, using default. Check your config.\n"); | 941 | pr_err("System frequencies not set, using default. Check your config.\n"); |
943 | omap_writew(0x2290, DPLL_CTL); | 942 | /* |
944 | omap_writew(cpu_is_omap7xx() ? 0x2005 : 0x0005, ARM_CKCTL); | 943 | * Reprogramming the DPLL is tricky, it must be done from SRAM. |
944 | */ | ||
945 | omap_sram_reprogram_clock(0x2290, 0x0005); | ||
945 | ck_dpll1.rate = OMAP1_DPLL1_SANE_VALUE; | 946 | ck_dpll1.rate = OMAP1_DPLL1_SANE_VALUE; |
946 | } | 947 | } |
947 | propagate_rate(&ck_dpll1); | 948 | propagate_rate(&ck_dpll1); |
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 | ||