aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/prm2xxx_3xxx.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-12-21 23:05:14 -0500
committerPaul Walmsley <paul@pwsan.com>2010-12-21 23:05:14 -0500
commitc4d7e58fb52c632d8e33cd23a4917d7a7f8302ac (patch)
tree20a56db9f93ff411fc439ea1961b1e51f2ecf15b /arch/arm/mach-omap2/prm2xxx_3xxx.c
parentdac9a77120e2724e22696f06f3ecb4838da1e3e4 (diff)
OMAP2/3: PRM/CM: prefix OMAP2 PRM/CM functions with "omap2_"
Now that OMAP4-specific PRCM functions have been added, distinguish the existing OMAP2/3-specific PRCM functions by prefixing them with "omap2_". This patch should not result in any functional change. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Jarkko Nikula <jhnikula@gmail.com> Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Rajendra Nayak <rnayak@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/prm2xxx_3xxx.c')
-rw-r--r--arch/arm/mach-omap2/prm2xxx_3xxx.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c
index 3e1d36c83fc4..ec0362574b5e 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c
@@ -25,49 +25,49 @@
25#include "prm-regbits-24xx.h" 25#include "prm-regbits-24xx.h"
26#include "prm-regbits-34xx.h" 26#include "prm-regbits-34xx.h"
27 27
28u32 prm_read_mod_reg(s16 module, u16 idx) 28u32 omap2_prm_read_mod_reg(s16 module, u16 idx)
29{ 29{
30 return __raw_readl(prm_base + module + idx); 30 return __raw_readl(prm_base + module + idx);
31} 31}
32 32
33void prm_write_mod_reg(u32 val, s16 module, u16 idx) 33void omap2_prm_write_mod_reg(u32 val, s16 module, u16 idx)
34{ 34{
35 __raw_writel(val, prm_base + module + idx); 35 __raw_writel(val, prm_base + module + idx);
36} 36}
37 37
38/* Read-modify-write a register in a PRM module. Caller must lock */ 38/* Read-modify-write a register in a PRM module. Caller must lock */
39u32 prm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx) 39u32 omap2_prm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx)
40{ 40{
41 u32 v; 41 u32 v;
42 42
43 v = prm_read_mod_reg(module, idx); 43 v = omap2_prm_read_mod_reg(module, idx);
44 v &= ~mask; 44 v &= ~mask;
45 v |= bits; 45 v |= bits;
46 prm_write_mod_reg(v, module, idx); 46 omap2_prm_write_mod_reg(v, module, idx);
47 47
48 return v; 48 return v;
49} 49}
50 50
51/* Read a PRM register, AND it, and shift the result down to bit 0 */ 51/* Read a PRM register, AND it, and shift the result down to bit 0 */
52u32 prm_read_mod_bits_shift(s16 domain, s16 idx, u32 mask) 52u32 omap2_prm_read_mod_bits_shift(s16 domain, s16 idx, u32 mask)
53{ 53{
54 u32 v; 54 u32 v;
55 55
56 v = prm_read_mod_reg(domain, idx); 56 v = omap2_prm_read_mod_reg(domain, idx);
57 v &= mask; 57 v &= mask;
58 v >>= __ffs(mask); 58 v >>= __ffs(mask);
59 59
60 return v; 60 return v;
61} 61}
62 62
63u32 prm_set_mod_reg_bits(u32 bits, s16 module, s16 idx) 63u32 omap2_prm_set_mod_reg_bits(u32 bits, s16 module, s16 idx)
64{ 64{
65 return prm_rmw_mod_reg_bits(bits, bits, module, idx); 65 return omap2_prm_rmw_mod_reg_bits(bits, bits, module, idx);
66} 66}
67 67
68u32 prm_clear_mod_reg_bits(u32 bits, s16 module, s16 idx) 68u32 omap2_prm_clear_mod_reg_bits(u32 bits, s16 module, s16 idx)
69{ 69{
70 return prm_rmw_mod_reg_bits(bits, 0x0, module, idx); 70 return omap2_prm_rmw_mod_reg_bits(bits, 0x0, module, idx);
71} 71}
72 72
73 73
@@ -86,7 +86,7 @@ int omap2_prm_is_hardreset_asserted(s16 prm_mod, u8 shift)
86 if (!(cpu_is_omap24xx() || cpu_is_omap34xx())) 86 if (!(cpu_is_omap24xx() || cpu_is_omap34xx()))
87 return -EINVAL; 87 return -EINVAL;
88 88
89 return prm_read_mod_bits_shift(prm_mod, OMAP2_RM_RSTCTRL, 89 return omap2_prm_read_mod_bits_shift(prm_mod, OMAP2_RM_RSTCTRL,
90 (1 << shift)); 90 (1 << shift));
91} 91}
92 92
@@ -110,7 +110,7 @@ int omap2_prm_assert_hardreset(s16 prm_mod, u8 shift)
110 return -EINVAL; 110 return -EINVAL;
111 111
112 mask = 1 << shift; 112 mask = 1 << shift;
113 prm_rmw_mod_reg_bits(mask, mask, prm_mod, OMAP2_RM_RSTCTRL); 113 omap2_prm_rmw_mod_reg_bits(mask, mask, prm_mod, OMAP2_RM_RSTCTRL);
114 114
115 return 0; 115 return 0;
116} 116}
@@ -140,15 +140,15 @@ int omap2_prm_deassert_hardreset(s16 prm_mod, u8 shift)
140 mask = 1 << shift; 140 mask = 1 << shift;
141 141
142 /* Check the current status to avoid de-asserting the line twice */ 142 /* Check the current status to avoid de-asserting the line twice */
143 if (prm_read_mod_bits_shift(prm_mod, OMAP2_RM_RSTCTRL, mask) == 0) 143 if (omap2_prm_read_mod_bits_shift(prm_mod, OMAP2_RM_RSTCTRL, mask) == 0)
144 return -EEXIST; 144 return -EEXIST;
145 145
146 /* Clear the reset status by writing 1 to the status bit */ 146 /* Clear the reset status by writing 1 to the status bit */
147 prm_rmw_mod_reg_bits(0xffffffff, mask, prm_mod, OMAP2_RM_RSTST); 147 omap2_prm_rmw_mod_reg_bits(0xffffffff, mask, prm_mod, OMAP2_RM_RSTST);
148 /* de-assert the reset control line */ 148 /* de-assert the reset control line */
149 prm_rmw_mod_reg_bits(mask, 0, prm_mod, OMAP2_RM_RSTCTRL); 149 omap2_prm_rmw_mod_reg_bits(mask, 0, prm_mod, OMAP2_RM_RSTCTRL);
150 /* wait the status to be set */ 150 /* wait the status to be set */
151 omap_test_timeout(prm_read_mod_bits_shift(prm_mod, OMAP2_RM_RSTST, 151 omap_test_timeout(omap2_prm_read_mod_bits_shift(prm_mod, OMAP2_RM_RSTST,
152 mask), 152 mask),
153 MAX_MODULE_HARDRESET_WAIT, c); 153 MAX_MODULE_HARDRESET_WAIT, c);
154 154