aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/prcm.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-02-24 23:53:03 -0500
committerTony Lindgren <tony@atomide.com>2010-02-24 23:53:03 -0500
commitb610ec502376d915b76a62e22576c5d0462cc9c9 (patch)
tree55206c47da1f010588964edafe09284fce704b63 /arch/arm/mach-omap2/prcm.c
parent0fdc54b2019700a4b50179914e810367c14044a3 (diff)
parentad001f145dcf457251e78fe2ae2ed40df1bda4ed (diff)
Merge branch 'for_2.6.34_b' of git://git.pwsan.com/linux-2.6 into omap-for-linus
Diffstat (limited to 'arch/arm/mach-omap2/prcm.c')
-rw-r--r--arch/arm/mach-omap2/prcm.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 338d5f67ef0d..81872aacb801 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -127,13 +127,15 @@ u32 omap_prcm_get_reset_sources(void)
127 return prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTST) & 0x7f; 127 return prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTST) & 0x7f;
128 if (cpu_is_omap44xx()) 128 if (cpu_is_omap44xx())
129 return prm_read_mod_reg(WKUP_MOD, OMAP4_RM_RSTST) & 0x7f; 129 return prm_read_mod_reg(WKUP_MOD, OMAP4_RM_RSTST) & 0x7f;
130
131 return 0;
130} 132}
131EXPORT_SYMBOL(omap_prcm_get_reset_sources); 133EXPORT_SYMBOL(omap_prcm_get_reset_sources);
132 134
133/* Resets clock rates and reboots the system. Only called from system.h */ 135/* Resets clock rates and reboots the system. Only called from system.h */
134void omap_prcm_arch_reset(char mode) 136void omap_prcm_arch_reset(char mode)
135{ 137{
136 s16 prcm_offs; 138 s16 prcm_offs = 0;
137 139
138 if (cpu_is_omap24xx()) { 140 if (cpu_is_omap24xx()) {
139 omap2xxx_clk_prepare_for_reboot(); 141 omap2xxx_clk_prepare_for_reboot();
@@ -242,26 +244,22 @@ u32 cm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx)
242 * omap2_cm_wait_idlest - wait for IDLEST bit to indicate module readiness 244 * omap2_cm_wait_idlest - wait for IDLEST bit to indicate module readiness
243 * @reg: physical address of module IDLEST register 245 * @reg: physical address of module IDLEST register
244 * @mask: value to mask against to determine if the module is active 246 * @mask: value to mask against to determine if the module is active
247 * @idlest: idle state indicator (0 or 1) for the clock
245 * @name: name of the clock (for printk) 248 * @name: name of the clock (for printk)
246 * 249 *
247 * Returns 1 if the module indicated readiness in time, or 0 if it 250 * Returns 1 if the module indicated readiness in time, or 0 if it
248 * failed to enable in roughly MAX_MODULE_ENABLE_WAIT microseconds. 251 * failed to enable in roughly MAX_MODULE_ENABLE_WAIT microseconds.
249 */ 252 */
250int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, const char *name) 253int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, u8 idlest,
254 const char *name)
251{ 255{
252 int i = 0; 256 int i = 0;
253 int ena = 0; 257 int ena = 0;
254 258
255 /* 259 if (idlest)
256 * 24xx uses 0 to indicate not ready, and 1 to indicate ready.
257 * 34xx reverses this, just to keep us on our toes
258 */
259 if (cpu_is_omap24xx())
260 ena = mask;
261 else if (cpu_is_omap34xx())
262 ena = 0; 260 ena = 0;
263 else 261 else
264 BUG(); 262 ena = mask;
265 263
266 /* Wait for lock */ 264 /* Wait for lock */
267 omap_test_timeout(((__raw_readl(reg) & mask) == ena), 265 omap_test_timeout(((__raw_readl(reg) & mask) == ena),