diff options
author | Tony Lindgren <tony@atomide.com> | 2010-05-20 14:35:19 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-05-20 14:35:19 -0400 |
commit | 4fa73a1bf89ebea4eba8a9982b5f64d266d8b5e9 (patch) | |
tree | 9d4558065a2586c25a0c0c3d87ed8402981d616d /arch/arm/plat-omap | |
parent | c8f626fe1c7e6de983b0c3b6375da69ded3313b6 (diff) | |
parent | 59dd7224892142fe1d8505cf2c90bd732d730005 (diff) |
Merge branch 'for_2.6.35' of git://git.pwsan.com/linux-2.6 into omap-for-linus
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/clock.c | 25 | ||||
-rw-r--r-- | arch/arm/plat-omap/dmtimer.c | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/clock.h | 14 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap44xx.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap_hwmod.h | 16 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/powerdomain.h | 7 | ||||
-rw-r--r-- | arch/arm/plat-omap/omap_device.c | 4 |
7 files changed, 38 insertions, 33 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 5261a0923691..7190cbd92620 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -12,14 +12,12 @@ | |||
12 | */ | 12 | */ |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/module.h> | ||
16 | #include <linux/list.h> | 15 | #include <linux/list.h> |
17 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
18 | #include <linux/err.h> | 17 | #include <linux/err.h> |
19 | #include <linux/string.h> | 18 | #include <linux/string.h> |
20 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
21 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
22 | #include <linux/platform_device.h> | ||
23 | #include <linux/cpufreq.h> | 21 | #include <linux/cpufreq.h> |
24 | #include <linux/debugfs.h> | 22 | #include <linux/debugfs.h> |
25 | #include <linux/io.h> | 23 | #include <linux/io.h> |
@@ -32,9 +30,9 @@ static DEFINE_SPINLOCK(clockfw_lock); | |||
32 | 30 | ||
33 | static struct clk_functions *arch_clock; | 31 | static struct clk_functions *arch_clock; |
34 | 32 | ||
35 | /*------------------------------------------------------------------------- | 33 | /* |
36 | * Standard clock functions defined in include/linux/clk.h | 34 | * Standard clock functions defined in include/linux/clk.h |
37 | *-------------------------------------------------------------------------*/ | 35 | */ |
38 | 36 | ||
39 | int clk_enable(struct clk *clk) | 37 | int clk_enable(struct clk *clk) |
40 | { | 38 | { |
@@ -92,9 +90,9 @@ unsigned long clk_get_rate(struct clk *clk) | |||
92 | } | 90 | } |
93 | EXPORT_SYMBOL(clk_get_rate); | 91 | EXPORT_SYMBOL(clk_get_rate); |
94 | 92 | ||
95 | /*------------------------------------------------------------------------- | 93 | /* |
96 | * Optional clock functions defined in include/linux/clk.h | 94 | * Optional clock functions defined in include/linux/clk.h |
97 | *-------------------------------------------------------------------------*/ | 95 | */ |
98 | 96 | ||
99 | long clk_round_rate(struct clk *clk, unsigned long rate) | 97 | long clk_round_rate(struct clk *clk, unsigned long rate) |
100 | { | 98 | { |
@@ -140,9 +138,6 @@ int clk_set_parent(struct clk *clk, struct clk *parent) | |||
140 | unsigned long flags; | 138 | unsigned long flags; |
141 | int ret = -EINVAL; | 139 | int ret = -EINVAL; |
142 | 140 | ||
143 | if (cpu_is_omap44xx()) | ||
144 | /* OMAP4 clk framework not supported yet */ | ||
145 | return 0; | ||
146 | if (clk == NULL || IS_ERR(clk) || parent == NULL || IS_ERR(parent)) | 141 | if (clk == NULL || IS_ERR(clk) || parent == NULL || IS_ERR(parent)) |
147 | return ret; | 142 | return ret; |
148 | 143 | ||
@@ -169,9 +164,9 @@ struct clk *clk_get_parent(struct clk *clk) | |||
169 | } | 164 | } |
170 | EXPORT_SYMBOL(clk_get_parent); | 165 | EXPORT_SYMBOL(clk_get_parent); |
171 | 166 | ||
172 | /*------------------------------------------------------------------------- | 167 | /* |
173 | * OMAP specific clock functions shared between omap1 and omap2 | 168 | * OMAP specific clock functions shared between omap1 and omap2 |
174 | *-------------------------------------------------------------------------*/ | 169 | */ |
175 | 170 | ||
176 | int __initdata mpurate; | 171 | int __initdata mpurate; |
177 | 172 | ||
@@ -222,7 +217,7 @@ void clk_reparent(struct clk *child, struct clk *parent) | |||
222 | } | 217 | } |
223 | 218 | ||
224 | /* Propagate rate to children */ | 219 | /* Propagate rate to children */ |
225 | void propagate_rate(struct clk * tclk) | 220 | void propagate_rate(struct clk *tclk) |
226 | { | 221 | { |
227 | struct clk *clkp; | 222 | struct clk *clkp; |
228 | 223 | ||
@@ -389,7 +384,9 @@ void clk_exit_cpufreq_table(struct cpufreq_frequency_table **table) | |||
389 | } | 384 | } |
390 | #endif | 385 | #endif |
391 | 386 | ||
392 | /*-------------------------------------------------------------------------*/ | 387 | /* |
388 | * | ||
389 | */ | ||
393 | 390 | ||
394 | #ifdef CONFIG_OMAP_RESET_CLOCKS | 391 | #ifdef CONFIG_OMAP_RESET_CLOCKS |
395 | /* | 392 | /* |
@@ -404,7 +401,7 @@ static int __init clk_disable_unused(void) | |||
404 | if (ck->ops == &clkops_null) | 401 | if (ck->ops == &clkops_null) |
405 | continue; | 402 | continue; |
406 | 403 | ||
407 | if (ck->usecount > 0 || ck->enable_reg == 0) | 404 | if (ck->usecount > 0 || !ck->enable_reg) |
408 | continue; | 405 | continue; |
409 | 406 | ||
410 | spin_lock_irqsave(&clockfw_lock, flags); | 407 | spin_lock_irqsave(&clockfw_lock, flags); |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 4d99dfbc8bef..c64875f11fac 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -264,8 +264,8 @@ static struct omap_dm_timer omap4_dm_timers[] = { | |||
264 | { .phys_base = 0x4a320000, .irq = OMAP44XX_IRQ_GPT12 }, | 264 | { .phys_base = 0x4a320000, .irq = OMAP44XX_IRQ_GPT12 }, |
265 | }; | 265 | }; |
266 | static const char *omap4_dm_source_names[] __initdata = { | 266 | static const char *omap4_dm_source_names[] __initdata = { |
267 | "sys_ck", | 267 | "sys_clkin_ck", |
268 | "omap_32k_fck", | 268 | "sys_32k_ck", |
269 | NULL | 269 | NULL |
270 | }; | 270 | }; |
271 | static struct clk *omap4_dm_source_clocks[2]; | 271 | static struct clk *omap4_dm_source_clocks[2]; |
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h index 34f7fa9ad4c0..dfc472ca0cc4 100644 --- a/arch/arm/plat-omap/include/plat/clock.h +++ b/arch/arm/plat-omap/include/plat/clock.h | |||
@@ -196,15 +196,15 @@ extern struct clk dummy_ck; | |||
196 | #define INVERT_ENABLE (1 << 4) /* 0 enables, 1 disables */ | 196 | #define INVERT_ENABLE (1 << 4) /* 0 enables, 1 disables */ |
197 | 197 | ||
198 | /* Clksel_rate flags */ | 198 | /* Clksel_rate flags */ |
199 | #define DEFAULT_RATE (1 << 0) | 199 | #define RATE_IN_242X (1 << 0) |
200 | #define RATE_IN_242X (1 << 1) | 200 | #define RATE_IN_243X (1 << 1) |
201 | #define RATE_IN_243X (1 << 2) | 201 | #define RATE_IN_3XXX (1 << 2) /* rates common to all OMAP3 */ |
202 | #define RATE_IN_343X (1 << 3) /* rates common to all 343X */ | 202 | #define RATE_IN_3430ES2 (1 << 3) /* 3430ES2 rates only */ |
203 | #define RATE_IN_3430ES2 (1 << 4) /* 3430ES2 rates only */ | 203 | #define RATE_IN_36XX (1 << 4) |
204 | #define RATE_IN_36XX (1 << 5) | 204 | #define RATE_IN_4430 (1 << 5) |
205 | #define RATE_IN_4430 (1 << 6) | ||
206 | 205 | ||
207 | #define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X) | 206 | #define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X) |
208 | 207 | ||
208 | #define RATE_IN_3430ES2PLUS (RATE_IN_3430ES2 | RATE_IN_36XX) | ||
209 | 209 | ||
210 | #endif | 210 | #endif |
diff --git a/arch/arm/plat-omap/include/plat/omap44xx.h b/arch/arm/plat-omap/include/plat/omap44xx.h index bb94a0baee8a..8b3f12ff5cbc 100644 --- a/arch/arm/plat-omap/include/plat/omap44xx.h +++ b/arch/arm/plat-omap/include/plat/omap44xx.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #define OMAP4430_CM_BASE OMAP4430_CM1_BASE | 30 | #define OMAP4430_CM_BASE OMAP4430_CM1_BASE |
31 | #define OMAP4430_CM2_BASE 0x4a008000 | 31 | #define OMAP4430_CM2_BASE 0x4a008000 |
32 | #define OMAP4430_PRM_BASE 0x4a306000 | 32 | #define OMAP4430_PRM_BASE 0x4a306000 |
33 | #define OMAP4430_PRCM_MPU_BASE 0x48243000 | ||
33 | #define OMAP44XX_GPMC_BASE 0x50000000 | 34 | #define OMAP44XX_GPMC_BASE 0x50000000 |
34 | #define OMAP443X_SCM_BASE 0x4a002000 | 35 | #define OMAP443X_SCM_BASE 0x4a002000 |
35 | #define OMAP443X_CTRL_BASE 0x4a100000 | 36 | #define OMAP443X_CTRL_BASE 0x4a100000 |
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 36d6ea56ab51..0eccc09ac4a9 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -176,9 +176,8 @@ struct omap_hwmod_addr_space { | |||
176 | #define OCP_USER_SDMA (1 << 1) | 176 | #define OCP_USER_SDMA (1 << 1) |
177 | 177 | ||
178 | /* omap_hwmod_ocp_if.flags bits */ | 178 | /* omap_hwmod_ocp_if.flags bits */ |
179 | #define OCPIF_HAS_IDLEST (1 << 0) | 179 | #define OCPIF_SWSUP_IDLE (1 << 0) |
180 | #define OCPIF_SWSUP_IDLE (1 << 1) | 180 | #define OCPIF_CAN_BURST (1 << 1) |
181 | #define OCPIF_CAN_BURST (1 << 2) | ||
182 | 181 | ||
183 | /** | 182 | /** |
184 | * struct omap_hwmod_ocp_if - OCP interface data | 183 | * struct omap_hwmod_ocp_if - OCP interface data |
@@ -327,14 +326,12 @@ struct omap_hwmod_omap2_prcm { | |||
327 | 326 | ||
328 | /** | 327 | /** |
329 | * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data | 328 | * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data |
330 | * @module_offs: PRCM submodule offset from the start of the PRM/CM1/CM2 | 329 | * @clkctrl_reg: PRCM address of the clock control register |
331 | * @device_offs: device register offset from @module_offs | ||
332 | * @submodule_wkdep_bit: bit shift of the WKDEP range | 330 | * @submodule_wkdep_bit: bit shift of the WKDEP range |
333 | */ | 331 | */ |
334 | struct omap_hwmod_omap4_prcm { | 332 | struct omap_hwmod_omap4_prcm { |
335 | u32 module_offs; | 333 | void __iomem *clkctrl_reg; |
336 | u16 device_offs; | 334 | u8 submodule_wkdep_bit; |
337 | u8 submodule_wkdep_bit; | ||
338 | }; | 335 | }; |
339 | 336 | ||
340 | 337 | ||
@@ -353,6 +350,8 @@ struct omap_hwmod_omap4_prcm { | |||
353 | * when module is enabled, rather than the default, which is to | 350 | * when module is enabled, rather than the default, which is to |
354 | * enable autoidle | 351 | * enable autoidle |
355 | * HWMOD_SET_DEFAULT_CLOCKACT: program CLOCKACTIVITY bits at startup | 352 | * HWMOD_SET_DEFAULT_CLOCKACT: program CLOCKACTIVITY bits at startup |
353 | * HWMOD_NO_IDLEST : this module does not have idle status - this is the case | ||
354 | * only for few initiator modules on OMAP2 & 3. | ||
356 | */ | 355 | */ |
357 | #define HWMOD_SWSUP_SIDLE (1 << 0) | 356 | #define HWMOD_SWSUP_SIDLE (1 << 0) |
358 | #define HWMOD_SWSUP_MSTANDBY (1 << 1) | 357 | #define HWMOD_SWSUP_MSTANDBY (1 << 1) |
@@ -360,6 +359,7 @@ struct omap_hwmod_omap4_prcm { | |||
360 | #define HWMOD_INIT_NO_IDLE (1 << 3) | 359 | #define HWMOD_INIT_NO_IDLE (1 << 3) |
361 | #define HWMOD_NO_OCP_AUTOIDLE (1 << 4) | 360 | #define HWMOD_NO_OCP_AUTOIDLE (1 << 4) |
362 | #define HWMOD_SET_DEFAULT_CLOCKACT (1 << 5) | 361 | #define HWMOD_SET_DEFAULT_CLOCKACT (1 << 5) |
362 | #define HWMOD_NO_IDLEST (1 << 6) | ||
363 | 363 | ||
364 | /* | 364 | /* |
365 | * omap_hwmod._int_flags definitions | 365 | * omap_hwmod._int_flags definitions |
diff --git a/arch/arm/plat-omap/include/plat/powerdomain.h b/arch/arm/plat-omap/include/plat/powerdomain.h index d82b2c00d4f1..fb6ec74fe39e 100644 --- a/arch/arm/plat-omap/include/plat/powerdomain.h +++ b/arch/arm/plat-omap/include/plat/powerdomain.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #define PWRDM_MAX_PWRSTS 4 | 31 | #define PWRDM_MAX_PWRSTS 4 |
32 | 32 | ||
33 | /* Powerdomain allowable state bitfields */ | 33 | /* Powerdomain allowable state bitfields */ |
34 | #define PWRSTS_ON (1 << PWRDM_POWER_ON) | ||
34 | #define PWRSTS_OFF_ON ((1 << PWRDM_POWER_OFF) | \ | 35 | #define PWRSTS_OFF_ON ((1 << PWRDM_POWER_OFF) | \ |
35 | (1 << PWRDM_POWER_ON)) | 36 | (1 << PWRDM_POWER_ON)) |
36 | 37 | ||
@@ -49,6 +50,12 @@ | |||
49 | * in MEM bank 1 position. This is | 50 | * in MEM bank 1 position. This is |
50 | * true for OMAP3430 | 51 | * true for OMAP3430 |
51 | */ | 52 | */ |
53 | #define PWRDM_HAS_LOWPOWERSTATECHANGE (1 << 2) /* | ||
54 | * support to transition from a | ||
55 | * sleep state to a lower sleep | ||
56 | * state without waking up the | ||
57 | * powerdomain | ||
58 | */ | ||
52 | 59 | ||
53 | /* | 60 | /* |
54 | * Number of memory banks that are power-controllable. On OMAP4430, the | 61 | * Number of memory banks that are power-controllable. On OMAP4430, the |
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index 0f5197479513..f899603051ac 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -2,10 +2,10 @@ | |||
2 | * omap_device implementation | 2 | * omap_device implementation |
3 | * | 3 | * |
4 | * Copyright (C) 2009 Nokia Corporation | 4 | * Copyright (C) 2009 Nokia Corporation |
5 | * Paul Walmsley | 5 | * Paul Walmsley, Kevin Hilman |
6 | * | 6 | * |
7 | * Developed in collaboration with (alphabetical order): Benoit | 7 | * Developed in collaboration with (alphabetical order): Benoit |
8 | * Cousson, Kevin Hilman, Tony Lindgren, Rajendra Nayak, Vikram | 8 | * Cousson, Thara Gopinath, Tony Lindgren, Rajendra Nayak, Vikram |
9 | * Pandita, Sakari Poussa, Anand Sawant, Santosh Shilimkar, Richard | 9 | * Pandita, Sakari Poussa, Anand Sawant, Santosh Shilimkar, Richard |
10 | * Woodruff | 10 | * Woodruff |
11 | * | 11 | * |