aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorVictor Kamensky <victor.kamensky@linaro.org>2014-04-15 13:37:46 -0400
committerTony Lindgren <tony@atomide.com>2014-05-08 10:09:53 -0400
commitedfaf05c2fcb853fcf35f12aeb9c340f5913337f (patch)
treef3d0d7ca941855237953f65680932a8a433b0ed4 /arch/arm
parent89ca3b881987f5a4be4c5dbaa7f0df12bbdde2fd (diff)
ARM: OMAP2+: raw read and write endian fix
All OMAP IP blocks expect LE data, but CPU may operate in BE mode. Need to use endian neutral functions to read/write h/w registers. I.e instead of __raw_read[lw] and __raw_write[lw] functions code need to use read[lw]_relaxed and write[lw]_relaxed functions. If the first simply reads/writes register, the second will byteswap it if host operates in BE mode. Changes are trivial sed like replacement of __raw_xxx functions with xxx_relaxed variant. Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/board-flash.c4
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_dpllcore.c2
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_osc.c8
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_sys.c2
-rw-r--r--arch/arm/mach-omap2/cm2xxx_3xxx.h4
-rw-r--r--arch/arm/mach-omap2/cm33xx.c4
-rw-r--r--arch/arm/mach-omap2/cm3xxx.c8
-rw-r--r--arch/arm/mach-omap2/cm44xx.c8
-rw-r--r--arch/arm/mach-omap2/cminst44xx.c4
-rw-r--r--arch/arm/mach-omap2/control.c20
-rw-r--r--arch/arm/mach-omap2/dma.c4
-rw-r--r--arch/arm/mach-omap2/gpmc.c8
-rw-r--r--arch/arm/mach-omap2/id.c2
-rw-r--r--arch/arm/mach-omap2/irq.c4
-rw-r--r--arch/arm/mach-omap2/mux.c8
-rw-r--r--arch/arm/mach-omap2/omap-hotplug.c4
-rw-r--r--arch/arm/mach-omap2/omap-mpuss-lowpower.c18
-rw-r--r--arch/arm/mach-omap2/omap-smp.c6
-rw-r--r--arch/arm/mach-omap2/omap-wakeupgen.c42
-rw-r--r--arch/arm/mach-omap2/omap4-common.c18
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c10
-rw-r--r--arch/arm/mach-omap2/omap_phy_internal.c6
-rw-r--r--arch/arm/mach-omap2/prcm_mpu44xx.c4
-rw-r--r--arch/arm/mach-omap2/prm2xxx.h2
-rw-r--r--arch/arm/mach-omap2/prm2xxx_3xxx.h4
-rw-r--r--arch/arm/mach-omap2/prm33xx.c4
-rw-r--r--arch/arm/mach-omap2/prm3xxx.h2
-rw-r--r--arch/arm/mach-omap2/prm44xx.c4
-rw-r--r--arch/arm/mach-omap2/prminst44xx.c4
-rw-r--r--arch/arm/mach-omap2/sdrc.h8
-rw-r--r--arch/arm/mach-omap2/sdrc2xxx.c4
-rw-r--r--arch/arm/mach-omap2/sr_device.c2
-rw-r--r--arch/arm/mach-omap2/sram.c16
-rw-r--r--arch/arm/mach-omap2/timer.c8
-rw-r--r--arch/arm/mach-omap2/vc.c4
-rw-r--r--arch/arm/mach-omap2/wd_timer.c8
36 files changed, 134 insertions, 134 deletions
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
index ac82512b9c8c..84cc1482e584 100644
--- a/arch/arm/mach-omap2/board-flash.c
+++ b/arch/arm/mach-omap2/board-flash.c
@@ -160,13 +160,13 @@ static u8 get_gpmc0_type(void)
160 if (!fpga_map_addr) 160 if (!fpga_map_addr)
161 return -ENOMEM; 161 return -ENOMEM;
162 162
163 if (!(__raw_readw(fpga_map_addr + REG_FPGA_REV))) 163 if (!(readw_relaxed(fpga_map_addr + REG_FPGA_REV)))
164 /* we dont have an DEBUG FPGA??? */ 164 /* we dont have an DEBUG FPGA??? */
165 /* Depend on #defines!! default to strata boot return param */ 165 /* Depend on #defines!! default to strata boot return param */
166 goto unmap; 166 goto unmap;
167 167
168 /* S8-DIP-OFF = 1, S8-DIP-ON = 0 */ 168 /* S8-DIP-OFF = 1, S8-DIP-ON = 0 */
169 cs = __raw_readw(fpga_map_addr + REG_FPGA_DIP_SWITCH_INPUT2) & 0xf; 169 cs = readw_relaxed(fpga_map_addr + REG_FPGA_DIP_SWITCH_INPUT2) & 0xf;
170 170
171 /* ES2.0 SDP's onwards 4 dip switches are provided for CS */ 171 /* ES2.0 SDP's onwards 4 dip switches are provided for CS */
172 if (omap_rev() >= OMAP3430_REV_ES1_0) 172 if (omap_rev() >= OMAP3430_REV_ES1_0)
diff --git a/arch/arm/mach-omap2/clkt2xxx_dpllcore.c b/arch/arm/mach-omap2/clkt2xxx_dpllcore.c
index 3ff32543493c..59cf310bc1e9 100644
--- a/arch/arm/mach-omap2/clkt2xxx_dpllcore.c
+++ b/arch/arm/mach-omap2/clkt2xxx_dpllcore.c
@@ -138,7 +138,7 @@ int omap2_reprogram_dpllcore(struct clk_hw *hw, unsigned long rate,
138 if (!dd) 138 if (!dd)
139 return -EINVAL; 139 return -EINVAL;
140 140
141 tmpset.cm_clksel1_pll = __raw_readl(dd->mult_div1_reg); 141 tmpset.cm_clksel1_pll = readl_relaxed(dd->mult_div1_reg);
142 tmpset.cm_clksel1_pll &= ~(dd->mult_mask | 142 tmpset.cm_clksel1_pll &= ~(dd->mult_mask |
143 dd->div1_mask); 143 dd->div1_mask);
144 div = ((curr_prcm_set->xtal_speed / 1000000) - 1); 144 div = ((curr_prcm_set->xtal_speed / 1000000) - 1);
diff --git a/arch/arm/mach-omap2/clkt2xxx_osc.c b/arch/arm/mach-omap2/clkt2xxx_osc.c
index 19f54d433490..0717dff1bc04 100644
--- a/arch/arm/mach-omap2/clkt2xxx_osc.c
+++ b/arch/arm/mach-omap2/clkt2xxx_osc.c
@@ -39,9 +39,9 @@ int omap2_enable_osc_ck(struct clk_hw *clk)
39{ 39{
40 u32 pcc; 40 u32 pcc;
41 41
42 pcc = __raw_readl(prcm_clksrc_ctrl); 42 pcc = readl_relaxed(prcm_clksrc_ctrl);
43 43
44 __raw_writel(pcc & ~OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl); 44 writel_relaxed(pcc & ~OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
45 45
46 return 0; 46 return 0;
47} 47}
@@ -57,9 +57,9 @@ void omap2_disable_osc_ck(struct clk_hw *clk)
57{ 57{
58 u32 pcc; 58 u32 pcc;
59 59
60 pcc = __raw_readl(prcm_clksrc_ctrl); 60 pcc = readl_relaxed(prcm_clksrc_ctrl);
61 61
62 __raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl); 62 writel_relaxed(pcc | OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
63} 63}
64 64
65unsigned long omap2_osc_clk_recalc(struct clk_hw *clk, 65unsigned long omap2_osc_clk_recalc(struct clk_hw *clk,
diff --git a/arch/arm/mach-omap2/clkt2xxx_sys.c b/arch/arm/mach-omap2/clkt2xxx_sys.c
index f467d072cd02..58dd3a9b726c 100644
--- a/arch/arm/mach-omap2/clkt2xxx_sys.c
+++ b/arch/arm/mach-omap2/clkt2xxx_sys.c
@@ -33,7 +33,7 @@ u32 omap2xxx_get_sysclkdiv(void)
33{ 33{
34 u32 div; 34 u32 div;
35 35
36 div = __raw_readl(prcm_clksrc_ctrl); 36 div = readl_relaxed(prcm_clksrc_ctrl);
37 div &= OMAP_SYSCLKDIV_MASK; 37 div &= OMAP_SYSCLKDIV_MASK;
38 div >>= OMAP_SYSCLKDIV_SHIFT; 38 div >>= OMAP_SYSCLKDIV_SHIFT;
39 39
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.h b/arch/arm/mach-omap2/cm2xxx_3xxx.h
index bfbd16fe9151..72928a3ce2aa 100644
--- a/arch/arm/mach-omap2/cm2xxx_3xxx.h
+++ b/arch/arm/mach-omap2/cm2xxx_3xxx.h
@@ -52,12 +52,12 @@
52 52
53static inline u32 omap2_cm_read_mod_reg(s16 module, u16 idx) 53static inline u32 omap2_cm_read_mod_reg(s16 module, u16 idx)
54{ 54{
55 return __raw_readl(cm_base + module + idx); 55 return readl_relaxed(cm_base + module + idx);
56} 56}
57 57
58static inline void omap2_cm_write_mod_reg(u32 val, s16 module, u16 idx) 58static inline void omap2_cm_write_mod_reg(u32 val, s16 module, u16 idx)
59{ 59{
60 __raw_writel(val, cm_base + module + idx); 60 writel_relaxed(val, cm_base + module + idx);
61} 61}
62 62
63/* Read-modify-write a register in a CM module. Caller must lock */ 63/* Read-modify-write a register in a CM module. Caller must lock */
diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c
index 40a22e5649ae..b3f99e93def0 100644
--- a/arch/arm/mach-omap2/cm33xx.c
+++ b/arch/arm/mach-omap2/cm33xx.c
@@ -50,13 +50,13 @@
50/* Read a register in a CM instance */ 50/* Read a register in a CM instance */
51static inline u32 am33xx_cm_read_reg(u16 inst, u16 idx) 51static inline u32 am33xx_cm_read_reg(u16 inst, u16 idx)
52{ 52{
53 return __raw_readl(cm_base + inst + idx); 53 return readl_relaxed(cm_base + inst + idx);
54} 54}
55 55
56/* Write into a register in a CM */ 56/* Write into a register in a CM */
57static inline void am33xx_cm_write_reg(u32 val, u16 inst, u16 idx) 57static inline void am33xx_cm_write_reg(u32 val, u16 inst, u16 idx)
58{ 58{
59 __raw_writel(val, cm_base + inst + idx); 59 writel_relaxed(val, cm_base + inst + idx);
60} 60}
61 61
62/* Read-modify-write a register in CM */ 62/* Read-modify-write a register in CM */
diff --git a/arch/arm/mach-omap2/cm3xxx.c b/arch/arm/mach-omap2/cm3xxx.c
index f6f028867bfe..9079f2558b1b 100644
--- a/arch/arm/mach-omap2/cm3xxx.c
+++ b/arch/arm/mach-omap2/cm3xxx.c
@@ -388,7 +388,7 @@ void omap3_cm_save_context(void)
388 omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSEL1); 388 omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSEL1);
389 cm_context.iva2_cm_clksel2 = 389 cm_context.iva2_cm_clksel2 =
390 omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSEL2); 390 omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSEL2);
391 cm_context.cm_sysconfig = __raw_readl(OMAP3430_CM_SYSCONFIG); 391 cm_context.cm_sysconfig = readl_relaxed(OMAP3430_CM_SYSCONFIG);
392 cm_context.sgx_cm_clksel = 392 cm_context.sgx_cm_clksel =
393 omap2_cm_read_mod_reg(OMAP3430ES2_SGX_MOD, CM_CLKSEL); 393 omap2_cm_read_mod_reg(OMAP3430ES2_SGX_MOD, CM_CLKSEL);
394 cm_context.dss_cm_clksel = 394 cm_context.dss_cm_clksel =
@@ -418,7 +418,7 @@ void omap3_cm_save_context(void)
418 omap2_cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKSEL5); 418 omap2_cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKSEL5);
419 cm_context.pll_cm_clken2 = 419 cm_context.pll_cm_clken2 =
420 omap2_cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKEN2); 420 omap2_cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKEN2);
421 cm_context.cm_polctrl = __raw_readl(OMAP3430_CM_POLCTRL); 421 cm_context.cm_polctrl = readl_relaxed(OMAP3430_CM_POLCTRL);
422 cm_context.iva2_cm_fclken = 422 cm_context.iva2_cm_fclken =
423 omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_FCLKEN); 423 omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_FCLKEN);
424 cm_context.iva2_cm_clken_pll = 424 cm_context.iva2_cm_clken_pll =
@@ -519,7 +519,7 @@ void omap3_cm_restore_context(void)
519 CM_CLKSEL1); 519 CM_CLKSEL1);
520 omap2_cm_write_mod_reg(cm_context.iva2_cm_clksel2, OMAP3430_IVA2_MOD, 520 omap2_cm_write_mod_reg(cm_context.iva2_cm_clksel2, OMAP3430_IVA2_MOD,
521 CM_CLKSEL2); 521 CM_CLKSEL2);
522 __raw_writel(cm_context.cm_sysconfig, OMAP3430_CM_SYSCONFIG); 522 writel_relaxed(cm_context.cm_sysconfig, OMAP3430_CM_SYSCONFIG);
523 omap2_cm_write_mod_reg(cm_context.sgx_cm_clksel, OMAP3430ES2_SGX_MOD, 523 omap2_cm_write_mod_reg(cm_context.sgx_cm_clksel, OMAP3430ES2_SGX_MOD,
524 CM_CLKSEL); 524 CM_CLKSEL);
525 omap2_cm_write_mod_reg(cm_context.dss_cm_clksel, OMAP3430_DSS_MOD, 525 omap2_cm_write_mod_reg(cm_context.dss_cm_clksel, OMAP3430_DSS_MOD,
@@ -547,7 +547,7 @@ void omap3_cm_restore_context(void)
547 OMAP3430ES2_CM_CLKSEL5); 547 OMAP3430ES2_CM_CLKSEL5);
548 omap2_cm_write_mod_reg(cm_context.pll_cm_clken2, PLL_MOD, 548 omap2_cm_write_mod_reg(cm_context.pll_cm_clken2, PLL_MOD,
549 OMAP3430ES2_CM_CLKEN2); 549 OMAP3430ES2_CM_CLKEN2);
550 __raw_writel(cm_context.cm_polctrl, OMAP3430_CM_POLCTRL); 550 writel_relaxed(cm_context.cm_polctrl, OMAP3430_CM_POLCTRL);
551 omap2_cm_write_mod_reg(cm_context.iva2_cm_fclken, OMAP3430_IVA2_MOD, 551 omap2_cm_write_mod_reg(cm_context.iva2_cm_fclken, OMAP3430_IVA2_MOD,
552 CM_FCLKEN); 552 CM_FCLKEN);
553 omap2_cm_write_mod_reg(cm_context.iva2_cm_clken_pll, OMAP3430_IVA2_MOD, 553 omap2_cm_write_mod_reg(cm_context.iva2_cm_clken_pll, OMAP3430_IVA2_MOD,
diff --git a/arch/arm/mach-omap2/cm44xx.c b/arch/arm/mach-omap2/cm44xx.c
index 535d66e2822c..30b6d9743b73 100644
--- a/arch/arm/mach-omap2/cm44xx.c
+++ b/arch/arm/mach-omap2/cm44xx.c
@@ -30,23 +30,23 @@
30/* Read a register in CM1 */ 30/* Read a register in CM1 */
31u32 omap4_cm1_read_inst_reg(s16 inst, u16 reg) 31u32 omap4_cm1_read_inst_reg(s16 inst, u16 reg)
32{ 32{
33 return __raw_readl(OMAP44XX_CM1_REGADDR(inst, reg)); 33 return readl_relaxed(OMAP44XX_CM1_REGADDR(inst, reg));
34} 34}
35 35
36/* Write into a register in CM1 */ 36/* Write into a register in CM1 */
37void omap4_cm1_write_inst_reg(u32 val, s16 inst, u16 reg) 37void omap4_cm1_write_inst_reg(u32 val, s16 inst, u16 reg)
38{ 38{
39 __raw_writel(val, OMAP44XX_CM1_REGADDR(inst, reg)); 39 writel_relaxed(val, OMAP44XX_CM1_REGADDR(inst, reg));
40} 40}
41 41
42/* Read a register in CM2 */ 42/* Read a register in CM2 */
43u32 omap4_cm2_read_inst_reg(s16 inst, u16 reg) 43u32 omap4_cm2_read_inst_reg(s16 inst, u16 reg)
44{ 44{
45 return __raw_readl(OMAP44XX_CM2_REGADDR(inst, reg)); 45 return readl_relaxed(OMAP44XX_CM2_REGADDR(inst, reg));
46} 46}
47 47
48/* Write into a register in CM2 */ 48/* Write into a register in CM2 */
49void omap4_cm2_write_inst_reg(u32 val, s16 inst, u16 reg) 49void omap4_cm2_write_inst_reg(u32 val, s16 inst, u16 reg)
50{ 50{
51 __raw_writel(val, OMAP44XX_CM2_REGADDR(inst, reg)); 51 writel_relaxed(val, OMAP44XX_CM2_REGADDR(inst, reg));
52} 52}
diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c
index f5c4731b6f06..2f44257171dd 100644
--- a/arch/arm/mach-omap2/cminst44xx.c
+++ b/arch/arm/mach-omap2/cminst44xx.c
@@ -116,7 +116,7 @@ u32 omap4_cminst_read_inst_reg(u8 part, u16 inst, u16 idx)
116 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 116 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
117 part == OMAP4430_INVALID_PRCM_PARTITION || 117 part == OMAP4430_INVALID_PRCM_PARTITION ||
118 !_cm_bases[part]); 118 !_cm_bases[part]);
119 return __raw_readl(_cm_bases[part] + inst + idx); 119 return readl_relaxed(_cm_bases[part] + inst + idx);
120} 120}
121 121
122/* Write into a register in a CM instance */ 122/* Write into a register in a CM instance */
@@ -125,7 +125,7 @@ void omap4_cminst_write_inst_reg(u32 val, u8 part, u16 inst, u16 idx)
125 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 125 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
126 part == OMAP4430_INVALID_PRCM_PARTITION || 126 part == OMAP4430_INVALID_PRCM_PARTITION ||
127 !_cm_bases[part]); 127 !_cm_bases[part]);
128 __raw_writel(val, _cm_bases[part] + inst + idx); 128 writel_relaxed(val, _cm_bases[part] + inst + idx);
129} 129}
130 130
131/* Read-modify-write a register in CM1. Caller must lock */ 131/* Read-modify-write a register in CM1. Caller must lock */
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 44bb4d544dcf..751f3549bf6f 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -151,32 +151,32 @@ void __iomem *omap_ctrl_base_get(void)
151 151
152u8 omap_ctrl_readb(u16 offset) 152u8 omap_ctrl_readb(u16 offset)
153{ 153{
154 return __raw_readb(OMAP_CTRL_REGADDR(offset)); 154 return readb_relaxed(OMAP_CTRL_REGADDR(offset));
155} 155}
156 156
157u16 omap_ctrl_readw(u16 offset) 157u16 omap_ctrl_readw(u16 offset)
158{ 158{
159 return __raw_readw(OMAP_CTRL_REGADDR(offset)); 159 return readw_relaxed(OMAP_CTRL_REGADDR(offset));
160} 160}
161 161
162u32 omap_ctrl_readl(u16 offset) 162u32 omap_ctrl_readl(u16 offset)
163{ 163{
164 return __raw_readl(OMAP_CTRL_REGADDR(offset)); 164 return readl_relaxed(OMAP_CTRL_REGADDR(offset));
165} 165}
166 166
167void omap_ctrl_writeb(u8 val, u16 offset) 167void omap_ctrl_writeb(u8 val, u16 offset)
168{ 168{
169 __raw_writeb(val, OMAP_CTRL_REGADDR(offset)); 169 writeb_relaxed(val, OMAP_CTRL_REGADDR(offset));
170} 170}
171 171
172void omap_ctrl_writew(u16 val, u16 offset) 172void omap_ctrl_writew(u16 val, u16 offset)
173{ 173{
174 __raw_writew(val, OMAP_CTRL_REGADDR(offset)); 174 writew_relaxed(val, OMAP_CTRL_REGADDR(offset));
175} 175}
176 176
177void omap_ctrl_writel(u32 val, u16 offset) 177void omap_ctrl_writel(u32 val, u16 offset)
178{ 178{
179 __raw_writel(val, OMAP_CTRL_REGADDR(offset)); 179 writel_relaxed(val, OMAP_CTRL_REGADDR(offset));
180} 180}
181 181
182/* 182/*
@@ -188,12 +188,12 @@ void omap_ctrl_writel(u32 val, u16 offset)
188 188
189u32 omap4_ctrl_pad_readl(u16 offset) 189u32 omap4_ctrl_pad_readl(u16 offset)
190{ 190{
191 return __raw_readl(OMAP4_CTRL_PAD_REGADDR(offset)); 191 return readl_relaxed(OMAP4_CTRL_PAD_REGADDR(offset));
192} 192}
193 193
194void omap4_ctrl_pad_writel(u32 val, u16 offset) 194void omap4_ctrl_pad_writel(u32 val, u16 offset)
195{ 195{
196 __raw_writel(val, OMAP4_CTRL_PAD_REGADDR(offset)); 196 writel_relaxed(val, OMAP4_CTRL_PAD_REGADDR(offset));
197} 197}
198 198
199#ifdef CONFIG_ARCH_OMAP3 199#ifdef CONFIG_ARCH_OMAP3
@@ -222,7 +222,7 @@ void omap3_ctrl_write_boot_mode(u8 bootmode)
222 * 222 *
223 * XXX This should use some omap_ctrl_writel()-type function 223 * XXX This should use some omap_ctrl_writel()-type function
224 */ 224 */
225 __raw_writel(l, OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD + 4)); 225 writel_relaxed(l, OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD + 4));
226} 226}
227 227
228#endif 228#endif
@@ -285,7 +285,7 @@ void omap3_clear_scratchpad_contents(void)
285 if (omap2_prm_read_mod_reg(OMAP3430_GR_MOD, OMAP3_PRM_RSTST_OFFSET) & 285 if (omap2_prm_read_mod_reg(OMAP3430_GR_MOD, OMAP3_PRM_RSTST_OFFSET) &
286 OMAP3430_GLOBAL_COLD_RST_MASK) { 286 OMAP3430_GLOBAL_COLD_RST_MASK) {
287 for ( ; offset <= max_offset; offset += 0x4) 287 for ( ; offset <= max_offset; offset += 0x4)
288 __raw_writel(0x0, (v_addr + offset)); 288 writel_relaxed(0x0, (v_addr + offset));
289 omap2_prm_set_mod_reg_bits(OMAP3430_GLOBAL_COLD_RST_MASK, 289 omap2_prm_set_mod_reg_bits(OMAP3430_GLOBAL_COLD_RST_MASK,
290 OMAP3430_GR_MOD, 290 OMAP3430_GR_MOD,
291 OMAP3_PRM_RSTST_OFFSET); 291 OMAP3_PRM_RSTST_OFFSET);
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
index 5689c88d986d..a6d2cf1f8d02 100644
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -91,7 +91,7 @@ static inline void dma_write(u32 val, int reg, int lch)
91 addr += reg_map[reg].offset; 91 addr += reg_map[reg].offset;
92 addr += reg_map[reg].stride * lch; 92 addr += reg_map[reg].stride * lch;
93 93
94 __raw_writel(val, addr); 94 writel_relaxed(val, addr);
95} 95}
96 96
97static inline u32 dma_read(int reg, int lch) 97static inline u32 dma_read(int reg, int lch)
@@ -101,7 +101,7 @@ static inline u32 dma_read(int reg, int lch)
101 addr += reg_map[reg].offset; 101 addr += reg_map[reg].offset;
102 addr += reg_map[reg].stride * lch; 102 addr += reg_map[reg].stride * lch;
103 103
104 return __raw_readl(addr); 104 return readl_relaxed(addr);
105} 105}
106 106
107static void omap2_clear_dma(int lch) 107static void omap2_clear_dma(int lch)
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 9fe8c949305c..852b19a367f0 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -170,12 +170,12 @@ static irqreturn_t gpmc_handle_irq(int irq, void *dev);
170 170
171static void gpmc_write_reg(int idx, u32 val) 171static void gpmc_write_reg(int idx, u32 val)
172{ 172{
173 __raw_writel(val, gpmc_base + idx); 173 writel_relaxed(val, gpmc_base + idx);
174} 174}
175 175
176static u32 gpmc_read_reg(int idx) 176static u32 gpmc_read_reg(int idx)
177{ 177{
178 return __raw_readl(gpmc_base + idx); 178 return readl_relaxed(gpmc_base + idx);
179} 179}
180 180
181void gpmc_cs_write_reg(int cs, int idx, u32 val) 181void gpmc_cs_write_reg(int cs, int idx, u32 val)
@@ -183,7 +183,7 @@ void gpmc_cs_write_reg(int cs, int idx, u32 val)
183 void __iomem *reg_addr; 183 void __iomem *reg_addr;
184 184
185 reg_addr = gpmc_base + GPMC_CS0_OFFSET + (cs * GPMC_CS_SIZE) + idx; 185 reg_addr = gpmc_base + GPMC_CS0_OFFSET + (cs * GPMC_CS_SIZE) + idx;
186 __raw_writel(val, reg_addr); 186 writel_relaxed(val, reg_addr);
187} 187}
188 188
189static u32 gpmc_cs_read_reg(int cs, int idx) 189static u32 gpmc_cs_read_reg(int cs, int idx)
@@ -191,7 +191,7 @@ static u32 gpmc_cs_read_reg(int cs, int idx)
191 void __iomem *reg_addr; 191 void __iomem *reg_addr;
192 192
193 reg_addr = gpmc_base + GPMC_CS0_OFFSET + (cs * GPMC_CS_SIZE) + idx; 193 reg_addr = gpmc_base + GPMC_CS0_OFFSET + (cs * GPMC_CS_SIZE) + idx;
194 return __raw_readl(reg_addr); 194 return readl_relaxed(reg_addr);
195} 195}
196 196
197/* TODO: Add support for gpmc_fck to clock framework and use it */ 197/* TODO: Add support for gpmc_fck to clock framework and use it */
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 157412e4273a..f61f1bf68df4 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -94,7 +94,7 @@ EXPORT_SYMBOL(omap_type);
94#define OMAP_TAP_DIE_ID_44XX_2 0x020c 94#define OMAP_TAP_DIE_ID_44XX_2 0x020c
95#define OMAP_TAP_DIE_ID_44XX_3 0x0210 95#define OMAP_TAP_DIE_ID_44XX_3 0x0210
96 96
97#define read_tap_reg(reg) __raw_readl(tap_base + (reg)) 97#define read_tap_reg(reg) readl_relaxed(tap_base + (reg))
98 98
99struct omap_id { 99struct omap_id {
100 u16 hawkeye; /* Silicon type (Hawkeye id) */ 100 u16 hawkeye; /* Silicon type (Hawkeye id) */
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 6037a9a01ed5..35b8590c322e 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -83,12 +83,12 @@ struct omap3_intc_regs {
83 83
84static void intc_bank_write_reg(u32 val, struct omap_irq_bank *bank, u16 reg) 84static void intc_bank_write_reg(u32 val, struct omap_irq_bank *bank, u16 reg)
85{ 85{
86 __raw_writel(val, bank->base_reg + reg); 86 writel_relaxed(val, bank->base_reg + reg);
87} 87}
88 88
89static u32 intc_bank_read_reg(struct omap_irq_bank *bank, u16 reg) 89static u32 intc_bank_read_reg(struct omap_irq_bank *bank, u16 reg)
90{ 90{
91 return __raw_readl(bank->base_reg + reg); 91 return readl_relaxed(bank->base_reg + reg);
92} 92}
93 93
94/* XXX: FIQ and additional INTC support (only MPU at the moment) */ 94/* XXX: FIQ and additional INTC support (only MPU at the moment) */
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 48094b58c88f..fd88edeb027f 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -70,18 +70,18 @@ struct omap_mux_partition *omap_mux_get(const char *name)
70u16 omap_mux_read(struct omap_mux_partition *partition, u16 reg) 70u16 omap_mux_read(struct omap_mux_partition *partition, u16 reg)
71{ 71{
72 if (partition->flags & OMAP_MUX_REG_8BIT) 72 if (partition->flags & OMAP_MUX_REG_8BIT)
73 return __raw_readb(partition->base + reg); 73 return readb_relaxed(partition->base + reg);
74 else 74 else
75 return __raw_readw(partition->base + reg); 75 return readw_relaxed(partition->base + reg);
76} 76}
77 77
78void omap_mux_write(struct omap_mux_partition *partition, u16 val, 78void omap_mux_write(struct omap_mux_partition *partition, u16 val,
79 u16 reg) 79 u16 reg)
80{ 80{
81 if (partition->flags & OMAP_MUX_REG_8BIT) 81 if (partition->flags & OMAP_MUX_REG_8BIT)
82 __raw_writeb(val, partition->base + reg); 82 writeb_relaxed(val, partition->base + reg);
83 else 83 else
84 __raw_writew(val, partition->base + reg); 84 writew_relaxed(val, partition->base + reg);
85} 85}
86 86
87void omap_mux_write_array(struct omap_mux_partition *partition, 87void omap_mux_write_array(struct omap_mux_partition *partition,
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c
index 458f72f9dc8f..971791fe9a3f 100644
--- a/arch/arm/mach-omap2/omap-hotplug.c
+++ b/arch/arm/mach-omap2/omap-hotplug.c
@@ -39,7 +39,7 @@ void __ref omap4_cpu_die(unsigned int cpu)
39 if (omap_modify_auxcoreboot0(0x0, 0x200) != 0x0) 39 if (omap_modify_auxcoreboot0(0x0, 0x200) != 0x0)
40 pr_err("Secure clear status failed\n"); 40 pr_err("Secure clear status failed\n");
41 } else { 41 } else {
42 __raw_writel(0, base + OMAP_AUX_CORE_BOOT_0); 42 writel_relaxed(0, base + OMAP_AUX_CORE_BOOT_0);
43 } 43 }
44 44
45 45
@@ -53,7 +53,7 @@ void __ref omap4_cpu_die(unsigned int cpu)
53 boot_cpu = omap_read_auxcoreboot0(); 53 boot_cpu = omap_read_auxcoreboot0();
54 else 54 else
55 boot_cpu = 55 boot_cpu =
56 __raw_readl(base + OMAP_AUX_CORE_BOOT_0) >> 5; 56 readl_relaxed(base + OMAP_AUX_CORE_BOOT_0) >> 5;
57 57
58 if (boot_cpu == smp_processor_id()) { 58 if (boot_cpu == smp_processor_id()) {
59 /* 59 /*
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
index 667915d236f3..eb76e47091ad 100644
--- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
@@ -116,7 +116,7 @@ static inline void set_cpu_wakeup_addr(unsigned int cpu_id, u32 addr)
116{ 116{
117 struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu_id); 117 struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu_id);
118 118
119 __raw_writel(addr, pm_info->wkup_sar_addr); 119 writel_relaxed(addr, pm_info->wkup_sar_addr);
120} 120}
121 121
122/* 122/*
@@ -141,7 +141,7 @@ static void scu_pwrst_prepare(unsigned int cpu_id, unsigned int cpu_state)
141 break; 141 break;
142 } 142 }
143 143
144 __raw_writel(scu_pwr_st, pm_info->scu_sar_addr); 144 writel_relaxed(scu_pwr_st, pm_info->scu_sar_addr);
145} 145}
146 146
147/* Helper functions for MPUSS OSWR */ 147/* Helper functions for MPUSS OSWR */
@@ -179,7 +179,7 @@ static void l2x0_pwrst_prepare(unsigned int cpu_id, unsigned int save_state)
179{ 179{
180 struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu_id); 180 struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu_id);
181 181
182 __raw_writel(save_state, pm_info->l2x0_sar_addr); 182 writel_relaxed(save_state, pm_info->l2x0_sar_addr);
183} 183}
184 184
185/* 185/*
@@ -192,10 +192,10 @@ static void save_l2x0_context(void)
192 u32 val; 192 u32 val;
193 void __iomem *l2x0_base = omap4_get_l2cache_base(); 193 void __iomem *l2x0_base = omap4_get_l2cache_base();
194 if (l2x0_base) { 194 if (l2x0_base) {
195 val = __raw_readl(l2x0_base + L2X0_AUX_CTRL); 195 val = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
196 __raw_writel(val, sar_base + L2X0_AUXCTRL_OFFSET); 196 writel_relaxed(val, sar_base + L2X0_AUXCTRL_OFFSET);
197 val = __raw_readl(l2x0_base + L2X0_PREFETCH_CTRL); 197 val = readl_relaxed(l2x0_base + L2X0_PREFETCH_CTRL);
198 __raw_writel(val, sar_base + L2X0_PREFETCH_CTRL_OFFSET); 198 writel_relaxed(val, sar_base + L2X0_PREFETCH_CTRL_OFFSET);
199 } 199 }
200} 200}
201#else 201#else
@@ -386,9 +386,9 @@ int __init omap4_mpuss_init(void)
386 386
387 /* Save device type on scratchpad for low level code to use */ 387 /* Save device type on scratchpad for low level code to use */
388 if (omap_type() != OMAP2_DEVICE_TYPE_GP) 388 if (omap_type() != OMAP2_DEVICE_TYPE_GP)
389 __raw_writel(1, sar_base + OMAP_TYPE_OFFSET); 389 writel_relaxed(1, sar_base + OMAP_TYPE_OFFSET);
390 else 390 else
391 __raw_writel(0, sar_base + OMAP_TYPE_OFFSET); 391 writel_relaxed(0, sar_base + OMAP_TYPE_OFFSET);
392 392
393 save_l2x0_context(); 393 save_l2x0_context();
394 394
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 17550aa39d0f..256e84ef0f67 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -99,7 +99,7 @@ static int omap4_boot_secondary(unsigned int cpu, struct task_struct *idle)
99 if (omap_secure_apis_support()) 99 if (omap_secure_apis_support())
100 omap_modify_auxcoreboot0(0x200, 0xfffffdff); 100 omap_modify_auxcoreboot0(0x200, 0xfffffdff);
101 else 101 else
102 __raw_writel(0x20, base + OMAP_AUX_CORE_BOOT_0); 102 writel_relaxed(0x20, base + OMAP_AUX_CORE_BOOT_0);
103 103
104 if (!cpu1_clkdm && !cpu1_pwrdm) { 104 if (!cpu1_clkdm && !cpu1_pwrdm) {
105 cpu1_clkdm = clkdm_lookup("mpu1_clkdm"); 105 cpu1_clkdm = clkdm_lookup("mpu1_clkdm");
@@ -227,8 +227,8 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
227 if (omap_secure_apis_support()) 227 if (omap_secure_apis_support())
228 omap_auxcoreboot_addr(virt_to_phys(startup_addr)); 228 omap_auxcoreboot_addr(virt_to_phys(startup_addr));
229 else 229 else
230 __raw_writel(virt_to_phys(omap5_secondary_startup), 230 writel_relaxed(virt_to_phys(omap5_secondary_startup),
231 base + OMAP_AUX_CORE_BOOT_1); 231 base + OMAP_AUX_CORE_BOOT_1);
232 232
233} 233}
234 234
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
index 693fe486e917..37843a7d3639 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -60,19 +60,19 @@ static unsigned int omap_secure_apis;
60 */ 60 */
61static inline u32 wakeupgen_readl(u8 idx, u32 cpu) 61static inline u32 wakeupgen_readl(u8 idx, u32 cpu)
62{ 62{
63 return __raw_readl(wakeupgen_base + OMAP_WKG_ENB_A_0 + 63 return readl_relaxed(wakeupgen_base + OMAP_WKG_ENB_A_0 +
64 (cpu * CPU_ENA_OFFSET) + (idx * 4)); 64 (cpu * CPU_ENA_OFFSET) + (idx * 4));
65} 65}
66 66
67static inline void wakeupgen_writel(u32 val, u8 idx, u32 cpu) 67static inline void wakeupgen_writel(u32 val, u8 idx, u32 cpu)
68{ 68{
69 __raw_writel(val, wakeupgen_base + OMAP_WKG_ENB_A_0 + 69 writel_relaxed(val, wakeupgen_base + OMAP_WKG_ENB_A_0 +
70 (cpu * CPU_ENA_OFFSET) + (idx * 4)); 70 (cpu * CPU_ENA_OFFSET) + (idx * 4));
71} 71}
72 72
73static inline void sar_writel(u32 val, u32 offset, u8 idx) 73static inline void sar_writel(u32 val, u32 offset, u8 idx)
74{ 74{
75 __raw_writel(val, sar_base + offset + (idx * 4)); 75 writel_relaxed(val, sar_base + offset + (idx * 4));
76} 76}
77 77
78static inline int _wakeupgen_get_irq_info(u32 irq, u32 *bit_posn, u8 *reg_index) 78static inline int _wakeupgen_get_irq_info(u32 irq, u32 *bit_posn, u8 *reg_index)
@@ -231,21 +231,21 @@ static inline void omap4_irq_save_context(void)
231 } 231 }
232 232
233 /* Save AuxBoot* registers */ 233 /* Save AuxBoot* registers */
234 val = __raw_readl(wakeupgen_base + OMAP_AUX_CORE_BOOT_0); 234 val = readl_relaxed(wakeupgen_base + OMAP_AUX_CORE_BOOT_0);
235 __raw_writel(val, sar_base + AUXCOREBOOT0_OFFSET); 235 writel_relaxed(val, sar_base + AUXCOREBOOT0_OFFSET);
236 val = __raw_readl(wakeupgen_base + OMAP_AUX_CORE_BOOT_1); 236 val = readl_relaxed(wakeupgen_base + OMAP_AUX_CORE_BOOT_1);
237 __raw_writel(val, sar_base + AUXCOREBOOT1_OFFSET); 237 writel_relaxed(val, sar_base + AUXCOREBOOT1_OFFSET);
238 238
239 /* Save SyncReq generation logic */ 239 /* Save SyncReq generation logic */
240 val = __raw_readl(wakeupgen_base + OMAP_PTMSYNCREQ_MASK); 240 val = readl_relaxed(wakeupgen_base + OMAP_PTMSYNCREQ_MASK);
241 __raw_writel(val, sar_base + PTMSYNCREQ_MASK_OFFSET); 241 writel_relaxed(val, sar_base + PTMSYNCREQ_MASK_OFFSET);
242 val = __raw_readl(wakeupgen_base + OMAP_PTMSYNCREQ_EN); 242 val = readl_relaxed(wakeupgen_base + OMAP_PTMSYNCREQ_EN);
243 __raw_writel(val, sar_base + PTMSYNCREQ_EN_OFFSET); 243 writel_relaxed(val, sar_base + PTMSYNCREQ_EN_OFFSET);
244 244
245 /* Set the Backup Bit Mask status */ 245 /* Set the Backup Bit Mask status */
246 val = __raw_readl(sar_base + SAR_BACKUP_STATUS_OFFSET); 246 val = readl_relaxed(sar_base + SAR_BACKUP_STATUS_OFFSET);
247 val |= SAR_BACKUP_STATUS_WAKEUPGEN; 247 val |= SAR_BACKUP_STATUS_WAKEUPGEN;
248 __raw_writel(val, sar_base + SAR_BACKUP_STATUS_OFFSET); 248 writel_relaxed(val, sar_base + SAR_BACKUP_STATUS_OFFSET);
249 249
250} 250}
251 251
@@ -264,15 +264,15 @@ static inline void omap5_irq_save_context(void)
264 } 264 }
265 265
266 /* Save AuxBoot* registers */ 266 /* Save AuxBoot* registers */
267 val = __raw_readl(wakeupgen_base + OMAP_AUX_CORE_BOOT_0); 267 val = readl_relaxed(wakeupgen_base + OMAP_AUX_CORE_BOOT_0);
268 __raw_writel(val, sar_base + OMAP5_AUXCOREBOOT0_OFFSET); 268 writel_relaxed(val, sar_base + OMAP5_AUXCOREBOOT0_OFFSET);
269 val = __raw_readl(wakeupgen_base + OMAP_AUX_CORE_BOOT_0); 269 val = readl_relaxed(wakeupgen_base + OMAP_AUX_CORE_BOOT_0);
270 __raw_writel(val, sar_base + OMAP5_AUXCOREBOOT1_OFFSET); 270 writel_relaxed(val, sar_base + OMAP5_AUXCOREBOOT1_OFFSET);
271 271
272 /* Set the Backup Bit Mask status */ 272 /* Set the Backup Bit Mask status */
273 val = __raw_readl(sar_base + OMAP5_SAR_BACKUP_STATUS_OFFSET); 273 val = readl_relaxed(sar_base + OMAP5_SAR_BACKUP_STATUS_OFFSET);
274 val |= SAR_BACKUP_STATUS_WAKEUPGEN; 274 val |= SAR_BACKUP_STATUS_WAKEUPGEN;
275 __raw_writel(val, sar_base + OMAP5_SAR_BACKUP_STATUS_OFFSET); 275 writel_relaxed(val, sar_base + OMAP5_SAR_BACKUP_STATUS_OFFSET);
276 276
277} 277}
278 278
@@ -306,9 +306,9 @@ static void irq_sar_clear(void)
306 if (soc_is_omap54xx()) 306 if (soc_is_omap54xx())
307 offset = OMAP5_SAR_BACKUP_STATUS_OFFSET; 307 offset = OMAP5_SAR_BACKUP_STATUS_OFFSET;
308 308
309 val = __raw_readl(sar_base + offset); 309 val = readl_relaxed(sar_base + offset);
310 val &= ~SAR_BACKUP_STATUS_WAKEUPGEN; 310 val &= ~SAR_BACKUP_STATUS_WAKEUPGEN;
311 __raw_writel(val, sar_base + offset); 311 writel_relaxed(val, sar_base + offset);
312} 312}
313 313
314/* 314/*
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 95e171a055f3..99b0154493a4 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -125,25 +125,25 @@ void __init gic_init_irq(void)
125void gic_dist_disable(void) 125void gic_dist_disable(void)
126{ 126{
127 if (gic_dist_base_addr) 127 if (gic_dist_base_addr)
128 __raw_writel(0x0, gic_dist_base_addr + GIC_DIST_CTRL); 128 writel_relaxed(0x0, gic_dist_base_addr + GIC_DIST_CTRL);
129} 129}
130 130
131void gic_dist_enable(void) 131void gic_dist_enable(void)
132{ 132{
133 if (gic_dist_base_addr) 133 if (gic_dist_base_addr)
134 __raw_writel(0x1, gic_dist_base_addr + GIC_DIST_CTRL); 134 writel_relaxed(0x1, gic_dist_base_addr + GIC_DIST_CTRL);
135} 135}
136 136
137bool gic_dist_disabled(void) 137bool gic_dist_disabled(void)
138{ 138{
139 return !(__raw_readl(gic_dist_base_addr + GIC_DIST_CTRL) & 0x1); 139 return !(readl_relaxed(gic_dist_base_addr + GIC_DIST_CTRL) & 0x1);
140} 140}
141 141
142void gic_timer_retrigger(void) 142void gic_timer_retrigger(void)
143{ 143{
144 u32 twd_int = __raw_readl(twd_base + TWD_TIMER_INTSTAT); 144 u32 twd_int = readl_relaxed(twd_base + TWD_TIMER_INTSTAT);
145 u32 gic_int = __raw_readl(gic_dist_base_addr + GIC_DIST_PENDING_SET); 145 u32 gic_int = readl_relaxed(gic_dist_base_addr + GIC_DIST_PENDING_SET);
146 u32 twd_ctrl = __raw_readl(twd_base + TWD_TIMER_CONTROL); 146 u32 twd_ctrl = readl_relaxed(twd_base + TWD_TIMER_CONTROL);
147 147
148 if (twd_int && !(gic_int & BIT(IRQ_LOCALTIMER))) { 148 if (twd_int && !(gic_int & BIT(IRQ_LOCALTIMER))) {
149 /* 149 /*
@@ -151,11 +151,11 @@ void gic_timer_retrigger(void)
151 * disabled. Ack the pending interrupt, and retrigger it. 151 * disabled. Ack the pending interrupt, and retrigger it.
152 */ 152 */
153 pr_warn("%s: lost localtimer interrupt\n", __func__); 153 pr_warn("%s: lost localtimer interrupt\n", __func__);
154 __raw_writel(1, twd_base + TWD_TIMER_INTSTAT); 154 writel_relaxed(1, twd_base + TWD_TIMER_INTSTAT);
155 if (!(twd_ctrl & TWD_TIMER_CONTROL_PERIODIC)) { 155 if (!(twd_ctrl & TWD_TIMER_CONTROL_PERIODIC)) {
156 __raw_writel(1, twd_base + TWD_TIMER_COUNTER); 156 writel_relaxed(1, twd_base + TWD_TIMER_COUNTER);
157 twd_ctrl |= TWD_TIMER_CONTROL_ENABLE; 157 twd_ctrl |= TWD_TIMER_CONTROL_ENABLE;
158 __raw_writel(twd_ctrl, twd_base + TWD_TIMER_CONTROL); 158 writel_relaxed(twd_ctrl, twd_base + TWD_TIMER_CONTROL);
159 } 159 }
160 } 160 }
161} 161}
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 66c60fe1104c..f7bb435bb543 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -72,7 +72,7 @@
72 * | (../mach-omap2/omap_hwmod*) | 72 * | (../mach-omap2/omap_hwmod*) |
73 * +-------------------------------+ 73 * +-------------------------------+
74 * | OMAP clock/PRCM/register fns | 74 * | OMAP clock/PRCM/register fns |
75 * | (__raw_{read,write}l, clk*) | 75 * | ({read,write}l_relaxed, clk*) |
76 * +-------------------------------+ 76 * +-------------------------------+
77 * 77 *
78 * Device drivers should not contain any OMAP-specific code or data in 78 * Device drivers should not contain any OMAP-specific code or data in
@@ -3230,17 +3230,17 @@ static int _am33xx_is_hardreset_asserted(struct omap_hwmod *oh,
3230u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs) 3230u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs)
3231{ 3231{
3232 if (oh->flags & HWMOD_16BIT_REG) 3232 if (oh->flags & HWMOD_16BIT_REG)
3233 return __raw_readw(oh->_mpu_rt_va + reg_offs); 3233 return readw_relaxed(oh->_mpu_rt_va + reg_offs);
3234 else 3234 else
3235 return __raw_readl(oh->_mpu_rt_va + reg_offs); 3235 return readl_relaxed(oh->_mpu_rt_va + reg_offs);
3236} 3236}
3237 3237
3238void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs) 3238void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs)
3239{ 3239{
3240 if (oh->flags & HWMOD_16BIT_REG) 3240 if (oh->flags & HWMOD_16BIT_REG)
3241 __raw_writew(v, oh->_mpu_rt_va + reg_offs); 3241 writew_relaxed(v, oh->_mpu_rt_va + reg_offs);
3242 else 3242 else
3243 __raw_writel(v, oh->_mpu_rt_va + reg_offs); 3243 writel_relaxed(v, oh->_mpu_rt_va + reg_offs);
3244} 3244}
3245 3245
3246/** 3246/**
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c
index eb8a25de67ed..50640b38f0bf 100644
--- a/arch/arm/mach-omap2/omap_phy_internal.c
+++ b/arch/arm/mach-omap2/omap_phy_internal.c
@@ -57,7 +57,7 @@ static int __init omap4430_phy_power_down(void)
57 } 57 }
58 58
59 /* Power down the phy */ 59 /* Power down the phy */
60 __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF); 60 writel_relaxed(PHY_PD, ctrl_base + CONTROL_DEV_CONF);
61 61
62 iounmap(ctrl_base); 62 iounmap(ctrl_base);
63 63
@@ -162,7 +162,7 @@ void ti81xx_musb_phy_power(u8 on)
162 return; 162 return;
163 } 163 }
164 164
165 usbphycfg = __raw_readl(scm_base + USBCTRL0); 165 usbphycfg = readl_relaxed(scm_base + USBCTRL0);
166 166
167 if (on) { 167 if (on) {
168 if (cpu_is_ti816x()) { 168 if (cpu_is_ti816x()) {
@@ -181,7 +181,7 @@ void ti81xx_musb_phy_power(u8 on)
181 usbphycfg |= USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN; 181 usbphycfg |= USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN;
182 182
183 } 183 }
184 __raw_writel(usbphycfg, scm_base + USBCTRL0); 184 writel_relaxed(usbphycfg, scm_base + USBCTRL0);
185 185
186 iounmap(scm_base); 186 iounmap(scm_base);
187} 187}
diff --git a/arch/arm/mach-omap2/prcm_mpu44xx.c b/arch/arm/mach-omap2/prcm_mpu44xx.c
index c30e44a7fab0..cdbee6326d29 100644
--- a/arch/arm/mach-omap2/prcm_mpu44xx.c
+++ b/arch/arm/mach-omap2/prcm_mpu44xx.c
@@ -30,12 +30,12 @@ void __iomem *prcm_mpu_base;
30 30
31u32 omap4_prcm_mpu_read_inst_reg(s16 inst, u16 reg) 31u32 omap4_prcm_mpu_read_inst_reg(s16 inst, u16 reg)
32{ 32{
33 return __raw_readl(OMAP44XX_PRCM_MPU_REGADDR(inst, reg)); 33 return readl_relaxed(OMAP44XX_PRCM_MPU_REGADDR(inst, reg));
34} 34}
35 35
36void omap4_prcm_mpu_write_inst_reg(u32 val, s16 inst, u16 reg) 36void omap4_prcm_mpu_write_inst_reg(u32 val, s16 inst, u16 reg)
37{ 37{
38 __raw_writel(val, OMAP44XX_PRCM_MPU_REGADDR(inst, reg)); 38 writel_relaxed(val, OMAP44XX_PRCM_MPU_REGADDR(inst, reg));
39} 39}
40 40
41u32 omap4_prcm_mpu_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 reg) 41u32 omap4_prcm_mpu_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 reg)
diff --git a/arch/arm/mach-omap2/prm2xxx.h b/arch/arm/mach-omap2/prm2xxx.h
index 3194dd87e0e4..d2cb6365716f 100644
--- a/arch/arm/mach-omap2/prm2xxx.h
+++ b/arch/arm/mach-omap2/prm2xxx.h
@@ -27,7 +27,7 @@
27 27
28/* 28/*
29 * OMAP2-specific global PRM registers 29 * OMAP2-specific global PRM registers
30 * Use __raw_{read,write}l() with these registers. 30 * Use {read,write}l_relaxed() with these registers.
31 * 31 *
32 * With a few exceptions, these are the register names beginning with 32 * With a few exceptions, these are the register names beginning with
33 * PRCM_* on 24xx. (The exceptions are the IRQSTATUS and IRQENABLE 33 * PRCM_* on 24xx. (The exceptions are the IRQSTATUS and IRQENABLE
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.h b/arch/arm/mach-omap2/prm2xxx_3xxx.h
index 9624b40836d4..1a3a96392b97 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.h
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.h
@@ -55,12 +55,12 @@
55/* Power/reset management domain register get/set */ 55/* Power/reset management domain register get/set */
56static inline u32 omap2_prm_read_mod_reg(s16 module, u16 idx) 56static inline u32 omap2_prm_read_mod_reg(s16 module, u16 idx)
57{ 57{
58 return __raw_readl(prm_base + module + idx); 58 return readl_relaxed(prm_base + module + idx);
59} 59}
60 60
61static inline void omap2_prm_write_mod_reg(u32 val, s16 module, u16 idx) 61static inline void omap2_prm_write_mod_reg(u32 val, s16 module, u16 idx)
62{ 62{
63 __raw_writel(val, prm_base + module + idx); 63 writel_relaxed(val, prm_base + module + idx);
64} 64}
65 65
66/* Read-modify-write a register in a PRM module. Caller must lock */ 66/* Read-modify-write a register in a PRM module. Caller must lock */
diff --git a/arch/arm/mach-omap2/prm33xx.c b/arch/arm/mach-omap2/prm33xx.c
index 720440737744..93ba48a7d907 100644
--- a/arch/arm/mach-omap2/prm33xx.c
+++ b/arch/arm/mach-omap2/prm33xx.c
@@ -27,13 +27,13 @@
27/* Read a register in a PRM instance */ 27/* Read a register in a PRM instance */
28u32 am33xx_prm_read_reg(s16 inst, u16 idx) 28u32 am33xx_prm_read_reg(s16 inst, u16 idx)
29{ 29{
30 return __raw_readl(prm_base + inst + idx); 30 return readl_relaxed(prm_base + inst + idx);
31} 31}
32 32
33/* Write into a register in a PRM instance */ 33/* Write into a register in a PRM instance */
34void am33xx_prm_write_reg(u32 val, s16 inst, u16 idx) 34void am33xx_prm_write_reg(u32 val, s16 inst, u16 idx)
35{ 35{
36 __raw_writel(val, prm_base + inst + idx); 36 writel_relaxed(val, prm_base + inst + idx);
37} 37}
38 38
39/* Read-modify-write a register in PRM. Caller must lock */ 39/* Read-modify-write a register in PRM. Caller must lock */
diff --git a/arch/arm/mach-omap2/prm3xxx.h b/arch/arm/mach-omap2/prm3xxx.h
index f8eb83323b1a..1dacfc5b1959 100644
--- a/arch/arm/mach-omap2/prm3xxx.h
+++ b/arch/arm/mach-omap2/prm3xxx.h
@@ -26,7 +26,7 @@
26 26
27/* 27/*
28 * OMAP3-specific global PRM registers 28 * OMAP3-specific global PRM registers
29 * Use __raw_{read,write}l() with these registers. 29 * Use {read,write}l_relaxed() with these registers.
30 * 30 *
31 * With a few exceptions, these are the register names beginning with 31 * With a few exceptions, these are the register names beginning with
32 * PRM_* on 34xx. (The exceptions are the IRQSTATUS and IRQENABLE 32 * PRM_* on 34xx. (The exceptions are the IRQSTATUS and IRQENABLE
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index 03a603476cfc..94a43b3cf0f0 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -81,13 +81,13 @@ static struct prm_reset_src_map omap44xx_prm_reset_src_map[] = {
81/* Read a register in a CM/PRM instance in the PRM module */ 81/* Read a register in a CM/PRM instance in the PRM module */
82u32 omap4_prm_read_inst_reg(s16 inst, u16 reg) 82u32 omap4_prm_read_inst_reg(s16 inst, u16 reg)
83{ 83{
84 return __raw_readl(prm_base + inst + reg); 84 return readl_relaxed(prm_base + inst + reg);
85} 85}
86 86
87/* Write into a register in a CM/PRM instance in the PRM module */ 87/* Write into a register in a CM/PRM instance in the PRM module */
88void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 reg) 88void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 reg)
89{ 89{
90 __raw_writel(val, prm_base + inst + reg); 90 writel_relaxed(val, prm_base + inst + reg);
91} 91}
92 92
93/* Read-modify-write a register in a PRM module. Caller must lock */ 93/* Read-modify-write a register in a PRM module. Caller must lock */
diff --git a/arch/arm/mach-omap2/prminst44xx.c b/arch/arm/mach-omap2/prminst44xx.c
index 05fcf6de44ee..69f0dd08629c 100644
--- a/arch/arm/mach-omap2/prminst44xx.c
+++ b/arch/arm/mach-omap2/prminst44xx.c
@@ -49,7 +49,7 @@ u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx)
49 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 49 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
50 part == OMAP4430_INVALID_PRCM_PARTITION || 50 part == OMAP4430_INVALID_PRCM_PARTITION ||
51 !_prm_bases[part]); 51 !_prm_bases[part]);
52 return __raw_readl(_prm_bases[part] + inst + idx); 52 return readl_relaxed(_prm_bases[part] + inst + idx);
53} 53}
54 54
55/* Write into a register in a PRM instance */ 55/* Write into a register in a PRM instance */
@@ -58,7 +58,7 @@ void omap4_prminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx)
58 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 58 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
59 part == OMAP4430_INVALID_PRCM_PARTITION || 59 part == OMAP4430_INVALID_PRCM_PARTITION ||
60 !_prm_bases[part]); 60 !_prm_bases[part]);
61 __raw_writel(val, _prm_bases[part] + inst + idx); 61 writel_relaxed(val, _prm_bases[part] + inst + idx);
62} 62}
63 63
64/* Read-modify-write a register in PRM. Caller must lock */ 64/* Read-modify-write a register in PRM. Caller must lock */
diff --git a/arch/arm/mach-omap2/sdrc.h b/arch/arm/mach-omap2/sdrc.h
index 446aa13511fd..645a2a46b213 100644
--- a/arch/arm/mach-omap2/sdrc.h
+++ b/arch/arm/mach-omap2/sdrc.h
@@ -31,24 +31,24 @@ extern void __iomem *omap2_sms_base;
31 31
32static inline void sdrc_write_reg(u32 val, u16 reg) 32static inline void sdrc_write_reg(u32 val, u16 reg)
33{ 33{
34 __raw_writel(val, OMAP_SDRC_REGADDR(reg)); 34 writel_relaxed(val, OMAP_SDRC_REGADDR(reg));
35} 35}
36 36
37static inline u32 sdrc_read_reg(u16 reg) 37static inline u32 sdrc_read_reg(u16 reg)
38{ 38{
39 return __raw_readl(OMAP_SDRC_REGADDR(reg)); 39 return readl_relaxed(OMAP_SDRC_REGADDR(reg));
40} 40}
41 41
42/* SMS global register get/set */ 42/* SMS global register get/set */
43 43
44static inline void sms_write_reg(u32 val, u16 reg) 44static inline void sms_write_reg(u32 val, u16 reg)
45{ 45{
46 __raw_writel(val, OMAP_SMS_REGADDR(reg)); 46 writel_relaxed(val, OMAP_SMS_REGADDR(reg));
47} 47}
48 48
49static inline u32 sms_read_reg(u16 reg) 49static inline u32 sms_read_reg(u16 reg)
50{ 50{
51 return __raw_readl(OMAP_SMS_REGADDR(reg)); 51 return readl_relaxed(OMAP_SMS_REGADDR(reg));
52} 52}
53 53
54extern void omap2_set_globals_sdrc(void __iomem *sdrc, void __iomem *sms); 54extern void omap2_set_globals_sdrc(void __iomem *sdrc, void __iomem *sms);
diff --git a/arch/arm/mach-omap2/sdrc2xxx.c b/arch/arm/mach-omap2/sdrc2xxx.c
index 907291714643..ae3f1553158d 100644
--- a/arch/arm/mach-omap2/sdrc2xxx.c
+++ b/arch/arm/mach-omap2/sdrc2xxx.c
@@ -103,9 +103,9 @@ u32 omap2xxx_sdrc_reprogram(u32 level, u32 force)
103 * prm2xxx.c function 103 * prm2xxx.c function
104 */ 104 */
105 if (cpu_is_omap2420()) 105 if (cpu_is_omap2420())
106 __raw_writel(0xffff, OMAP2420_PRCM_VOLTSETUP); 106 writel_relaxed(0xffff, OMAP2420_PRCM_VOLTSETUP);
107 else 107 else
108 __raw_writel(0xffff, OMAP2430_PRCM_VOLTSETUP); 108 writel_relaxed(0xffff, OMAP2430_PRCM_VOLTSETUP);
109 omap2_sram_reprogram_sdrc(level, dll_ctrl, m_type); 109 omap2_sram_reprogram_sdrc(level, dll_ctrl, m_type);
110 curr_perf_level = level; 110 curr_perf_level = level;
111 local_irq_restore(flags); 111 local_irq_restore(flags);
diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c
index d7bc33f15344..1b91ef0c182a 100644
--- a/arch/arm/mach-omap2/sr_device.c
+++ b/arch/arm/mach-omap2/sr_device.c
@@ -57,7 +57,7 @@ static void __init sr_set_nvalues(struct omap_volt_data *volt_data,
57 57
58 /* 58 /*
59 * In OMAP4 the efuse registers are 24 bit aligned. 59 * In OMAP4 the efuse registers are 24 bit aligned.
60 * A __raw_readl will fail for non-32 bit aligned address 60 * A readl_relaxed will fail for non-32 bit aligned address
61 * and hence the 8-bit read and shift. 61 * and hence the 8-bit read and shift.
62 */ 62 */
63 if (cpu_is_omap44xx()) { 63 if (cpu_is_omap44xx()) {
diff --git a/arch/arm/mach-omap2/sram.c b/arch/arm/mach-omap2/sram.c
index 4bd096836235..ddf1818af228 100644
--- a/arch/arm/mach-omap2/sram.c
+++ b/arch/arm/mach-omap2/sram.c
@@ -70,16 +70,16 @@ static int is_sram_locked(void)
70 if (OMAP2_DEVICE_TYPE_GP == omap_type()) { 70 if (OMAP2_DEVICE_TYPE_GP == omap_type()) {
71 /* RAMFW: R/W access to all initiators for all qualifier sets */ 71 /* RAMFW: R/W access to all initiators for all qualifier sets */
72 if (cpu_is_omap242x()) { 72 if (cpu_is_omap242x()) {
73 __raw_writel(0xFF, OMAP24XX_VA_REQINFOPERM0); /* all q-vects */ 73 writel_relaxed(0xFF, OMAP24XX_VA_REQINFOPERM0); /* all q-vects */
74 __raw_writel(0xCFDE, OMAP24XX_VA_READPERM0); /* all i-read */ 74 writel_relaxed(0xCFDE, OMAP24XX_VA_READPERM0); /* all i-read */
75 __raw_writel(0xCFDE, OMAP24XX_VA_WRITEPERM0); /* all i-write */ 75 writel_relaxed(0xCFDE, OMAP24XX_VA_WRITEPERM0); /* all i-write */
76 } 76 }
77 if (cpu_is_omap34xx()) { 77 if (cpu_is_omap34xx()) {
78 __raw_writel(0xFFFF, OMAP34XX_VA_REQINFOPERM0); /* all q-vects */ 78 writel_relaxed(0xFFFF, OMAP34XX_VA_REQINFOPERM0); /* all q-vects */
79 __raw_writel(0xFFFF, OMAP34XX_VA_READPERM0); /* all i-read */ 79 writel_relaxed(0xFFFF, OMAP34XX_VA_READPERM0); /* all i-read */
80 __raw_writel(0xFFFF, OMAP34XX_VA_WRITEPERM0); /* all i-write */ 80 writel_relaxed(0xFFFF, OMAP34XX_VA_WRITEPERM0); /* all i-write */
81 __raw_writel(0x0, OMAP34XX_VA_ADDR_MATCH2); 81 writel_relaxed(0x0, OMAP34XX_VA_ADDR_MATCH2);
82 __raw_writel(0xFFFFFFFF, OMAP34XX_VA_SMS_RG_ATT0); 82 writel_relaxed(0xFFFFFFFF, OMAP34XX_VA_SMS_RG_ATT0);
83 } 83 }
84 return 0; 84 return 0;
85 } else 85 } else
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index b62de9f9d05c..a8ec16787170 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -546,15 +546,15 @@ static void __init realtime_counter_init(void)
546 } 546 }
547 547
548 /* Program numerator and denumerator registers */ 548 /* Program numerator and denumerator registers */
549 reg = __raw_readl(base + INCREMENTER_NUMERATOR_OFFSET) & 549 reg = readl_relaxed(base + INCREMENTER_NUMERATOR_OFFSET) &
550 NUMERATOR_DENUMERATOR_MASK; 550 NUMERATOR_DENUMERATOR_MASK;
551 reg |= num; 551 reg |= num;
552 __raw_writel(reg, base + INCREMENTER_NUMERATOR_OFFSET); 552 writel_relaxed(reg, base + INCREMENTER_NUMERATOR_OFFSET);
553 553
554 reg = __raw_readl(base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET) & 554 reg = readl_relaxed(base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET) &
555 NUMERATOR_DENUMERATOR_MASK; 555 NUMERATOR_DENUMERATOR_MASK;
556 reg |= den; 556 reg |= den;
557 __raw_writel(reg, base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET); 557 writel_relaxed(reg, base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET);
558 558
559 arch_timer_freq = (rate / den) * num; 559 arch_timer_freq = (rate / den) * num;
560 set_cntfreq(); 560 set_cntfreq();
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c
index 49ac7977e03e..267f204559c3 100644
--- a/arch/arm/mach-omap2/vc.c
+++ b/arch/arm/mach-omap2/vc.c
@@ -462,7 +462,7 @@ static void omap4_set_timings(struct voltagedomain *voltdm, bool off_mode)
462 val |= omap4_usec_to_val_scrm(tshut, OMAP4_DOWNTIME_SHIFT, 462 val |= omap4_usec_to_val_scrm(tshut, OMAP4_DOWNTIME_SHIFT,
463 OMAP4_DOWNTIME_MASK); 463 OMAP4_DOWNTIME_MASK);
464 464
465 __raw_writel(val, OMAP4_SCRM_CLKSETUPTIME); 465 writel_relaxed(val, OMAP4_SCRM_CLKSETUPTIME);
466} 466}
467 467
468/* OMAP4 specific voltage init functions */ 468/* OMAP4 specific voltage init functions */
@@ -584,7 +584,7 @@ static void __init omap4_vc_i2c_timing_init(struct voltagedomain *voltdm)
584 val = i2c_data->loadbits << 25 | i2c_data->loadbits << 29; 584 val = i2c_data->loadbits << 25 | i2c_data->loadbits << 29;
585 585
586 /* Write to SYSCTRL_PADCONF_WKUP_CTRL_I2C_2 to setup I2C pull */ 586 /* Write to SYSCTRL_PADCONF_WKUP_CTRL_I2C_2 to setup I2C pull */
587 __raw_writel(val, OMAP2_L4_IO_ADDRESS(OMAP4_CTRL_MODULE_PAD_WKUP + 587 writel_relaxed(val, OMAP2_L4_IO_ADDRESS(OMAP4_CTRL_MODULE_PAD_WKUP +
588 OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_I2C_2)); 588 OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_I2C_2));
589 589
590 /* HSSCLH can always be zero */ 590 /* HSSCLH can always be zero */
diff --git a/arch/arm/mach-omap2/wd_timer.c b/arch/arm/mach-omap2/wd_timer.c
index d15c7bbab8e2..97d6607d447a 100644
--- a/arch/arm/mach-omap2/wd_timer.c
+++ b/arch/arm/mach-omap2/wd_timer.c
@@ -49,12 +49,12 @@ int omap2_wd_timer_disable(struct omap_hwmod *oh)
49 } 49 }
50 50
51 /* sequence required to disable watchdog */ 51 /* sequence required to disable watchdog */
52 __raw_writel(0xAAAA, base + OMAP_WDT_SPR); 52 writel_relaxed(0xAAAA, base + OMAP_WDT_SPR);
53 while (__raw_readl(base + OMAP_WDT_WPS) & 0x10) 53 while (readl_relaxed(base + OMAP_WDT_WPS) & 0x10)
54 cpu_relax(); 54 cpu_relax();
55 55
56 __raw_writel(0x5555, base + OMAP_WDT_SPR); 56 writel_relaxed(0x5555, base + OMAP_WDT_SPR);
57 while (__raw_readl(base + OMAP_WDT_WPS) & 0x10) 57 while (readl_relaxed(base + OMAP_WDT_WPS) & 0x10)
58 cpu_relax(); 58 cpu_relax();
59 59
60 return 0; 60 return 0;