diff options
author | Abhijit Pagare <abhijitpagare@ti.com> | 2010-01-26 22:12:51 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-01-26 22:12:51 -0500 |
commit | 3790300903e6a98ce5f5391f4d435959266f79e7 (patch) | |
tree | cd78bf9d180466df0cd5b2f0c5b5c46d6471a54e /arch/arm/mach-omap2/prcm.c | |
parent | c6a6e6e203ee9a34fa53f773272f21d48b4e3454 (diff) |
ARM: OMAP4: PM: OMAP4 Power Domain Porting Related Clean-up.
Module offsets were same for OMAP2 and OMAP3 while they differ for OMAP4.
Hence we need different macros for identifying platform specific offsets.
Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/prcm.c')
-rw-r--r-- | arch/arm/mach-omap2/prcm.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index cf466ea1dffc..b4ba14974b37 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * Rajendra Nayak <rnayak@ti.com> | 11 | * Rajendra Nayak <rnayak@ti.com> |
12 | * | 12 | * |
13 | * Some pieces of code Copyright (C) 2005 Texas Instruments, Inc. | 13 | * Some pieces of code Copyright (C) 2005 Texas Instruments, Inc. |
14 | * Upgraded with OMAP4 support by Abhijit Pagare <abhijitpagare@ti.com> | ||
14 | * | 15 | * |
15 | * This program is free software; you can redistribute it and/or modify | 16 | * This program is free software; you can redistribute it and/or modify |
16 | * it under the terms of the GNU General Public License version 2 as | 17 | * it under the terms of the GNU General Public License version 2 as |
@@ -121,7 +122,10 @@ struct omap3_prcm_regs prcm_context; | |||
121 | u32 omap_prcm_get_reset_sources(void) | 122 | u32 omap_prcm_get_reset_sources(void) |
122 | { | 123 | { |
123 | /* XXX This presumably needs modification for 34XX */ | 124 | /* XXX This presumably needs modification for 34XX */ |
124 | return prm_read_mod_reg(WKUP_MOD, RM_RSTST) & 0x7f; | 125 | if (cpu_is_omap24xx() | cpu_is_omap34xx()) |
126 | return prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTST) & 0x7f; | ||
127 | if (cpu_is_omap44xx()) | ||
128 | return prm_read_mod_reg(WKUP_MOD, OMAP4_RM_RSTST) & 0x7f; | ||
125 | } | 129 | } |
126 | EXPORT_SYMBOL(omap_prcm_get_reset_sources); | 130 | EXPORT_SYMBOL(omap_prcm_get_reset_sources); |
127 | 131 | ||
@@ -144,10 +148,17 @@ void omap_prcm_arch_reset(char mode) | |||
144 | * cf. OMAP34xx TRM, Initialization / Software Booting | 148 | * cf. OMAP34xx TRM, Initialization / Software Booting |
145 | * Configuration. */ | 149 | * Configuration. */ |
146 | omap_writel(l, OMAP343X_SCRATCHPAD + 4); | 150 | omap_writel(l, OMAP343X_SCRATCHPAD + 4); |
147 | } else | 151 | } else if (cpu_is_omap44xx()) |
152 | prcm_offs = OMAP4430_PRM_DEVICE_MOD; | ||
153 | else | ||
148 | WARN_ON(1); | 154 | WARN_ON(1); |
149 | 155 | ||
150 | prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs, RM_RSTCTRL); | 156 | if (cpu_is_omap24xx() | cpu_is_omap34xx()) |
157 | prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs, | ||
158 | OMAP2_RM_RSTCTRL); | ||
159 | if (cpu_is_omap44xx()) | ||
160 | prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs, | ||
161 | OMAP4_RM_RSTCTRL); | ||
151 | } | 162 | } |
152 | 163 | ||
153 | static inline u32 __omap_prcm_read(void __iomem *base, s16 module, u16 reg) | 164 | static inline u32 __omap_prcm_read(void __iomem *base, s16 module, u16 reg) |