diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-01-25 22:58:40 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-01-25 22:58:40 -0500 |
commit | 9d56dd3b083a3bec56e9da35ce07baca81030b03 (patch) | |
tree | a9df9d514fbc32defc1ca8a6d7c2795f15b8a128 /arch/sh/kernel/cpu | |
parent | a077e91690fb32a1453423b2cf1df3492fd30c3a (diff) |
sh: Mass ctrl_in/outX to __raw_read/writeX conversion.
The old ctrl in/out routines are non-portable and unsuitable for
cross-platform use. While drivers/sh has already been sanitized, there
is still quite a lot of code that is not. This converts the arch/sh/ bits
over, which permits us to flag the routines as deprecated whilst still
building with -Werror for the architecture code, and to ensure that
future users are not added.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu')
36 files changed, 189 insertions, 189 deletions
diff --git a/arch/sh/kernel/cpu/adc.c b/arch/sh/kernel/cpu/adc.c index da3d6877f93d..d307571d54b6 100644 --- a/arch/sh/kernel/cpu/adc.c +++ b/arch/sh/kernel/cpu/adc.c | |||
@@ -18,19 +18,19 @@ int adc_single(unsigned int channel) | |||
18 | 18 | ||
19 | off = (channel & 0x03) << 2; | 19 | off = (channel & 0x03) << 2; |
20 | 20 | ||
21 | csr = ctrl_inb(ADCSR); | 21 | csr = __raw_readb(ADCSR); |
22 | csr = channel | ADCSR_ADST | ADCSR_CKS; | 22 | csr = channel | ADCSR_ADST | ADCSR_CKS; |
23 | ctrl_outb(csr, ADCSR); | 23 | __raw_writeb(csr, ADCSR); |
24 | 24 | ||
25 | do { | 25 | do { |
26 | csr = ctrl_inb(ADCSR); | 26 | csr = __raw_readb(ADCSR); |
27 | } while ((csr & ADCSR_ADF) == 0); | 27 | } while ((csr & ADCSR_ADF) == 0); |
28 | 28 | ||
29 | csr &= ~(ADCSR_ADF | ADCSR_ADST); | 29 | csr &= ~(ADCSR_ADF | ADCSR_ADST); |
30 | ctrl_outb(csr, ADCSR); | 30 | __raw_writeb(csr, ADCSR); |
31 | 31 | ||
32 | return (((ctrl_inb(ADDRAH + off) << 8) | | 32 | return (((__raw_readb(ADDRAH + off) << 8) | |
33 | ctrl_inb(ADDRAL + off)) >> 6); | 33 | __raw_readb(ADDRAL + off)) >> 6); |
34 | } | 34 | } |
35 | 35 | ||
36 | EXPORT_SYMBOL(adc_single); | 36 | EXPORT_SYMBOL(adc_single); |
diff --git a/arch/sh/kernel/cpu/init.c b/arch/sh/kernel/cpu/init.c index 05a7d2a373b6..6311b0b1789d 100644 --- a/arch/sh/kernel/cpu/init.c +++ b/arch/sh/kernel/cpu/init.c | |||
@@ -61,10 +61,10 @@ onchip_setup(dsp); | |||
61 | static void __init speculative_execution_init(void) | 61 | static void __init speculative_execution_init(void) |
62 | { | 62 | { |
63 | /* Clear RABD */ | 63 | /* Clear RABD */ |
64 | ctrl_outl(ctrl_inl(CPUOPM) & ~CPUOPM_RABD, CPUOPM); | 64 | __raw_writel(__raw_readl(CPUOPM) & ~CPUOPM_RABD, CPUOPM); |
65 | 65 | ||
66 | /* Flush the update */ | 66 | /* Flush the update */ |
67 | (void)ctrl_inl(CPUOPM); | 67 | (void)__raw_readl(CPUOPM); |
68 | ctrl_barrier(); | 68 | ctrl_barrier(); |
69 | } | 69 | } |
70 | #else | 70 | #else |
@@ -111,7 +111,7 @@ static void cache_init(void) | |||
111 | unsigned long ccr, flags; | 111 | unsigned long ccr, flags; |
112 | 112 | ||
113 | jump_to_uncached(); | 113 | jump_to_uncached(); |
114 | ccr = ctrl_inl(CCR); | 114 | ccr = __raw_readl(CCR); |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * At this point we don't know whether the cache is enabled or not - a | 117 | * At this point we don't know whether the cache is enabled or not - a |
@@ -155,7 +155,7 @@ static void cache_init(void) | |||
155 | for (addr = addrstart; | 155 | for (addr = addrstart; |
156 | addr < addrstart + waysize; | 156 | addr < addrstart + waysize; |
157 | addr += current_cpu_data.dcache.linesz) | 157 | addr += current_cpu_data.dcache.linesz) |
158 | ctrl_outl(0, addr); | 158 | __raw_writel(0, addr); |
159 | 159 | ||
160 | addrstart += current_cpu_data.dcache.way_incr; | 160 | addrstart += current_cpu_data.dcache.way_incr; |
161 | } while (--ways); | 161 | } while (--ways); |
@@ -188,7 +188,7 @@ static void cache_init(void) | |||
188 | 188 | ||
189 | l2_cache_init(); | 189 | l2_cache_init(); |
190 | 190 | ||
191 | ctrl_outl(flags, CCR); | 191 | __raw_writel(flags, CCR); |
192 | back_to_cached(); | 192 | back_to_cached(); |
193 | } | 193 | } |
194 | #else | 194 | #else |
diff --git a/arch/sh/kernel/cpu/irq/intc-sh5.c b/arch/sh/kernel/cpu/irq/intc-sh5.c index 06e7e2959b54..96a239583948 100644 --- a/arch/sh/kernel/cpu/irq/intc-sh5.c +++ b/arch/sh/kernel/cpu/irq/intc-sh5.c | |||
@@ -123,7 +123,7 @@ static void enable_intc_irq(unsigned int irq) | |||
123 | bitmask = 1 << (irq - 32); | 123 | bitmask = 1 << (irq - 32); |
124 | } | 124 | } |
125 | 125 | ||
126 | ctrl_outl(bitmask, reg); | 126 | __raw_writel(bitmask, reg); |
127 | } | 127 | } |
128 | 128 | ||
129 | static void disable_intc_irq(unsigned int irq) | 129 | static void disable_intc_irq(unsigned int irq) |
@@ -139,7 +139,7 @@ static void disable_intc_irq(unsigned int irq) | |||
139 | bitmask = 1 << (irq - 32); | 139 | bitmask = 1 << (irq - 32); |
140 | } | 140 | } |
141 | 141 | ||
142 | ctrl_outl(bitmask, reg); | 142 | __raw_writel(bitmask, reg); |
143 | } | 143 | } |
144 | 144 | ||
145 | static void mask_and_ack_intc(unsigned int irq) | 145 | static void mask_and_ack_intc(unsigned int irq) |
@@ -170,11 +170,11 @@ void __init plat_irq_setup(void) | |||
170 | 170 | ||
171 | 171 | ||
172 | /* Disable all interrupts and set all priorities to 0 to avoid trouble */ | 172 | /* Disable all interrupts and set all priorities to 0 to avoid trouble */ |
173 | ctrl_outl(-1, INTC_INTDSB_0); | 173 | __raw_writel(-1, INTC_INTDSB_0); |
174 | ctrl_outl(-1, INTC_INTDSB_1); | 174 | __raw_writel(-1, INTC_INTDSB_1); |
175 | 175 | ||
176 | for (reg = INTC_INTPRI_0, i = 0; i < INTC_INTPRI_PREGS; i++, reg += 8) | 176 | for (reg = INTC_INTPRI_0, i = 0; i < INTC_INTPRI_PREGS; i++, reg += 8) |
177 | ctrl_outl( NO_PRIORITY, reg); | 177 | __raw_writel( NO_PRIORITY, reg); |
178 | 178 | ||
179 | 179 | ||
180 | #ifdef CONFIG_SH_CAYMAN | 180 | #ifdef CONFIG_SH_CAYMAN |
@@ -199,7 +199,7 @@ void __init plat_irq_setup(void) | |||
199 | reg = INTC_ICR_SET; | 199 | reg = INTC_ICR_SET; |
200 | i = IRQ_IRL0; | 200 | i = IRQ_IRL0; |
201 | } | 201 | } |
202 | ctrl_outl(INTC_ICR_IRLM, reg); | 202 | __raw_writel(INTC_ICR_IRLM, reg); |
203 | 203 | ||
204 | /* Set interrupt priorities according to platform description */ | 204 | /* Set interrupt priorities according to platform description */ |
205 | for (data = 0, reg = INTC_INTPRI_0; i < NR_INTC_IRQS; i++) { | 205 | for (data = 0, reg = INTC_INTPRI_0; i < NR_INTC_IRQS; i++) { |
@@ -207,7 +207,7 @@ void __init plat_irq_setup(void) | |||
207 | ((i % INTC_INTPRI_PPREG) * 4); | 207 | ((i % INTC_INTPRI_PPREG) * 4); |
208 | if ((i % INTC_INTPRI_PPREG) == (INTC_INTPRI_PPREG - 1)) { | 208 | if ((i % INTC_INTPRI_PPREG) == (INTC_INTPRI_PPREG - 1)) { |
209 | /* Upon the 7th, set Priority Register */ | 209 | /* Upon the 7th, set Priority Register */ |
210 | ctrl_outl(data, reg); | 210 | __raw_writel(data, reg); |
211 | data = 0; | 211 | data = 0; |
212 | reg += 8; | 212 | reg += 8; |
213 | } | 213 | } |
diff --git a/arch/sh/kernel/cpu/sh2/clock-sh7619.c b/arch/sh/kernel/cpu/sh2/clock-sh7619.c index 4fe863170e31..0c9f24d7a02f 100644 --- a/arch/sh/kernel/cpu/sh2/clock-sh7619.c +++ b/arch/sh/kernel/cpu/sh2/clock-sh7619.c | |||
@@ -31,7 +31,7 @@ static const int pfc_divisors[] = {1,2,0,4}; | |||
31 | 31 | ||
32 | static void master_clk_init(struct clk *clk) | 32 | static void master_clk_init(struct clk *clk) |
33 | { | 33 | { |
34 | clk->rate *= PLL2 * pll1rate[(ctrl_inw(FREQCR) >> 8) & 7]; | 34 | clk->rate *= PLL2 * pll1rate[(__raw_readw(FREQCR) >> 8) & 7]; |
35 | } | 35 | } |
36 | 36 | ||
37 | static struct clk_ops sh7619_master_clk_ops = { | 37 | static struct clk_ops sh7619_master_clk_ops = { |
@@ -40,7 +40,7 @@ static struct clk_ops sh7619_master_clk_ops = { | |||
40 | 40 | ||
41 | static unsigned long module_clk_recalc(struct clk *clk) | 41 | static unsigned long module_clk_recalc(struct clk *clk) |
42 | { | 42 | { |
43 | int idx = (ctrl_inw(FREQCR) & 0x0007); | 43 | int idx = (__raw_readw(FREQCR) & 0x0007); |
44 | return clk->parent->rate / pfc_divisors[idx]; | 44 | return clk->parent->rate / pfc_divisors[idx]; |
45 | } | 45 | } |
46 | 46 | ||
@@ -50,7 +50,7 @@ static struct clk_ops sh7619_module_clk_ops = { | |||
50 | 50 | ||
51 | static unsigned long bus_clk_recalc(struct clk *clk) | 51 | static unsigned long bus_clk_recalc(struct clk *clk) |
52 | { | 52 | { |
53 | return clk->parent->rate / pll1rate[(ctrl_inw(FREQCR) >> 8) & 7]; | 53 | return clk->parent->rate / pll1rate[(__raw_readw(FREQCR) >> 8) & 7]; |
54 | } | 54 | } |
55 | 55 | ||
56 | static struct clk_ops sh7619_bus_clk_ops = { | 56 | static struct clk_ops sh7619_bus_clk_ops = { |
diff --git a/arch/sh/kernel/cpu/sh2a/clock-sh7201.c b/arch/sh/kernel/cpu/sh2a/clock-sh7201.c index 7814c76159a7..b26264dc2aef 100644 --- a/arch/sh/kernel/cpu/sh2a/clock-sh7201.c +++ b/arch/sh/kernel/cpu/sh2a/clock-sh7201.c | |||
@@ -34,7 +34,7 @@ static const int pfc_divisors[]={1,2,3,4,6,8,12}; | |||
34 | 34 | ||
35 | static void master_clk_init(struct clk *clk) | 35 | static void master_clk_init(struct clk *clk) |
36 | { | 36 | { |
37 | return 10000000 * PLL2 * pll1rate[(ctrl_inw(FREQCR) >> 8) & 0x0007]; | 37 | return 10000000 * PLL2 * pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0007]; |
38 | } | 38 | } |
39 | 39 | ||
40 | static struct clk_ops sh7201_master_clk_ops = { | 40 | static struct clk_ops sh7201_master_clk_ops = { |
@@ -43,7 +43,7 @@ static struct clk_ops sh7201_master_clk_ops = { | |||
43 | 43 | ||
44 | static unsigned long module_clk_recalc(struct clk *clk) | 44 | static unsigned long module_clk_recalc(struct clk *clk) |
45 | { | 45 | { |
46 | int idx = (ctrl_inw(FREQCR) & 0x0007); | 46 | int idx = (__raw_readw(FREQCR) & 0x0007); |
47 | return clk->parent->rate / pfc_divisors[idx]; | 47 | return clk->parent->rate / pfc_divisors[idx]; |
48 | } | 48 | } |
49 | 49 | ||
@@ -53,7 +53,7 @@ static struct clk_ops sh7201_module_clk_ops = { | |||
53 | 53 | ||
54 | static unsigned long bus_clk_recalc(struct clk *clk) | 54 | static unsigned long bus_clk_recalc(struct clk *clk) |
55 | { | 55 | { |
56 | int idx = (ctrl_inw(FREQCR) & 0x0007); | 56 | int idx = (__raw_readw(FREQCR) & 0x0007); |
57 | return clk->parent->rate / pfc_divisors[idx]; | 57 | return clk->parent->rate / pfc_divisors[idx]; |
58 | } | 58 | } |
59 | 59 | ||
@@ -63,7 +63,7 @@ static struct clk_ops sh7201_bus_clk_ops = { | |||
63 | 63 | ||
64 | static unsigned long cpu_clk_recalc(struct clk *clk) | 64 | static unsigned long cpu_clk_recalc(struct clk *clk) |
65 | { | 65 | { |
66 | int idx = ((ctrl_inw(FREQCR) >> 4) & 0x0007); | 66 | int idx = ((__raw_readw(FREQCR) >> 4) & 0x0007); |
67 | return clk->parent->rate / ifc_divisors[idx]; | 67 | return clk->parent->rate / ifc_divisors[idx]; |
68 | } | 68 | } |
69 | 69 | ||
diff --git a/arch/sh/kernel/cpu/sh2a/clock-sh7203.c b/arch/sh/kernel/cpu/sh2a/clock-sh7203.c index 940986965102..7e75d8f79502 100644 --- a/arch/sh/kernel/cpu/sh2a/clock-sh7203.c +++ b/arch/sh/kernel/cpu/sh2a/clock-sh7203.c | |||
@@ -39,7 +39,7 @@ static const int pfc_divisors[]={1,2,3,4,6,8,12}; | |||
39 | 39 | ||
40 | static void master_clk_init(struct clk *clk) | 40 | static void master_clk_init(struct clk *clk) |
41 | { | 41 | { |
42 | clk->rate *= pll1rate[(ctrl_inw(FREQCR) >> 8) & 0x0003] * PLL2 ; | 42 | clk->rate *= pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0003] * PLL2 ; |
43 | } | 43 | } |
44 | 44 | ||
45 | static struct clk_ops sh7203_master_clk_ops = { | 45 | static struct clk_ops sh7203_master_clk_ops = { |
@@ -48,7 +48,7 @@ static struct clk_ops sh7203_master_clk_ops = { | |||
48 | 48 | ||
49 | static unsigned long module_clk_recalc(struct clk *clk) | 49 | static unsigned long module_clk_recalc(struct clk *clk) |
50 | { | 50 | { |
51 | int idx = (ctrl_inw(FREQCR) & 0x0007); | 51 | int idx = (__raw_readw(FREQCR) & 0x0007); |
52 | return clk->parent->rate / pfc_divisors[idx]; | 52 | return clk->parent->rate / pfc_divisors[idx]; |
53 | } | 53 | } |
54 | 54 | ||
@@ -58,7 +58,7 @@ static struct clk_ops sh7203_module_clk_ops = { | |||
58 | 58 | ||
59 | static unsigned long bus_clk_recalc(struct clk *clk) | 59 | static unsigned long bus_clk_recalc(struct clk *clk) |
60 | { | 60 | { |
61 | int idx = (ctrl_inw(FREQCR) & 0x0007); | 61 | int idx = (__raw_readw(FREQCR) & 0x0007); |
62 | return clk->parent->rate / pfc_divisors[idx-2]; | 62 | return clk->parent->rate / pfc_divisors[idx-2]; |
63 | } | 63 | } |
64 | 64 | ||
diff --git a/arch/sh/kernel/cpu/sh2a/clock-sh7206.c b/arch/sh/kernel/cpu/sh2a/clock-sh7206.c index c2268bdeceeb..b27a5e2687ab 100644 --- a/arch/sh/kernel/cpu/sh2a/clock-sh7206.c +++ b/arch/sh/kernel/cpu/sh2a/clock-sh7206.c | |||
@@ -34,7 +34,7 @@ static const int pfc_divisors[]={1,2,3,4,6,8,12}; | |||
34 | 34 | ||
35 | static void master_clk_init(struct clk *clk) | 35 | static void master_clk_init(struct clk *clk) |
36 | { | 36 | { |
37 | clk->rate *= PLL2 * pll1rate[(ctrl_inw(FREQCR) >> 8) & 0x0007]; | 37 | clk->rate *= PLL2 * pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0007]; |
38 | } | 38 | } |
39 | 39 | ||
40 | static struct clk_ops sh7206_master_clk_ops = { | 40 | static struct clk_ops sh7206_master_clk_ops = { |
@@ -43,7 +43,7 @@ static struct clk_ops sh7206_master_clk_ops = { | |||
43 | 43 | ||
44 | static unsigned long module_clk_recalc(struct clk *clk) | 44 | static unsigned long module_clk_recalc(struct clk *clk) |
45 | { | 45 | { |
46 | int idx = (ctrl_inw(FREQCR) & 0x0007); | 46 | int idx = (__raw_readw(FREQCR) & 0x0007); |
47 | return clk->parent->rate / pfc_divisors[idx]; | 47 | return clk->parent->rate / pfc_divisors[idx]; |
48 | } | 48 | } |
49 | 49 | ||
@@ -53,7 +53,7 @@ static struct clk_ops sh7206_module_clk_ops = { | |||
53 | 53 | ||
54 | static unsigned long bus_clk_recalc(struct clk *clk) | 54 | static unsigned long bus_clk_recalc(struct clk *clk) |
55 | { | 55 | { |
56 | return clk->parent->rate / pll1rate[(ctrl_inw(FREQCR) >> 8) & 0x0007]; | 56 | return clk->parent->rate / pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0007]; |
57 | } | 57 | } |
58 | 58 | ||
59 | static struct clk_ops sh7206_bus_clk_ops = { | 59 | static struct clk_ops sh7206_bus_clk_ops = { |
@@ -62,7 +62,7 @@ static struct clk_ops sh7206_bus_clk_ops = { | |||
62 | 62 | ||
63 | static unsigned long cpu_clk_recalc(struct clk *clk) | 63 | static unsigned long cpu_clk_recalc(struct clk *clk) |
64 | { | 64 | { |
65 | int idx = (ctrl_inw(FREQCR) & 0x0007); | 65 | int idx = (__raw_readw(FREQCR) & 0x0007); |
66 | return clk->parent->rate / ifc_divisors[idx]; | 66 | return clk->parent->rate / ifc_divisors[idx]; |
67 | } | 67 | } |
68 | 68 | ||
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh3.c b/arch/sh/kernel/cpu/sh3/clock-sh3.c index 27b8738f0b09..b78384afac09 100644 --- a/arch/sh/kernel/cpu/sh3/clock-sh3.c +++ b/arch/sh/kernel/cpu/sh3/clock-sh3.c | |||
@@ -28,7 +28,7 @@ static int pfc_divisors[] = { 1, 2, 3, 4, 6, 1, 1, 1 }; | |||
28 | 28 | ||
29 | static void master_clk_init(struct clk *clk) | 29 | static void master_clk_init(struct clk *clk) |
30 | { | 30 | { |
31 | int frqcr = ctrl_inw(FRQCR); | 31 | int frqcr = __raw_readw(FRQCR); |
32 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); | 32 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); |
33 | 33 | ||
34 | clk->rate *= pfc_divisors[idx]; | 34 | clk->rate *= pfc_divisors[idx]; |
@@ -40,7 +40,7 @@ static struct clk_ops sh3_master_clk_ops = { | |||
40 | 40 | ||
41 | static unsigned long module_clk_recalc(struct clk *clk) | 41 | static unsigned long module_clk_recalc(struct clk *clk) |
42 | { | 42 | { |
43 | int frqcr = ctrl_inw(FRQCR); | 43 | int frqcr = __raw_readw(FRQCR); |
44 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); | 44 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); |
45 | 45 | ||
46 | return clk->parent->rate / pfc_divisors[idx]; | 46 | return clk->parent->rate / pfc_divisors[idx]; |
@@ -52,7 +52,7 @@ static struct clk_ops sh3_module_clk_ops = { | |||
52 | 52 | ||
53 | static unsigned long bus_clk_recalc(struct clk *clk) | 53 | static unsigned long bus_clk_recalc(struct clk *clk) |
54 | { | 54 | { |
55 | int frqcr = ctrl_inw(FRQCR); | 55 | int frqcr = __raw_readw(FRQCR); |
56 | int idx = ((frqcr & 0x8000) >> 13) | ((frqcr & 0x0030) >> 4); | 56 | int idx = ((frqcr & 0x8000) >> 13) | ((frqcr & 0x0030) >> 4); |
57 | 57 | ||
58 | return clk->parent->rate / stc_multipliers[idx]; | 58 | return clk->parent->rate / stc_multipliers[idx]; |
@@ -64,7 +64,7 @@ static struct clk_ops sh3_bus_clk_ops = { | |||
64 | 64 | ||
65 | static unsigned long cpu_clk_recalc(struct clk *clk) | 65 | static unsigned long cpu_clk_recalc(struct clk *clk) |
66 | { | 66 | { |
67 | int frqcr = ctrl_inw(FRQCR); | 67 | int frqcr = __raw_readw(FRQCR); |
68 | int idx = ((frqcr & 0x4000) >> 12) | ((frqcr & 0x000c) >> 2); | 68 | int idx = ((frqcr & 0x4000) >> 12) | ((frqcr & 0x000c) >> 2); |
69 | 69 | ||
70 | return clk->parent->rate / ifc_divisors[idx]; | 70 | return clk->parent->rate / ifc_divisors[idx]; |
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7705.c b/arch/sh/kernel/cpu/sh3/clock-sh7705.c index 0ca8f2c3646c..0ecea1451c6f 100644 --- a/arch/sh/kernel/cpu/sh3/clock-sh7705.c +++ b/arch/sh/kernel/cpu/sh3/clock-sh7705.c | |||
@@ -32,7 +32,7 @@ static int pfc_divisors[] = { 1, 2, 3, 4, 6, 1, 1, 1 }; | |||
32 | 32 | ||
33 | static void master_clk_init(struct clk *clk) | 33 | static void master_clk_init(struct clk *clk) |
34 | { | 34 | { |
35 | clk->rate *= pfc_divisors[ctrl_inw(FRQCR) & 0x0003]; | 35 | clk->rate *= pfc_divisors[__raw_readw(FRQCR) & 0x0003]; |
36 | } | 36 | } |
37 | 37 | ||
38 | static struct clk_ops sh7705_master_clk_ops = { | 38 | static struct clk_ops sh7705_master_clk_ops = { |
@@ -41,7 +41,7 @@ static struct clk_ops sh7705_master_clk_ops = { | |||
41 | 41 | ||
42 | static unsigned long module_clk_recalc(struct clk *clk) | 42 | static unsigned long module_clk_recalc(struct clk *clk) |
43 | { | 43 | { |
44 | int idx = ctrl_inw(FRQCR) & 0x0003; | 44 | int idx = __raw_readw(FRQCR) & 0x0003; |
45 | return clk->parent->rate / pfc_divisors[idx]; | 45 | return clk->parent->rate / pfc_divisors[idx]; |
46 | } | 46 | } |
47 | 47 | ||
@@ -51,7 +51,7 @@ static struct clk_ops sh7705_module_clk_ops = { | |||
51 | 51 | ||
52 | static unsigned long bus_clk_recalc(struct clk *clk) | 52 | static unsigned long bus_clk_recalc(struct clk *clk) |
53 | { | 53 | { |
54 | int idx = (ctrl_inw(FRQCR) & 0x0300) >> 8; | 54 | int idx = (__raw_readw(FRQCR) & 0x0300) >> 8; |
55 | return clk->parent->rate / stc_multipliers[idx]; | 55 | return clk->parent->rate / stc_multipliers[idx]; |
56 | } | 56 | } |
57 | 57 | ||
@@ -61,7 +61,7 @@ static struct clk_ops sh7705_bus_clk_ops = { | |||
61 | 61 | ||
62 | static unsigned long cpu_clk_recalc(struct clk *clk) | 62 | static unsigned long cpu_clk_recalc(struct clk *clk) |
63 | { | 63 | { |
64 | int idx = (ctrl_inw(FRQCR) & 0x0030) >> 4; | 64 | int idx = (__raw_readw(FRQCR) & 0x0030) >> 4; |
65 | return clk->parent->rate / ifc_divisors[idx]; | 65 | return clk->parent->rate / ifc_divisors[idx]; |
66 | } | 66 | } |
67 | 67 | ||
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7706.c b/arch/sh/kernel/cpu/sh3/clock-sh7706.c index 4bf7887d310a..6f9ff8b57dd6 100644 --- a/arch/sh/kernel/cpu/sh3/clock-sh7706.c +++ b/arch/sh/kernel/cpu/sh3/clock-sh7706.c | |||
@@ -24,7 +24,7 @@ static int pfc_divisors[] = { 1, 2, 4, 1, 3, 6, 1, 1 }; | |||
24 | 24 | ||
25 | static void master_clk_init(struct clk *clk) | 25 | static void master_clk_init(struct clk *clk) |
26 | { | 26 | { |
27 | int frqcr = ctrl_inw(FRQCR); | 27 | int frqcr = __raw_readw(FRQCR); |
28 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); | 28 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); |
29 | 29 | ||
30 | clk->rate *= pfc_divisors[idx]; | 30 | clk->rate *= pfc_divisors[idx]; |
@@ -36,7 +36,7 @@ static struct clk_ops sh7706_master_clk_ops = { | |||
36 | 36 | ||
37 | static unsigned long module_clk_recalc(struct clk *clk) | 37 | static unsigned long module_clk_recalc(struct clk *clk) |
38 | { | 38 | { |
39 | int frqcr = ctrl_inw(FRQCR); | 39 | int frqcr = __raw_readw(FRQCR); |
40 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); | 40 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); |
41 | 41 | ||
42 | return clk->parent->rate / pfc_divisors[idx]; | 42 | return clk->parent->rate / pfc_divisors[idx]; |
@@ -48,7 +48,7 @@ static struct clk_ops sh7706_module_clk_ops = { | |||
48 | 48 | ||
49 | static unsigned long bus_clk_recalc(struct clk *clk) | 49 | static unsigned long bus_clk_recalc(struct clk *clk) |
50 | { | 50 | { |
51 | int frqcr = ctrl_inw(FRQCR); | 51 | int frqcr = __raw_readw(FRQCR); |
52 | int idx = ((frqcr & 0x8000) >> 13) | ((frqcr & 0x0030) >> 4); | 52 | int idx = ((frqcr & 0x8000) >> 13) | ((frqcr & 0x0030) >> 4); |
53 | 53 | ||
54 | return clk->parent->rate / stc_multipliers[idx]; | 54 | return clk->parent->rate / stc_multipliers[idx]; |
@@ -60,7 +60,7 @@ static struct clk_ops sh7706_bus_clk_ops = { | |||
60 | 60 | ||
61 | static unsigned long cpu_clk_recalc(struct clk *clk) | 61 | static unsigned long cpu_clk_recalc(struct clk *clk) |
62 | { | 62 | { |
63 | int frqcr = ctrl_inw(FRQCR); | 63 | int frqcr = __raw_readw(FRQCR); |
64 | int idx = ((frqcr & 0x4000) >> 12) | ((frqcr & 0x000c) >> 2); | 64 | int idx = ((frqcr & 0x4000) >> 12) | ((frqcr & 0x000c) >> 2); |
65 | 65 | ||
66 | return clk->parent->rate / ifc_divisors[idx]; | 66 | return clk->parent->rate / ifc_divisors[idx]; |
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7709.c b/arch/sh/kernel/cpu/sh3/clock-sh7709.c index e8749505bd2a..f302ba09e681 100644 --- a/arch/sh/kernel/cpu/sh3/clock-sh7709.c +++ b/arch/sh/kernel/cpu/sh3/clock-sh7709.c | |||
@@ -24,7 +24,7 @@ static int pfc_divisors[] = { 1, 2, 4, 1, 3, 6, 1, 1 }; | |||
24 | 24 | ||
25 | static void master_clk_init(struct clk *clk) | 25 | static void master_clk_init(struct clk *clk) |
26 | { | 26 | { |
27 | int frqcr = ctrl_inw(FRQCR); | 27 | int frqcr = __raw_readw(FRQCR); |
28 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); | 28 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); |
29 | 29 | ||
30 | clk->rate *= pfc_divisors[idx]; | 30 | clk->rate *= pfc_divisors[idx]; |
@@ -36,7 +36,7 @@ static struct clk_ops sh7709_master_clk_ops = { | |||
36 | 36 | ||
37 | static unsigned long module_clk_recalc(struct clk *clk) | 37 | static unsigned long module_clk_recalc(struct clk *clk) |
38 | { | 38 | { |
39 | int frqcr = ctrl_inw(FRQCR); | 39 | int frqcr = __raw_readw(FRQCR); |
40 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); | 40 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); |
41 | 41 | ||
42 | return clk->parent->rate / pfc_divisors[idx]; | 42 | return clk->parent->rate / pfc_divisors[idx]; |
@@ -48,7 +48,7 @@ static struct clk_ops sh7709_module_clk_ops = { | |||
48 | 48 | ||
49 | static unsigned long bus_clk_recalc(struct clk *clk) | 49 | static unsigned long bus_clk_recalc(struct clk *clk) |
50 | { | 50 | { |
51 | int frqcr = ctrl_inw(FRQCR); | 51 | int frqcr = __raw_readw(FRQCR); |
52 | int idx = (frqcr & 0x0080) ? | 52 | int idx = (frqcr & 0x0080) ? |
53 | ((frqcr & 0x8000) >> 13) | ((frqcr & 0x0030) >> 4) : 1; | 53 | ((frqcr & 0x8000) >> 13) | ((frqcr & 0x0030) >> 4) : 1; |
54 | 54 | ||
@@ -61,7 +61,7 @@ static struct clk_ops sh7709_bus_clk_ops = { | |||
61 | 61 | ||
62 | static unsigned long cpu_clk_recalc(struct clk *clk) | 62 | static unsigned long cpu_clk_recalc(struct clk *clk) |
63 | { | 63 | { |
64 | int frqcr = ctrl_inw(FRQCR); | 64 | int frqcr = __raw_readw(FRQCR); |
65 | int idx = ((frqcr & 0x4000) >> 12) | ((frqcr & 0x000c) >> 2); | 65 | int idx = ((frqcr & 0x4000) >> 12) | ((frqcr & 0x000c) >> 2); |
66 | 66 | ||
67 | return clk->parent->rate / ifc_divisors[idx]; | 67 | return clk->parent->rate / ifc_divisors[idx]; |
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7710.c b/arch/sh/kernel/cpu/sh3/clock-sh7710.c index 030a58ba18a5..29a87d8946a4 100644 --- a/arch/sh/kernel/cpu/sh3/clock-sh7710.c +++ b/arch/sh/kernel/cpu/sh3/clock-sh7710.c | |||
@@ -26,7 +26,7 @@ static int md_table[] = { 1, 2, 3, 4, 6, 8, 12 }; | |||
26 | 26 | ||
27 | static void master_clk_init(struct clk *clk) | 27 | static void master_clk_init(struct clk *clk) |
28 | { | 28 | { |
29 | clk->rate *= md_table[ctrl_inw(FRQCR) & 0x0007]; | 29 | clk->rate *= md_table[__raw_readw(FRQCR) & 0x0007]; |
30 | } | 30 | } |
31 | 31 | ||
32 | static struct clk_ops sh7710_master_clk_ops = { | 32 | static struct clk_ops sh7710_master_clk_ops = { |
@@ -35,7 +35,7 @@ static struct clk_ops sh7710_master_clk_ops = { | |||
35 | 35 | ||
36 | static unsigned long module_clk_recalc(struct clk *clk) | 36 | static unsigned long module_clk_recalc(struct clk *clk) |
37 | { | 37 | { |
38 | int idx = (ctrl_inw(FRQCR) & 0x0007); | 38 | int idx = (__raw_readw(FRQCR) & 0x0007); |
39 | return clk->parent->rate / md_table[idx]; | 39 | return clk->parent->rate / md_table[idx]; |
40 | } | 40 | } |
41 | 41 | ||
@@ -45,7 +45,7 @@ static struct clk_ops sh7710_module_clk_ops = { | |||
45 | 45 | ||
46 | static unsigned long bus_clk_recalc(struct clk *clk) | 46 | static unsigned long bus_clk_recalc(struct clk *clk) |
47 | { | 47 | { |
48 | int idx = (ctrl_inw(FRQCR) & 0x0700) >> 8; | 48 | int idx = (__raw_readw(FRQCR) & 0x0700) >> 8; |
49 | return clk->parent->rate / md_table[idx]; | 49 | return clk->parent->rate / md_table[idx]; |
50 | } | 50 | } |
51 | 51 | ||
@@ -55,7 +55,7 @@ static struct clk_ops sh7710_bus_clk_ops = { | |||
55 | 55 | ||
56 | static unsigned long cpu_clk_recalc(struct clk *clk) | 56 | static unsigned long cpu_clk_recalc(struct clk *clk) |
57 | { | 57 | { |
58 | int idx = (ctrl_inw(FRQCR) & 0x0070) >> 4; | 58 | int idx = (__raw_readw(FRQCR) & 0x0070) >> 4; |
59 | return clk->parent->rate / md_table[idx]; | 59 | return clk->parent->rate / md_table[idx]; |
60 | } | 60 | } |
61 | 61 | ||
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7712.c b/arch/sh/kernel/cpu/sh3/clock-sh7712.c index 6428ee6c77ed..b0d0c5203996 100644 --- a/arch/sh/kernel/cpu/sh3/clock-sh7712.c +++ b/arch/sh/kernel/cpu/sh3/clock-sh7712.c | |||
@@ -23,7 +23,7 @@ static int divisors[] = { 1, 2, 3, 4, 6 }; | |||
23 | 23 | ||
24 | static void master_clk_init(struct clk *clk) | 24 | static void master_clk_init(struct clk *clk) |
25 | { | 25 | { |
26 | int frqcr = ctrl_inw(FRQCR); | 26 | int frqcr = __raw_readw(FRQCR); |
27 | int idx = (frqcr & 0x0300) >> 8; | 27 | int idx = (frqcr & 0x0300) >> 8; |
28 | 28 | ||
29 | clk->rate *= multipliers[idx]; | 29 | clk->rate *= multipliers[idx]; |
@@ -35,7 +35,7 @@ static struct clk_ops sh7712_master_clk_ops = { | |||
35 | 35 | ||
36 | static unsigned long module_clk_recalc(struct clk *clk) | 36 | static unsigned long module_clk_recalc(struct clk *clk) |
37 | { | 37 | { |
38 | int frqcr = ctrl_inw(FRQCR); | 38 | int frqcr = __raw_readw(FRQCR); |
39 | int idx = frqcr & 0x0007; | 39 | int idx = frqcr & 0x0007; |
40 | 40 | ||
41 | return clk->parent->rate / divisors[idx]; | 41 | return clk->parent->rate / divisors[idx]; |
@@ -47,7 +47,7 @@ static struct clk_ops sh7712_module_clk_ops = { | |||
47 | 47 | ||
48 | static unsigned long cpu_clk_recalc(struct clk *clk) | 48 | static unsigned long cpu_clk_recalc(struct clk *clk) |
49 | { | 49 | { |
50 | int frqcr = ctrl_inw(FRQCR); | 50 | int frqcr = __raw_readw(FRQCR); |
51 | int idx = (frqcr & 0x0030) >> 4; | 51 | int idx = (frqcr & 0x0030) >> 4; |
52 | 52 | ||
53 | return clk->parent->rate / divisors[idx]; | 53 | return clk->parent->rate / divisors[idx]; |
diff --git a/arch/sh/kernel/cpu/sh3/probe.c b/arch/sh/kernel/cpu/sh3/probe.c index c2db65719f4d..295ec4c99e98 100644 --- a/arch/sh/kernel/cpu/sh3/probe.c +++ b/arch/sh/kernel/cpu/sh3/probe.c | |||
@@ -30,23 +30,23 @@ int detect_cpu_and_cache_system(void) | |||
30 | addr1 = CACHE_OC_ADDRESS_ARRAY + (1 << 12); | 30 | addr1 = CACHE_OC_ADDRESS_ARRAY + (1 << 12); |
31 | 31 | ||
32 | /* First, write back & invalidate */ | 32 | /* First, write back & invalidate */ |
33 | data0 = ctrl_inl(addr0); | 33 | data0 = __raw_readl(addr0); |
34 | ctrl_outl(data0&~(SH_CACHE_VALID|SH_CACHE_UPDATED), addr0); | 34 | __raw_writel(data0&~(SH_CACHE_VALID|SH_CACHE_UPDATED), addr0); |
35 | data1 = ctrl_inl(addr1); | 35 | data1 = __raw_readl(addr1); |
36 | ctrl_outl(data1&~(SH_CACHE_VALID|SH_CACHE_UPDATED), addr1); | 36 | __raw_writel(data1&~(SH_CACHE_VALID|SH_CACHE_UPDATED), addr1); |
37 | 37 | ||
38 | /* Next, check if there's shadow or not */ | 38 | /* Next, check if there's shadow or not */ |
39 | data0 = ctrl_inl(addr0); | 39 | data0 = __raw_readl(addr0); |
40 | data0 ^= SH_CACHE_VALID; | 40 | data0 ^= SH_CACHE_VALID; |
41 | ctrl_outl(data0, addr0); | 41 | __raw_writel(data0, addr0); |
42 | data1 = ctrl_inl(addr1); | 42 | data1 = __raw_readl(addr1); |
43 | data2 = data1 ^ SH_CACHE_VALID; | 43 | data2 = data1 ^ SH_CACHE_VALID; |
44 | ctrl_outl(data2, addr1); | 44 | __raw_writel(data2, addr1); |
45 | data3 = ctrl_inl(addr0); | 45 | data3 = __raw_readl(addr0); |
46 | 46 | ||
47 | /* Lastly, invaliate them. */ | 47 | /* Lastly, invaliate them. */ |
48 | ctrl_outl(data0&~SH_CACHE_VALID, addr0); | 48 | __raw_writel(data0&~SH_CACHE_VALID, addr0); |
49 | ctrl_outl(data2&~SH_CACHE_VALID, addr1); | 49 | __raw_writel(data2&~SH_CACHE_VALID, addr1); |
50 | 50 | ||
51 | back_to_cached(); | 51 | back_to_cached(); |
52 | 52 | ||
@@ -94,9 +94,9 @@ int detect_cpu_and_cache_system(void) | |||
94 | boot_cpu_data.dcache.way_incr = (1 << 13); | 94 | boot_cpu_data.dcache.way_incr = (1 << 13); |
95 | boot_cpu_data.dcache.entry_mask = 0x1ff0; | 95 | boot_cpu_data.dcache.entry_mask = 0x1ff0; |
96 | boot_cpu_data.dcache.sets = 512; | 96 | boot_cpu_data.dcache.sets = 512; |
97 | ctrl_outl(CCR_CACHE_32KB, CCR3_REG); | 97 | __raw_writel(CCR_CACHE_32KB, CCR3_REG); |
98 | #else | 98 | #else |
99 | ctrl_outl(CCR_CACHE_16KB, CCR3_REG); | 99 | __raw_writel(CCR_CACHE_16KB, CCR3_REG); |
100 | #endif | 100 | #endif |
101 | #endif | 101 | #endif |
102 | } | 102 | } |
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh3.c b/arch/sh/kernel/cpu/sh3/setup-sh3.c index c98846857855..53be70b98116 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh3.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh3.c | |||
@@ -58,7 +58,7 @@ static DECLARE_INTC_DESC_ACK(intc_desc_irq45, "sh3-irq45", | |||
58 | void __init plat_irq_setup_pins(int mode) | 58 | void __init plat_irq_setup_pins(int mode) |
59 | { | 59 | { |
60 | if (mode == IRQ_MODE_IRQ) { | 60 | if (mode == IRQ_MODE_IRQ) { |
61 | ctrl_outw(ctrl_inw(INTC_ICR1) & ~INTC_ICR1_IRQLVL, INTC_ICR1); | 61 | __raw_writew(__raw_readw(INTC_ICR1) & ~INTC_ICR1_IRQLVL, INTC_ICR1); |
62 | register_intc_controller(&intc_desc_irq0123); | 62 | register_intc_controller(&intc_desc_irq0123); |
63 | return; | 63 | return; |
64 | } | 64 | } |
diff --git a/arch/sh/kernel/cpu/sh4/clock-sh4-202.c b/arch/sh/kernel/cpu/sh4/clock-sh4-202.c index 21421e34e7d5..6b80850294da 100644 --- a/arch/sh/kernel/cpu/sh4/clock-sh4-202.c +++ b/arch/sh/kernel/cpu/sh4/clock-sh4-202.c | |||
@@ -23,7 +23,7 @@ static int frqcr3_values[] = { 0, 1, 2, 3, 4, 5, 6 }; | |||
23 | 23 | ||
24 | static unsigned long emi_clk_recalc(struct clk *clk) | 24 | static unsigned long emi_clk_recalc(struct clk *clk) |
25 | { | 25 | { |
26 | int idx = ctrl_inl(CPG2_FRQCR3) & 0x0007; | 26 | int idx = __raw_readl(CPG2_FRQCR3) & 0x0007; |
27 | return clk->parent->rate / frqcr3_divisors[idx]; | 27 | return clk->parent->rate / frqcr3_divisors[idx]; |
28 | } | 28 | } |
29 | 29 | ||
@@ -52,7 +52,7 @@ static struct clk sh4202_emi_clk = { | |||
52 | 52 | ||
53 | static unsigned long femi_clk_recalc(struct clk *clk) | 53 | static unsigned long femi_clk_recalc(struct clk *clk) |
54 | { | 54 | { |
55 | int idx = (ctrl_inl(CPG2_FRQCR3) >> 3) & 0x0007; | 55 | int idx = (__raw_readl(CPG2_FRQCR3) >> 3) & 0x0007; |
56 | return clk->parent->rate / frqcr3_divisors[idx]; | 56 | return clk->parent->rate / frqcr3_divisors[idx]; |
57 | } | 57 | } |
58 | 58 | ||
@@ -92,7 +92,7 @@ static void shoc_clk_init(struct clk *clk) | |||
92 | 92 | ||
93 | static unsigned long shoc_clk_recalc(struct clk *clk) | 93 | static unsigned long shoc_clk_recalc(struct clk *clk) |
94 | { | 94 | { |
95 | int idx = (ctrl_inl(CPG2_FRQCR3) >> 6) & 0x0007; | 95 | int idx = (__raw_readl(CPG2_FRQCR3) >> 6) & 0x0007; |
96 | return clk->parent->rate / frqcr3_divisors[idx]; | 96 | return clk->parent->rate / frqcr3_divisors[idx]; |
97 | } | 97 | } |
98 | 98 | ||
@@ -122,10 +122,10 @@ static int shoc_clk_set_rate(struct clk *clk, unsigned long rate, int algo_id) | |||
122 | 122 | ||
123 | tmp = frqcr3_lookup(clk, rate); | 123 | tmp = frqcr3_lookup(clk, rate); |
124 | 124 | ||
125 | frqcr3 = ctrl_inl(CPG2_FRQCR3); | 125 | frqcr3 = __raw_readl(CPG2_FRQCR3); |
126 | frqcr3 &= ~(0x0007 << 6); | 126 | frqcr3 &= ~(0x0007 << 6); |
127 | frqcr3 |= tmp << 6; | 127 | frqcr3 |= tmp << 6; |
128 | ctrl_outl(frqcr3, CPG2_FRQCR3); | 128 | __raw_writel(frqcr3, CPG2_FRQCR3); |
129 | 129 | ||
130 | clk->rate = clk->parent->rate / frqcr3_divisors[tmp]; | 130 | clk->rate = clk->parent->rate / frqcr3_divisors[tmp]; |
131 | 131 | ||
diff --git a/arch/sh/kernel/cpu/sh4/clock-sh4.c b/arch/sh/kernel/cpu/sh4/clock-sh4.c index 73294d9cd049..5add75c1f539 100644 --- a/arch/sh/kernel/cpu/sh4/clock-sh4.c +++ b/arch/sh/kernel/cpu/sh4/clock-sh4.c | |||
@@ -28,7 +28,7 @@ static int pfc_divisors[] = { 2, 3, 4, 6, 8, 2, 2, 2 }; | |||
28 | 28 | ||
29 | static void master_clk_init(struct clk *clk) | 29 | static void master_clk_init(struct clk *clk) |
30 | { | 30 | { |
31 | clk->rate *= pfc_divisors[ctrl_inw(FRQCR) & 0x0007]; | 31 | clk->rate *= pfc_divisors[__raw_readw(FRQCR) & 0x0007]; |
32 | } | 32 | } |
33 | 33 | ||
34 | static struct clk_ops sh4_master_clk_ops = { | 34 | static struct clk_ops sh4_master_clk_ops = { |
@@ -37,7 +37,7 @@ static struct clk_ops sh4_master_clk_ops = { | |||
37 | 37 | ||
38 | static unsigned long module_clk_recalc(struct clk *clk) | 38 | static unsigned long module_clk_recalc(struct clk *clk) |
39 | { | 39 | { |
40 | int idx = (ctrl_inw(FRQCR) & 0x0007); | 40 | int idx = (__raw_readw(FRQCR) & 0x0007); |
41 | return clk->parent->rate / pfc_divisors[idx]; | 41 | return clk->parent->rate / pfc_divisors[idx]; |
42 | } | 42 | } |
43 | 43 | ||
@@ -47,7 +47,7 @@ static struct clk_ops sh4_module_clk_ops = { | |||
47 | 47 | ||
48 | static unsigned long bus_clk_recalc(struct clk *clk) | 48 | static unsigned long bus_clk_recalc(struct clk *clk) |
49 | { | 49 | { |
50 | int idx = (ctrl_inw(FRQCR) >> 3) & 0x0007; | 50 | int idx = (__raw_readw(FRQCR) >> 3) & 0x0007; |
51 | return clk->parent->rate / bfc_divisors[idx]; | 51 | return clk->parent->rate / bfc_divisors[idx]; |
52 | } | 52 | } |
53 | 53 | ||
@@ -57,7 +57,7 @@ static struct clk_ops sh4_bus_clk_ops = { | |||
57 | 57 | ||
58 | static unsigned long cpu_clk_recalc(struct clk *clk) | 58 | static unsigned long cpu_clk_recalc(struct clk *clk) |
59 | { | 59 | { |
60 | int idx = (ctrl_inw(FRQCR) >> 6) & 0x0007; | 60 | int idx = (__raw_readw(FRQCR) >> 6) & 0x0007; |
61 | return clk->parent->rate / ifc_divisors[idx]; | 61 | return clk->parent->rate / ifc_divisors[idx]; |
62 | } | 62 | } |
63 | 63 | ||
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c index cc02b3145cca..822977a06d84 100644 --- a/arch/sh/kernel/cpu/sh4/probe.c +++ b/arch/sh/kernel/cpu/sh4/probe.c | |||
@@ -28,9 +28,9 @@ int __init detect_cpu_and_cache_system(void) | |||
28 | [9] = (1 << 16) | 28 | [9] = (1 << 16) |
29 | }; | 29 | }; |
30 | 30 | ||
31 | pvr = (ctrl_inl(CCN_PVR) >> 8) & 0xffffff; | 31 | pvr = (__raw_readl(CCN_PVR) >> 8) & 0xffffff; |
32 | prr = (ctrl_inl(CCN_PRR) >> 4) & 0xff; | 32 | prr = (__raw_readl(CCN_PRR) >> 4) & 0xff; |
33 | cvr = (ctrl_inl(CCN_CVR)); | 33 | cvr = (__raw_readl(CCN_CVR)); |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Setup some sane SH-4 defaults for the icache | 36 | * Setup some sane SH-4 defaults for the icache |
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c index 4b733715cdb5..b9b7e10ad68f 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c | |||
@@ -198,7 +198,7 @@ void __init plat_irq_setup_pins(int mode) | |||
198 | { | 198 | { |
199 | switch (mode) { | 199 | switch (mode) { |
200 | case IRQ_MODE_IRQ: /* individual interrupt mode for IRL3-0 */ | 200 | case IRQ_MODE_IRQ: /* individual interrupt mode for IRL3-0 */ |
201 | ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); | 201 | __raw_writew(__raw_readw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); |
202 | register_intc_controller(&intc_desc_irlm); | 202 | register_intc_controller(&intc_desc_irlm); |
203 | break; | 203 | break; |
204 | default: | 204 | default: |
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c index b2a9df1af64c..ffd79e57254f 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c | |||
@@ -442,7 +442,7 @@ void __init plat_irq_setup_pins(int mode) | |||
442 | 442 | ||
443 | switch (mode) { | 443 | switch (mode) { |
444 | case IRQ_MODE_IRQ: /* individual interrupt mode for IRL3-0 */ | 444 | case IRQ_MODE_IRQ: /* individual interrupt mode for IRL3-0 */ |
445 | ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); | 445 | __raw_writew(__raw_readw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); |
446 | register_intc_controller(&intc_desc_irlm); | 446 | register_intc_controller(&intc_desc_irlm); |
447 | break; | 447 | break; |
448 | default: | 448 | default: |
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c index 5b74cc0b43da..a16eb3656f4b 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c | |||
@@ -319,7 +319,7 @@ void __init plat_irq_setup_pins(int mode) | |||
319 | { | 319 | { |
320 | switch (mode) { | 320 | switch (mode) { |
321 | case IRQ_MODE_IRQ: | 321 | case IRQ_MODE_IRQ: |
322 | ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); | 322 | __raw_writew(__raw_readw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); |
323 | register_intc_controller(&intc_desc_irq); | 323 | register_intc_controller(&intc_desc_irq); |
324 | break; | 324 | break; |
325 | default: | 325 | default: |
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index 8a8a993f55ea..97aea9d69b00 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c | |||
@@ -43,9 +43,9 @@ static unsigned long *sq_bitmap; | |||
43 | 43 | ||
44 | #define store_queue_barrier() \ | 44 | #define store_queue_barrier() \ |
45 | do { \ | 45 | do { \ |
46 | (void)ctrl_inl(P4SEG_STORE_QUE); \ | 46 | (void)__raw_readl(P4SEG_STORE_QUE); \ |
47 | ctrl_outl(0, P4SEG_STORE_QUE + 0); \ | 47 | __raw_writel(0, P4SEG_STORE_QUE + 0); \ |
48 | ctrl_outl(0, P4SEG_STORE_QUE + 8); \ | 48 | __raw_writel(0, P4SEG_STORE_QUE + 8); \ |
49 | } while (0); | 49 | } while (0); |
50 | 50 | ||
51 | /** | 51 | /** |
@@ -123,8 +123,8 @@ static int __sq_remap(struct sq_mapping *map, unsigned long flags) | |||
123 | * straightforward, as we can just load up each queue's QACR with | 123 | * straightforward, as we can just load up each queue's QACR with |
124 | * the physical address appropriately masked. | 124 | * the physical address appropriately masked. |
125 | */ | 125 | */ |
126 | ctrl_outl(((map->addr >> 26) << 2) & 0x1c, SQ_QACR0); | 126 | __raw_writel(((map->addr >> 26) << 2) & 0x1c, SQ_QACR0); |
127 | ctrl_outl(((map->addr >> 26) << 2) & 0x1c, SQ_QACR1); | 127 | __raw_writel(((map->addr >> 26) << 2) & 0x1c, SQ_QACR1); |
128 | #endif | 128 | #endif |
129 | 129 | ||
130 | return 0; | 130 | return 0; |
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c index ddc235ca9664..86aae60677dc 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c | |||
@@ -35,7 +35,7 @@ static struct clk_ops sh7757_master_clk_ops = { | |||
35 | 35 | ||
36 | static void module_clk_recalc(struct clk *clk) | 36 | static void module_clk_recalc(struct clk *clk) |
37 | { | 37 | { |
38 | int idx = ctrl_inl(FRQCR) & 0x0000000f; | 38 | int idx = __raw_readl(FRQCR) & 0x0000000f; |
39 | clk->rate = clk->parent->rate / p1fc_divisors[idx]; | 39 | clk->rate = clk->parent->rate / p1fc_divisors[idx]; |
40 | } | 40 | } |
41 | 41 | ||
@@ -45,7 +45,7 @@ static struct clk_ops sh7757_module_clk_ops = { | |||
45 | 45 | ||
46 | static void bus_clk_recalc(struct clk *clk) | 46 | static void bus_clk_recalc(struct clk *clk) |
47 | { | 47 | { |
48 | int idx = (ctrl_inl(FRQCR) >> 8) & 0x0000000f; | 48 | int idx = (__raw_readl(FRQCR) >> 8) & 0x0000000f; |
49 | clk->rate = clk->parent->rate / bfc_divisors[idx]; | 49 | clk->rate = clk->parent->rate / bfc_divisors[idx]; |
50 | } | 50 | } |
51 | 51 | ||
@@ -55,7 +55,7 @@ static struct clk_ops sh7757_bus_clk_ops = { | |||
55 | 55 | ||
56 | static void cpu_clk_recalc(struct clk *clk) | 56 | static void cpu_clk_recalc(struct clk *clk) |
57 | { | 57 | { |
58 | int idx = (ctrl_inl(FRQCR) >> 20) & 0x0000000f; | 58 | int idx = (__raw_readl(FRQCR) >> 20) & 0x0000000f; |
59 | clk->rate = clk->parent->rate / ifc_divisors[idx]; | 59 | clk->rate = clk->parent->rate / ifc_divisors[idx]; |
60 | } | 60 | } |
61 | 61 | ||
@@ -78,7 +78,7 @@ void __init arch_init_clk_ops(struct clk_ops **ops, int idx) | |||
78 | 78 | ||
79 | static void shyway_clk_recalc(struct clk *clk) | 79 | static void shyway_clk_recalc(struct clk *clk) |
80 | { | 80 | { |
81 | int idx = (ctrl_inl(FRQCR) >> 12) & 0x0000000f; | 81 | int idx = (__raw_readl(FRQCR) >> 12) & 0x0000000f; |
82 | clk->rate = clk->parent->rate / sfc_divisors[idx]; | 82 | clk->rate = clk->parent->rate / sfc_divisors[idx]; |
83 | } | 83 | } |
84 | 84 | ||
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7763.c b/arch/sh/kernel/cpu/sh4a/clock-sh7763.c index 370cd47642ef..9f401163e71e 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7763.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7763.c | |||
@@ -22,7 +22,7 @@ static int cfc_divisors[] = { 1, 1, 4, 1, 1, 1, 1, 1 }; | |||
22 | 22 | ||
23 | static void master_clk_init(struct clk *clk) | 23 | static void master_clk_init(struct clk *clk) |
24 | { | 24 | { |
25 | clk->rate *= p0fc_divisors[(ctrl_inl(FRQCR) >> 4) & 0x07]; | 25 | clk->rate *= p0fc_divisors[(__raw_readl(FRQCR) >> 4) & 0x07]; |
26 | } | 26 | } |
27 | 27 | ||
28 | static struct clk_ops sh7763_master_clk_ops = { | 28 | static struct clk_ops sh7763_master_clk_ops = { |
@@ -31,7 +31,7 @@ static struct clk_ops sh7763_master_clk_ops = { | |||
31 | 31 | ||
32 | static unsigned long module_clk_recalc(struct clk *clk) | 32 | static unsigned long module_clk_recalc(struct clk *clk) |
33 | { | 33 | { |
34 | int idx = ((ctrl_inl(FRQCR) >> 4) & 0x07); | 34 | int idx = ((__raw_readl(FRQCR) >> 4) & 0x07); |
35 | return clk->parent->rate / p0fc_divisors[idx]; | 35 | return clk->parent->rate / p0fc_divisors[idx]; |
36 | } | 36 | } |
37 | 37 | ||
@@ -41,7 +41,7 @@ static struct clk_ops sh7763_module_clk_ops = { | |||
41 | 41 | ||
42 | static unsigned long bus_clk_recalc(struct clk *clk) | 42 | static unsigned long bus_clk_recalc(struct clk *clk) |
43 | { | 43 | { |
44 | int idx = ((ctrl_inl(FRQCR) >> 16) & 0x07); | 44 | int idx = ((__raw_readl(FRQCR) >> 16) & 0x07); |
45 | return clk->parent->rate / bfc_divisors[idx]; | 45 | return clk->parent->rate / bfc_divisors[idx]; |
46 | } | 46 | } |
47 | 47 | ||
@@ -68,7 +68,7 @@ void __init arch_init_clk_ops(struct clk_ops **ops, int idx) | |||
68 | 68 | ||
69 | static unsigned long shyway_clk_recalc(struct clk *clk) | 69 | static unsigned long shyway_clk_recalc(struct clk *clk) |
70 | { | 70 | { |
71 | int idx = ((ctrl_inl(FRQCR) >> 20) & 0x07); | 71 | int idx = ((__raw_readl(FRQCR) >> 20) & 0x07); |
72 | return clk->parent->rate / cfc_divisors[idx]; | 72 | return clk->parent->rate / cfc_divisors[idx]; |
73 | } | 73 | } |
74 | 74 | ||
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7770.c b/arch/sh/kernel/cpu/sh4a/clock-sh7770.c index e0b896769205..9e3354365d40 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7770.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7770.c | |||
@@ -21,7 +21,7 @@ static int pfc_divisors[] = { 1, 8, 1,10,12,16, 1, 1 }; | |||
21 | 21 | ||
22 | static void master_clk_init(struct clk *clk) | 22 | static void master_clk_init(struct clk *clk) |
23 | { | 23 | { |
24 | clk->rate *= pfc_divisors[(ctrl_inl(FRQCR) >> 28) & 0x000f]; | 24 | clk->rate *= pfc_divisors[(__raw_readl(FRQCR) >> 28) & 0x000f]; |
25 | } | 25 | } |
26 | 26 | ||
27 | static struct clk_ops sh7770_master_clk_ops = { | 27 | static struct clk_ops sh7770_master_clk_ops = { |
@@ -30,7 +30,7 @@ static struct clk_ops sh7770_master_clk_ops = { | |||
30 | 30 | ||
31 | static unsigned long module_clk_recalc(struct clk *clk) | 31 | static unsigned long module_clk_recalc(struct clk *clk) |
32 | { | 32 | { |
33 | int idx = ((ctrl_inl(FRQCR) >> 28) & 0x000f); | 33 | int idx = ((__raw_readl(FRQCR) >> 28) & 0x000f); |
34 | return clk->parent->rate / pfc_divisors[idx]; | 34 | return clk->parent->rate / pfc_divisors[idx]; |
35 | } | 35 | } |
36 | 36 | ||
@@ -40,7 +40,7 @@ static struct clk_ops sh7770_module_clk_ops = { | |||
40 | 40 | ||
41 | static unsigned long bus_clk_recalc(struct clk *clk) | 41 | static unsigned long bus_clk_recalc(struct clk *clk) |
42 | { | 42 | { |
43 | int idx = (ctrl_inl(FRQCR) & 0x000f); | 43 | int idx = (__raw_readl(FRQCR) & 0x000f); |
44 | return clk->parent->rate / bfc_divisors[idx]; | 44 | return clk->parent->rate / bfc_divisors[idx]; |
45 | } | 45 | } |
46 | 46 | ||
@@ -50,7 +50,7 @@ static struct clk_ops sh7770_bus_clk_ops = { | |||
50 | 50 | ||
51 | static unsigned long cpu_clk_recalc(struct clk *clk) | 51 | static unsigned long cpu_clk_recalc(struct clk *clk) |
52 | { | 52 | { |
53 | int idx = ((ctrl_inl(FRQCR) >> 24) & 0x000f); | 53 | int idx = ((__raw_readl(FRQCR) >> 24) & 0x000f); |
54 | return clk->parent->rate / ifc_divisors[idx]; | 54 | return clk->parent->rate / ifc_divisors[idx]; |
55 | } | 55 | } |
56 | 56 | ||
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7780.c b/arch/sh/kernel/cpu/sh4a/clock-sh7780.c index a249d823578e..150963a6001e 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7780.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7780.c | |||
@@ -22,7 +22,7 @@ static int cfc_divisors[] = { 1, 1, 4, 1, 6, 1, 1, 1 }; | |||
22 | 22 | ||
23 | static void master_clk_init(struct clk *clk) | 23 | static void master_clk_init(struct clk *clk) |
24 | { | 24 | { |
25 | clk->rate *= pfc_divisors[ctrl_inl(FRQCR) & 0x0003]; | 25 | clk->rate *= pfc_divisors[__raw_readl(FRQCR) & 0x0003]; |
26 | } | 26 | } |
27 | 27 | ||
28 | static struct clk_ops sh7780_master_clk_ops = { | 28 | static struct clk_ops sh7780_master_clk_ops = { |
@@ -31,7 +31,7 @@ static struct clk_ops sh7780_master_clk_ops = { | |||
31 | 31 | ||
32 | static unsigned long module_clk_recalc(struct clk *clk) | 32 | static unsigned long module_clk_recalc(struct clk *clk) |
33 | { | 33 | { |
34 | int idx = (ctrl_inl(FRQCR) & 0x0003); | 34 | int idx = (__raw_readl(FRQCR) & 0x0003); |
35 | return clk->parent->rate / pfc_divisors[idx]; | 35 | return clk->parent->rate / pfc_divisors[idx]; |
36 | } | 36 | } |
37 | 37 | ||
@@ -41,7 +41,7 @@ static struct clk_ops sh7780_module_clk_ops = { | |||
41 | 41 | ||
42 | static unsigned long bus_clk_recalc(struct clk *clk) | 42 | static unsigned long bus_clk_recalc(struct clk *clk) |
43 | { | 43 | { |
44 | int idx = ((ctrl_inl(FRQCR) >> 16) & 0x0007); | 44 | int idx = ((__raw_readl(FRQCR) >> 16) & 0x0007); |
45 | return clk->parent->rate / bfc_divisors[idx]; | 45 | return clk->parent->rate / bfc_divisors[idx]; |
46 | } | 46 | } |
47 | 47 | ||
@@ -51,7 +51,7 @@ static struct clk_ops sh7780_bus_clk_ops = { | |||
51 | 51 | ||
52 | static unsigned long cpu_clk_recalc(struct clk *clk) | 52 | static unsigned long cpu_clk_recalc(struct clk *clk) |
53 | { | 53 | { |
54 | int idx = ((ctrl_inl(FRQCR) >> 24) & 0x0001); | 54 | int idx = ((__raw_readl(FRQCR) >> 24) & 0x0001); |
55 | return clk->parent->rate / ifc_divisors[idx]; | 55 | return clk->parent->rate / ifc_divisors[idx]; |
56 | } | 56 | } |
57 | 57 | ||
@@ -74,7 +74,7 @@ void __init arch_init_clk_ops(struct clk_ops **ops, int idx) | |||
74 | 74 | ||
75 | static unsigned long shyway_clk_recalc(struct clk *clk) | 75 | static unsigned long shyway_clk_recalc(struct clk *clk) |
76 | { | 76 | { |
77 | int idx = ((ctrl_inl(FRQCR) >> 20) & 0x0007); | 77 | int idx = ((__raw_readl(FRQCR) >> 20) & 0x0007); |
78 | return clk->parent->rate / cfc_divisors[idx]; | 78 | return clk->parent->rate / cfc_divisors[idx]; |
79 | } | 79 | } |
80 | 80 | ||
diff --git a/arch/sh/kernel/cpu/sh4a/clock-shx3.c b/arch/sh/kernel/cpu/sh4a/clock-shx3.c index 23c27d32d982..e75c57bdfa5e 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-shx3.c +++ b/arch/sh/kernel/cpu/sh4a/clock-shx3.c | |||
@@ -33,7 +33,7 @@ static int cfc_divisors[] = { 1, 1, 4, 6 }; | |||
33 | 33 | ||
34 | static void master_clk_init(struct clk *clk) | 34 | static void master_clk_init(struct clk *clk) |
35 | { | 35 | { |
36 | clk->rate *= pfc_divisors[(ctrl_inl(FRQCR) >> PFC_POS) & PFC_MSK]; | 36 | clk->rate *= pfc_divisors[(__raw_readl(FRQCR) >> PFC_POS) & PFC_MSK]; |
37 | } | 37 | } |
38 | 38 | ||
39 | static struct clk_ops shx3_master_clk_ops = { | 39 | static struct clk_ops shx3_master_clk_ops = { |
@@ -42,7 +42,7 @@ static struct clk_ops shx3_master_clk_ops = { | |||
42 | 42 | ||
43 | static unsigned long module_clk_recalc(struct clk *clk) | 43 | static unsigned long module_clk_recalc(struct clk *clk) |
44 | { | 44 | { |
45 | int idx = ((ctrl_inl(FRQCR) >> PFC_POS) & PFC_MSK); | 45 | int idx = ((__raw_readl(FRQCR) >> PFC_POS) & PFC_MSK); |
46 | return clk->parent->rate / pfc_divisors[idx]; | 46 | return clk->parent->rate / pfc_divisors[idx]; |
47 | } | 47 | } |
48 | 48 | ||
@@ -52,7 +52,7 @@ static struct clk_ops shx3_module_clk_ops = { | |||
52 | 52 | ||
53 | static unsigned long bus_clk_recalc(struct clk *clk) | 53 | static unsigned long bus_clk_recalc(struct clk *clk) |
54 | { | 54 | { |
55 | int idx = ((ctrl_inl(FRQCR) >> BFC_POS) & BFC_MSK); | 55 | int idx = ((__raw_readl(FRQCR) >> BFC_POS) & BFC_MSK); |
56 | return clk->parent->rate / bfc_divisors[idx]; | 56 | return clk->parent->rate / bfc_divisors[idx]; |
57 | } | 57 | } |
58 | 58 | ||
@@ -62,7 +62,7 @@ static struct clk_ops shx3_bus_clk_ops = { | |||
62 | 62 | ||
63 | static unsigned long cpu_clk_recalc(struct clk *clk) | 63 | static unsigned long cpu_clk_recalc(struct clk *clk) |
64 | { | 64 | { |
65 | int idx = ((ctrl_inl(FRQCR) >> IFC_POS) & IFC_MSK); | 65 | int idx = ((__raw_readl(FRQCR) >> IFC_POS) & IFC_MSK); |
66 | return clk->parent->rate / ifc_divisors[idx]; | 66 | return clk->parent->rate / ifc_divisors[idx]; |
67 | } | 67 | } |
68 | 68 | ||
@@ -85,7 +85,7 @@ void __init arch_init_clk_ops(struct clk_ops **ops, int idx) | |||
85 | 85 | ||
86 | static unsigned long shyway_clk_recalc(struct clk *clk) | 86 | static unsigned long shyway_clk_recalc(struct clk *clk) |
87 | { | 87 | { |
88 | int idx = ((ctrl_inl(FRQCR) >> CFC_POS) & CFC_MSK); | 88 | int idx = ((__raw_readl(FRQCR) >> CFC_POS) & CFC_MSK); |
89 | return clk->parent->rate / cfc_divisors[idx]; | 89 | return clk->parent->rate / cfc_divisors[idx]; |
90 | } | 90 | } |
91 | 91 | ||
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 9d426258aa00..9e8620e3ad3e 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c | |||
@@ -596,7 +596,7 @@ void __init plat_early_device_setup(void) | |||
596 | void l2_cache_init(void) | 596 | void l2_cache_init(void) |
597 | { | 597 | { |
598 | /* Enable L2 cache */ | 598 | /* Enable L2 cache */ |
599 | ctrl_outl(L2_CACHE_ENABLE, RAMCR); | 599 | __raw_writel(L2_CACHE_ENABLE, RAMCR); |
600 | } | 600 | } |
601 | 601 | ||
602 | enum { | 602 | enum { |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index 578e9f80271f..aa0f6e9bb89e 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c | |||
@@ -718,7 +718,7 @@ void __init plat_early_device_setup(void) | |||
718 | void l2_cache_init(void) | 718 | void l2_cache_init(void) |
719 | { | 719 | { |
720 | /* Enable L2 cache */ | 720 | /* Enable L2 cache */ |
721 | ctrl_outl(L2_CACHE_ENABLE, RAMCR); | 721 | __raw_writel(L2_CACHE_ENABLE, RAMCR); |
722 | } | 722 | } |
723 | 723 | ||
724 | enum { | 724 | enum { |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c index 37e32efbbaa7..e75edf58796a 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c | |||
@@ -487,17 +487,17 @@ static DECLARE_INTC_DESC(intc_desc_irl4567, "sh7757-irl4567", vectors_irl4567, | |||
487 | void __init plat_irq_setup(void) | 487 | void __init plat_irq_setup(void) |
488 | { | 488 | { |
489 | /* disable IRQ3-0 + IRQ7-4 */ | 489 | /* disable IRQ3-0 + IRQ7-4 */ |
490 | ctrl_outl(0xff000000, INTC_INTMSK0); | 490 | __raw_writel(0xff000000, INTC_INTMSK0); |
491 | 491 | ||
492 | /* disable IRL3-0 + IRL7-4 */ | 492 | /* disable IRL3-0 + IRL7-4 */ |
493 | ctrl_outl(0xc0000000, INTC_INTMSK1); | 493 | __raw_writel(0xc0000000, INTC_INTMSK1); |
494 | ctrl_outl(0xfffefffe, INTC_INTMSK2); | 494 | __raw_writel(0xfffefffe, INTC_INTMSK2); |
495 | 495 | ||
496 | /* select IRL mode for IRL3-0 + IRL7-4 */ | 496 | /* select IRL mode for IRL3-0 + IRL7-4 */ |
497 | ctrl_outl(ctrl_inl(INTC_ICR0) & ~0x00c00000, INTC_ICR0); | 497 | __raw_writel(__raw_readl(INTC_ICR0) & ~0x00c00000, INTC_ICR0); |
498 | 498 | ||
499 | /* disable holding function, ie enable "SH-4 Mode" */ | 499 | /* disable holding function, ie enable "SH-4 Mode" */ |
500 | ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00200000, INTC_ICR0); | 500 | __raw_writel(__raw_readl(INTC_ICR0) | 0x00200000, INTC_ICR0); |
501 | 501 | ||
502 | register_intc_controller(&intc_desc); | 502 | register_intc_controller(&intc_desc); |
503 | } | 503 | } |
@@ -507,32 +507,32 @@ void __init plat_irq_setup_pins(int mode) | |||
507 | switch (mode) { | 507 | switch (mode) { |
508 | case IRQ_MODE_IRQ7654: | 508 | case IRQ_MODE_IRQ7654: |
509 | /* select IRQ mode for IRL7-4 */ | 509 | /* select IRQ mode for IRL7-4 */ |
510 | ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00400000, INTC_ICR0); | 510 | __raw_writel(__raw_readl(INTC_ICR0) | 0x00400000, INTC_ICR0); |
511 | register_intc_controller(&intc_desc_irq4567); | 511 | register_intc_controller(&intc_desc_irq4567); |
512 | break; | 512 | break; |
513 | case IRQ_MODE_IRQ3210: | 513 | case IRQ_MODE_IRQ3210: |
514 | /* select IRQ mode for IRL3-0 */ | 514 | /* select IRQ mode for IRL3-0 */ |
515 | ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00800000, INTC_ICR0); | 515 | __raw_writel(__raw_readl(INTC_ICR0) | 0x00800000, INTC_ICR0); |
516 | register_intc_controller(&intc_desc_irq0123); | 516 | register_intc_controller(&intc_desc_irq0123); |
517 | break; | 517 | break; |
518 | case IRQ_MODE_IRL7654: | 518 | case IRQ_MODE_IRL7654: |
519 | /* enable IRL7-4 but don't provide any masking */ | 519 | /* enable IRL7-4 but don't provide any masking */ |
520 | ctrl_outl(0x40000000, INTC_INTMSKCLR1); | 520 | __raw_writel(0x40000000, INTC_INTMSKCLR1); |
521 | ctrl_outl(0x0000fffe, INTC_INTMSKCLR2); | 521 | __raw_writel(0x0000fffe, INTC_INTMSKCLR2); |
522 | break; | 522 | break; |
523 | case IRQ_MODE_IRL3210: | 523 | case IRQ_MODE_IRL3210: |
524 | /* enable IRL0-3 but don't provide any masking */ | 524 | /* enable IRL0-3 but don't provide any masking */ |
525 | ctrl_outl(0x80000000, INTC_INTMSKCLR1); | 525 | __raw_writel(0x80000000, INTC_INTMSKCLR1); |
526 | ctrl_outl(0xfffe0000, INTC_INTMSKCLR2); | 526 | __raw_writel(0xfffe0000, INTC_INTMSKCLR2); |
527 | break; | 527 | break; |
528 | case IRQ_MODE_IRL7654_MASK: | 528 | case IRQ_MODE_IRL7654_MASK: |
529 | /* enable IRL7-4 and mask using cpu intc controller */ | 529 | /* enable IRL7-4 and mask using cpu intc controller */ |
530 | ctrl_outl(0x40000000, INTC_INTMSKCLR1); | 530 | __raw_writel(0x40000000, INTC_INTMSKCLR1); |
531 | register_intc_controller(&intc_desc_irl4567); | 531 | register_intc_controller(&intc_desc_irl4567); |
532 | break; | 532 | break; |
533 | case IRQ_MODE_IRL3210_MASK: | 533 | case IRQ_MODE_IRL3210_MASK: |
534 | /* enable IRL0-3 and mask using cpu intc controller */ | 534 | /* enable IRL0-3 and mask using cpu intc controller */ |
535 | ctrl_outl(0x80000000, INTC_INTMSKCLR1); | 535 | __raw_writel(0x80000000, INTC_INTMSKCLR1); |
536 | register_intc_controller(&intc_desc_irl0123); | 536 | register_intc_controller(&intc_desc_irl0123); |
537 | break; | 537 | break; |
538 | default: | 538 | default: |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c index 6aba26fec416..7f6b0a5f7f82 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c | |||
@@ -538,11 +538,11 @@ static DECLARE_INTC_DESC(intc_irl3210_desc, "sh7763-irl3210", irl_vectors, | |||
538 | void __init plat_irq_setup(void) | 538 | void __init plat_irq_setup(void) |
539 | { | 539 | { |
540 | /* disable IRQ7-0 */ | 540 | /* disable IRQ7-0 */ |
541 | ctrl_outl(0xff000000, INTC_INTMSK0); | 541 | __raw_writel(0xff000000, INTC_INTMSK0); |
542 | 542 | ||
543 | /* disable IRL3-0 + IRL7-4 */ | 543 | /* disable IRL3-0 + IRL7-4 */ |
544 | ctrl_outl(0xc0000000, INTC_INTMSK1); | 544 | __raw_writel(0xc0000000, INTC_INTMSK1); |
545 | ctrl_outl(0xfffefffe, INTC_INTMSK2); | 545 | __raw_writel(0xfffefffe, INTC_INTMSK2); |
546 | 546 | ||
547 | register_intc_controller(&intc_desc); | 547 | register_intc_controller(&intc_desc); |
548 | } | 548 | } |
@@ -552,27 +552,27 @@ void __init plat_irq_setup_pins(int mode) | |||
552 | switch (mode) { | 552 | switch (mode) { |
553 | case IRQ_MODE_IRQ: | 553 | case IRQ_MODE_IRQ: |
554 | /* select IRQ mode for IRL3-0 + IRL7-4 */ | 554 | /* select IRQ mode for IRL3-0 + IRL7-4 */ |
555 | ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00c00000, INTC_ICR0); | 555 | __raw_writel(__raw_readl(INTC_ICR0) | 0x00c00000, INTC_ICR0); |
556 | register_intc_controller(&intc_irq_desc); | 556 | register_intc_controller(&intc_irq_desc); |
557 | break; | 557 | break; |
558 | case IRQ_MODE_IRL7654: | 558 | case IRQ_MODE_IRL7654: |
559 | /* enable IRL7-4 but don't provide any masking */ | 559 | /* enable IRL7-4 but don't provide any masking */ |
560 | ctrl_outl(0x40000000, INTC_INTMSKCLR1); | 560 | __raw_writel(0x40000000, INTC_INTMSKCLR1); |
561 | ctrl_outl(0x0000fffe, INTC_INTMSKCLR2); | 561 | __raw_writel(0x0000fffe, INTC_INTMSKCLR2); |
562 | break; | 562 | break; |
563 | case IRQ_MODE_IRL3210: | 563 | case IRQ_MODE_IRL3210: |
564 | /* enable IRL0-3 but don't provide any masking */ | 564 | /* enable IRL0-3 but don't provide any masking */ |
565 | ctrl_outl(0x80000000, INTC_INTMSKCLR1); | 565 | __raw_writel(0x80000000, INTC_INTMSKCLR1); |
566 | ctrl_outl(0xfffe0000, INTC_INTMSKCLR2); | 566 | __raw_writel(0xfffe0000, INTC_INTMSKCLR2); |
567 | break; | 567 | break; |
568 | case IRQ_MODE_IRL7654_MASK: | 568 | case IRQ_MODE_IRL7654_MASK: |
569 | /* enable IRL7-4 and mask using cpu intc controller */ | 569 | /* enable IRL7-4 and mask using cpu intc controller */ |
570 | ctrl_outl(0x40000000, INTC_INTMSKCLR1); | 570 | __raw_writel(0x40000000, INTC_INTMSKCLR1); |
571 | register_intc_controller(&intc_irl7654_desc); | 571 | register_intc_controller(&intc_irl7654_desc); |
572 | break; | 572 | break; |
573 | case IRQ_MODE_IRL3210_MASK: | 573 | case IRQ_MODE_IRL3210_MASK: |
574 | /* enable IRL0-3 and mask using cpu intc controller */ | 574 | /* enable IRL0-3 and mask using cpu intc controller */ |
575 | ctrl_outl(0x80000000, INTC_INTMSKCLR1); | 575 | __raw_writel(0x80000000, INTC_INTMSKCLR1); |
576 | register_intc_controller(&intc_irl3210_desc); | 576 | register_intc_controller(&intc_irl3210_desc); |
577 | break; | 577 | break; |
578 | default: | 578 | default: |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c index c1643bc9590d..86d681ecf90e 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c | |||
@@ -694,17 +694,17 @@ static DECLARE_INTC_DESC(intc_irl3210_desc, "sh7780-irl3210", irl_vectors, | |||
694 | void __init plat_irq_setup(void) | 694 | void __init plat_irq_setup(void) |
695 | { | 695 | { |
696 | /* disable IRQ7-0 */ | 696 | /* disable IRQ7-0 */ |
697 | ctrl_outl(0xff000000, INTC_INTMSK0); | 697 | __raw_writel(0xff000000, INTC_INTMSK0); |
698 | 698 | ||
699 | /* disable IRL3-0 + IRL7-4 */ | 699 | /* disable IRL3-0 + IRL7-4 */ |
700 | ctrl_outl(0xc0000000, INTC_INTMSK1); | 700 | __raw_writel(0xc0000000, INTC_INTMSK1); |
701 | ctrl_outl(0xfffefffe, INTC_INTMSK2); | 701 | __raw_writel(0xfffefffe, INTC_INTMSK2); |
702 | 702 | ||
703 | /* select IRL mode for IRL3-0 + IRL7-4 */ | 703 | /* select IRL mode for IRL3-0 + IRL7-4 */ |
704 | ctrl_outl(ctrl_inl(INTC_ICR0) & ~0x00c00000, INTC_ICR0); | 704 | __raw_writel(__raw_readl(INTC_ICR0) & ~0x00c00000, INTC_ICR0); |
705 | 705 | ||
706 | /* disable holding function, ie enable "SH-4 Mode" */ | 706 | /* disable holding function, ie enable "SH-4 Mode" */ |
707 | ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00200000, INTC_ICR0); | 707 | __raw_writel(__raw_readl(INTC_ICR0) | 0x00200000, INTC_ICR0); |
708 | 708 | ||
709 | register_intc_controller(&intc_desc); | 709 | register_intc_controller(&intc_desc); |
710 | } | 710 | } |
@@ -714,27 +714,27 @@ void __init plat_irq_setup_pins(int mode) | |||
714 | switch (mode) { | 714 | switch (mode) { |
715 | case IRQ_MODE_IRQ: | 715 | case IRQ_MODE_IRQ: |
716 | /* select IRQ mode for IRL3-0 + IRL7-4 */ | 716 | /* select IRQ mode for IRL3-0 + IRL7-4 */ |
717 | ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00c00000, INTC_ICR0); | 717 | __raw_writel(__raw_readl(INTC_ICR0) | 0x00c00000, INTC_ICR0); |
718 | register_intc_controller(&intc_irq_desc); | 718 | register_intc_controller(&intc_irq_desc); |
719 | break; | 719 | break; |
720 | case IRQ_MODE_IRL7654: | 720 | case IRQ_MODE_IRL7654: |
721 | /* enable IRL7-4 but don't provide any masking */ | 721 | /* enable IRL7-4 but don't provide any masking */ |
722 | ctrl_outl(0x40000000, INTC_INTMSKCLR1); | 722 | __raw_writel(0x40000000, INTC_INTMSKCLR1); |
723 | ctrl_outl(0x0000fffe, INTC_INTMSKCLR2); | 723 | __raw_writel(0x0000fffe, INTC_INTMSKCLR2); |
724 | break; | 724 | break; |
725 | case IRQ_MODE_IRL3210: | 725 | case IRQ_MODE_IRL3210: |
726 | /* enable IRL0-3 but don't provide any masking */ | 726 | /* enable IRL0-3 but don't provide any masking */ |
727 | ctrl_outl(0x80000000, INTC_INTMSKCLR1); | 727 | __raw_writel(0x80000000, INTC_INTMSKCLR1); |
728 | ctrl_outl(0xfffe0000, INTC_INTMSKCLR2); | 728 | __raw_writel(0xfffe0000, INTC_INTMSKCLR2); |
729 | break; | 729 | break; |
730 | case IRQ_MODE_IRL7654_MASK: | 730 | case IRQ_MODE_IRL7654_MASK: |
731 | /* enable IRL7-4 and mask using cpu intc controller */ | 731 | /* enable IRL7-4 and mask using cpu intc controller */ |
732 | ctrl_outl(0x40000000, INTC_INTMSKCLR1); | 732 | __raw_writel(0x40000000, INTC_INTMSKCLR1); |
733 | register_intc_controller(&intc_irl7654_desc); | 733 | register_intc_controller(&intc_irl7654_desc); |
734 | break; | 734 | break; |
735 | case IRQ_MODE_IRL3210_MASK: | 735 | case IRQ_MODE_IRL3210_MASK: |
736 | /* enable IRL0-3 and mask using cpu intc controller */ | 736 | /* enable IRL0-3 and mask using cpu intc controller */ |
737 | ctrl_outl(0x80000000, INTC_INTMSKCLR1); | 737 | __raw_writel(0x80000000, INTC_INTMSKCLR1); |
738 | register_intc_controller(&intc_irl3210_desc); | 738 | register_intc_controller(&intc_irl3210_desc); |
739 | break; | 739 | break; |
740 | default: | 740 | default: |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c index c310558490d5..f8f21618d785 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c | |||
@@ -461,17 +461,17 @@ static DECLARE_INTC_DESC(intc_irl3210_desc, "sh7780-irl3210", irl_vectors, | |||
461 | void __init plat_irq_setup(void) | 461 | void __init plat_irq_setup(void) |
462 | { | 462 | { |
463 | /* disable IRQ7-0 */ | 463 | /* disable IRQ7-0 */ |
464 | ctrl_outl(0xff000000, INTC_INTMSK0); | 464 | __raw_writel(0xff000000, INTC_INTMSK0); |
465 | 465 | ||
466 | /* disable IRL3-0 + IRL7-4 */ | 466 | /* disable IRL3-0 + IRL7-4 */ |
467 | ctrl_outl(0xc0000000, INTC_INTMSK1); | 467 | __raw_writel(0xc0000000, INTC_INTMSK1); |
468 | ctrl_outl(0xfffefffe, INTC_INTMSK2); | 468 | __raw_writel(0xfffefffe, INTC_INTMSK2); |
469 | 469 | ||
470 | /* select IRL mode for IRL3-0 + IRL7-4 */ | 470 | /* select IRL mode for IRL3-0 + IRL7-4 */ |
471 | ctrl_outl(ctrl_inl(INTC_ICR0) & ~0x00c00000, INTC_ICR0); | 471 | __raw_writel(__raw_readl(INTC_ICR0) & ~0x00c00000, INTC_ICR0); |
472 | 472 | ||
473 | /* disable holding function, ie enable "SH-4 Mode" */ | 473 | /* disable holding function, ie enable "SH-4 Mode" */ |
474 | ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00200000, INTC_ICR0); | 474 | __raw_writel(__raw_readl(INTC_ICR0) | 0x00200000, INTC_ICR0); |
475 | 475 | ||
476 | register_intc_controller(&intc_desc); | 476 | register_intc_controller(&intc_desc); |
477 | } | 477 | } |
@@ -481,27 +481,27 @@ void __init plat_irq_setup_pins(int mode) | |||
481 | switch (mode) { | 481 | switch (mode) { |
482 | case IRQ_MODE_IRQ: | 482 | case IRQ_MODE_IRQ: |
483 | /* select IRQ mode for IRL3-0 + IRL7-4 */ | 483 | /* select IRQ mode for IRL3-0 + IRL7-4 */ |
484 | ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00c00000, INTC_ICR0); | 484 | __raw_writel(__raw_readl(INTC_ICR0) | 0x00c00000, INTC_ICR0); |
485 | register_intc_controller(&intc_irq_desc); | 485 | register_intc_controller(&intc_irq_desc); |
486 | break; | 486 | break; |
487 | case IRQ_MODE_IRL7654: | 487 | case IRQ_MODE_IRL7654: |
488 | /* enable IRL7-4 but don't provide any masking */ | 488 | /* enable IRL7-4 but don't provide any masking */ |
489 | ctrl_outl(0x40000000, INTC_INTMSKCLR1); | 489 | __raw_writel(0x40000000, INTC_INTMSKCLR1); |
490 | ctrl_outl(0x0000fffe, INTC_INTMSKCLR2); | 490 | __raw_writel(0x0000fffe, INTC_INTMSKCLR2); |
491 | break; | 491 | break; |
492 | case IRQ_MODE_IRL3210: | 492 | case IRQ_MODE_IRL3210: |
493 | /* enable IRL0-3 but don't provide any masking */ | 493 | /* enable IRL0-3 but don't provide any masking */ |
494 | ctrl_outl(0x80000000, INTC_INTMSKCLR1); | 494 | __raw_writel(0x80000000, INTC_INTMSKCLR1); |
495 | ctrl_outl(0xfffe0000, INTC_INTMSKCLR2); | 495 | __raw_writel(0xfffe0000, INTC_INTMSKCLR2); |
496 | break; | 496 | break; |
497 | case IRQ_MODE_IRL7654_MASK: | 497 | case IRQ_MODE_IRL7654_MASK: |
498 | /* enable IRL7-4 and mask using cpu intc controller */ | 498 | /* enable IRL7-4 and mask using cpu intc controller */ |
499 | ctrl_outl(0x40000000, INTC_INTMSKCLR1); | 499 | __raw_writel(0x40000000, INTC_INTMSKCLR1); |
500 | register_intc_controller(&intc_irl7654_desc); | 500 | register_intc_controller(&intc_irl7654_desc); |
501 | break; | 501 | break; |
502 | case IRQ_MODE_IRL3210_MASK: | 502 | case IRQ_MODE_IRL3210_MASK: |
503 | /* enable IRL0-3 and mask using cpu intc controller */ | 503 | /* enable IRL0-3 and mask using cpu intc controller */ |
504 | ctrl_outl(0x80000000, INTC_INTMSKCLR1); | 504 | __raw_writel(0x80000000, INTC_INTMSKCLR1); |
505 | register_intc_controller(&intc_irl3210_desc); | 505 | register_intc_controller(&intc_irl3210_desc); |
506 | break; | 506 | break; |
507 | default: | 507 | default: |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c index f685b9b21999..23448d8c6711 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c | |||
@@ -541,17 +541,17 @@ static DECLARE_INTC_DESC(intc_desc_irl4567, "sh7785-irl4567", vectors_irl4567, | |||
541 | void __init plat_irq_setup(void) | 541 | void __init plat_irq_setup(void) |
542 | { | 542 | { |
543 | /* disable IRQ3-0 + IRQ7-4 */ | 543 | /* disable IRQ3-0 + IRQ7-4 */ |
544 | ctrl_outl(0xff000000, INTC_INTMSK0); | 544 | __raw_writel(0xff000000, INTC_INTMSK0); |
545 | 545 | ||
546 | /* disable IRL3-0 + IRL7-4 */ | 546 | /* disable IRL3-0 + IRL7-4 */ |
547 | ctrl_outl(0xc0000000, INTC_INTMSK1); | 547 | __raw_writel(0xc0000000, INTC_INTMSK1); |
548 | ctrl_outl(0xfffefffe, INTC_INTMSK2); | 548 | __raw_writel(0xfffefffe, INTC_INTMSK2); |
549 | 549 | ||
550 | /* select IRL mode for IRL3-0 + IRL7-4 */ | 550 | /* select IRL mode for IRL3-0 + IRL7-4 */ |
551 | ctrl_outl(ctrl_inl(INTC_ICR0) & ~0x00c00000, INTC_ICR0); | 551 | __raw_writel(__raw_readl(INTC_ICR0) & ~0x00c00000, INTC_ICR0); |
552 | 552 | ||
553 | /* disable holding function, ie enable "SH-4 Mode" */ | 553 | /* disable holding function, ie enable "SH-4 Mode" */ |
554 | ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00200000, INTC_ICR0); | 554 | __raw_writel(__raw_readl(INTC_ICR0) | 0x00200000, INTC_ICR0); |
555 | 555 | ||
556 | register_intc_controller(&intc_desc); | 556 | register_intc_controller(&intc_desc); |
557 | } | 557 | } |
@@ -561,32 +561,32 @@ void __init plat_irq_setup_pins(int mode) | |||
561 | switch (mode) { | 561 | switch (mode) { |
562 | case IRQ_MODE_IRQ7654: | 562 | case IRQ_MODE_IRQ7654: |
563 | /* select IRQ mode for IRL7-4 */ | 563 | /* select IRQ mode for IRL7-4 */ |
564 | ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00400000, INTC_ICR0); | 564 | __raw_writel(__raw_readl(INTC_ICR0) | 0x00400000, INTC_ICR0); |
565 | register_intc_controller(&intc_desc_irq4567); | 565 | register_intc_controller(&intc_desc_irq4567); |
566 | break; | 566 | break; |
567 | case IRQ_MODE_IRQ3210: | 567 | case IRQ_MODE_IRQ3210: |
568 | /* select IRQ mode for IRL3-0 */ | 568 | /* select IRQ mode for IRL3-0 */ |
569 | ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00800000, INTC_ICR0); | 569 | __raw_writel(__raw_readl(INTC_ICR0) | 0x00800000, INTC_ICR0); |
570 | register_intc_controller(&intc_desc_irq0123); | 570 | register_intc_controller(&intc_desc_irq0123); |
571 | break; | 571 | break; |
572 | case IRQ_MODE_IRL7654: | 572 | case IRQ_MODE_IRL7654: |
573 | /* enable IRL7-4 but don't provide any masking */ | 573 | /* enable IRL7-4 but don't provide any masking */ |
574 | ctrl_outl(0x40000000, INTC_INTMSKCLR1); | 574 | __raw_writel(0x40000000, INTC_INTMSKCLR1); |
575 | ctrl_outl(0x0000fffe, INTC_INTMSKCLR2); | 575 | __raw_writel(0x0000fffe, INTC_INTMSKCLR2); |
576 | break; | 576 | break; |
577 | case IRQ_MODE_IRL3210: | 577 | case IRQ_MODE_IRL3210: |
578 | /* enable IRL0-3 but don't provide any masking */ | 578 | /* enable IRL0-3 but don't provide any masking */ |
579 | ctrl_outl(0x80000000, INTC_INTMSKCLR1); | 579 | __raw_writel(0x80000000, INTC_INTMSKCLR1); |
580 | ctrl_outl(0xfffe0000, INTC_INTMSKCLR2); | 580 | __raw_writel(0xfffe0000, INTC_INTMSKCLR2); |
581 | break; | 581 | break; |
582 | case IRQ_MODE_IRL7654_MASK: | 582 | case IRQ_MODE_IRL7654_MASK: |
583 | /* enable IRL7-4 and mask using cpu intc controller */ | 583 | /* enable IRL7-4 and mask using cpu intc controller */ |
584 | ctrl_outl(0x40000000, INTC_INTMSKCLR1); | 584 | __raw_writel(0x40000000, INTC_INTMSKCLR1); |
585 | register_intc_controller(&intc_desc_irl4567); | 585 | register_intc_controller(&intc_desc_irl4567); |
586 | break; | 586 | break; |
587 | case IRQ_MODE_IRL3210_MASK: | 587 | case IRQ_MODE_IRL3210_MASK: |
588 | /* enable IRL0-3 and mask using cpu intc controller */ | 588 | /* enable IRL0-3 and mask using cpu intc controller */ |
589 | ctrl_outl(0x80000000, INTC_INTMSKCLR1); | 589 | __raw_writel(0x80000000, INTC_INTMSKCLR1); |
590 | register_intc_controller(&intc_desc_irl0123); | 590 | register_intc_controller(&intc_desc_irl0123); |
591 | break; | 591 | break; |
592 | default: | 592 | default: |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c index 71673487ace0..7e585320710a 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c | |||
@@ -867,14 +867,14 @@ static DECLARE_INTC_DESC(intc_desc_irl4567, "sh7786-irl4567", vectors_irl4567, | |||
867 | void __init plat_irq_setup(void) | 867 | void __init plat_irq_setup(void) |
868 | { | 868 | { |
869 | /* disable IRQ3-0 + IRQ7-4 */ | 869 | /* disable IRQ3-0 + IRQ7-4 */ |
870 | ctrl_outl(0xff000000, INTC_INTMSK0); | 870 | __raw_writel(0xff000000, INTC_INTMSK0); |
871 | 871 | ||
872 | /* disable IRL3-0 + IRL7-4 */ | 872 | /* disable IRL3-0 + IRL7-4 */ |
873 | ctrl_outl(0xc0000000, INTC_INTMSK1); | 873 | __raw_writel(0xc0000000, INTC_INTMSK1); |
874 | ctrl_outl(0xfffefffe, INTC_INTMSK2); | 874 | __raw_writel(0xfffefffe, INTC_INTMSK2); |
875 | 875 | ||
876 | /* select IRL mode for IRL3-0 + IRL7-4 */ | 876 | /* select IRL mode for IRL3-0 + IRL7-4 */ |
877 | ctrl_outl(ctrl_inl(INTC_ICR0) & ~0x00c00000, INTC_ICR0); | 877 | __raw_writel(__raw_readl(INTC_ICR0) & ~0x00c00000, INTC_ICR0); |
878 | 878 | ||
879 | register_intc_controller(&intc_desc); | 879 | register_intc_controller(&intc_desc); |
880 | } | 880 | } |
@@ -884,32 +884,32 @@ void __init plat_irq_setup_pins(int mode) | |||
884 | switch (mode) { | 884 | switch (mode) { |
885 | case IRQ_MODE_IRQ7654: | 885 | case IRQ_MODE_IRQ7654: |
886 | /* select IRQ mode for IRL7-4 */ | 886 | /* select IRQ mode for IRL7-4 */ |
887 | ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00400000, INTC_ICR0); | 887 | __raw_writel(__raw_readl(INTC_ICR0) | 0x00400000, INTC_ICR0); |
888 | register_intc_controller(&intc_desc_irq4567); | 888 | register_intc_controller(&intc_desc_irq4567); |
889 | break; | 889 | break; |
890 | case IRQ_MODE_IRQ3210: | 890 | case IRQ_MODE_IRQ3210: |
891 | /* select IRQ mode for IRL3-0 */ | 891 | /* select IRQ mode for IRL3-0 */ |
892 | ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00800000, INTC_ICR0); | 892 | __raw_writel(__raw_readl(INTC_ICR0) | 0x00800000, INTC_ICR0); |
893 | register_intc_controller(&intc_desc_irq0123); | 893 | register_intc_controller(&intc_desc_irq0123); |
894 | break; | 894 | break; |
895 | case IRQ_MODE_IRL7654: | 895 | case IRQ_MODE_IRL7654: |
896 | /* enable IRL7-4 but don't provide any masking */ | 896 | /* enable IRL7-4 but don't provide any masking */ |
897 | ctrl_outl(0x40000000, INTC_INTMSKCLR1); | 897 | __raw_writel(0x40000000, INTC_INTMSKCLR1); |
898 | ctrl_outl(0x0000fffe, INTC_INTMSKCLR2); | 898 | __raw_writel(0x0000fffe, INTC_INTMSKCLR2); |
899 | break; | 899 | break; |
900 | case IRQ_MODE_IRL3210: | 900 | case IRQ_MODE_IRL3210: |
901 | /* enable IRL0-3 but don't provide any masking */ | 901 | /* enable IRL0-3 but don't provide any masking */ |
902 | ctrl_outl(0x80000000, INTC_INTMSKCLR1); | 902 | __raw_writel(0x80000000, INTC_INTMSKCLR1); |
903 | ctrl_outl(0xfffe0000, INTC_INTMSKCLR2); | 903 | __raw_writel(0xfffe0000, INTC_INTMSKCLR2); |
904 | break; | 904 | break; |
905 | case IRQ_MODE_IRL7654_MASK: | 905 | case IRQ_MODE_IRL7654_MASK: |
906 | /* enable IRL7-4 and mask using cpu intc controller */ | 906 | /* enable IRL7-4 and mask using cpu intc controller */ |
907 | ctrl_outl(0x40000000, INTC_INTMSKCLR1); | 907 | __raw_writel(0x40000000, INTC_INTMSKCLR1); |
908 | register_intc_controller(&intc_desc_irl4567); | 908 | register_intc_controller(&intc_desc_irl4567); |
909 | break; | 909 | break; |
910 | case IRQ_MODE_IRL3210_MASK: | 910 | case IRQ_MODE_IRL3210_MASK: |
911 | /* enable IRL0-3 and mask using cpu intc controller */ | 911 | /* enable IRL0-3 and mask using cpu intc controller */ |
912 | ctrl_outl(0x80000000, INTC_INTMSKCLR1); | 912 | __raw_writel(0x80000000, INTC_INTMSKCLR1); |
913 | register_intc_controller(&intc_desc_irl0123); | 913 | register_intc_controller(&intc_desc_irl0123); |
914 | break; | 914 | break; |
915 | default: | 915 | default: |
diff --git a/arch/sh/kernel/cpu/sh5/clock-sh5.c b/arch/sh/kernel/cpu/sh5/clock-sh5.c index 7f864ebc51d3..9cfc19b8dbe4 100644 --- a/arch/sh/kernel/cpu/sh5/clock-sh5.c +++ b/arch/sh/kernel/cpu/sh5/clock-sh5.c | |||
@@ -24,7 +24,7 @@ static unsigned long cprc_base; | |||
24 | 24 | ||
25 | static void master_clk_init(struct clk *clk) | 25 | static void master_clk_init(struct clk *clk) |
26 | { | 26 | { |
27 | int idx = (ctrl_inl(cprc_base + 0x00) >> 6) & 0x0007; | 27 | int idx = (__raw_readl(cprc_base + 0x00) >> 6) & 0x0007; |
28 | clk->rate *= ifc_table[idx]; | 28 | clk->rate *= ifc_table[idx]; |
29 | } | 29 | } |
30 | 30 | ||
@@ -34,7 +34,7 @@ static struct clk_ops sh5_master_clk_ops = { | |||
34 | 34 | ||
35 | static unsigned long module_clk_recalc(struct clk *clk) | 35 | static unsigned long module_clk_recalc(struct clk *clk) |
36 | { | 36 | { |
37 | int idx = (ctrl_inw(cprc_base) >> 12) & 0x0007; | 37 | int idx = (__raw_readw(cprc_base) >> 12) & 0x0007; |
38 | return clk->parent->rate / ifc_table[idx]; | 38 | return clk->parent->rate / ifc_table[idx]; |
39 | } | 39 | } |
40 | 40 | ||
@@ -44,7 +44,7 @@ static struct clk_ops sh5_module_clk_ops = { | |||
44 | 44 | ||
45 | static unsigned long bus_clk_recalc(struct clk *clk) | 45 | static unsigned long bus_clk_recalc(struct clk *clk) |
46 | { | 46 | { |
47 | int idx = (ctrl_inw(cprc_base) >> 3) & 0x0007; | 47 | int idx = (__raw_readw(cprc_base) >> 3) & 0x0007; |
48 | return clk->parent->rate / ifc_table[idx]; | 48 | return clk->parent->rate / ifc_table[idx]; |
49 | } | 49 | } |
50 | 50 | ||
@@ -54,7 +54,7 @@ static struct clk_ops sh5_bus_clk_ops = { | |||
54 | 54 | ||
55 | static unsigned long cpu_clk_recalc(struct clk *clk) | 55 | static unsigned long cpu_clk_recalc(struct clk *clk) |
56 | { | 56 | { |
57 | int idx = (ctrl_inw(cprc_base) & 0x0007); | 57 | int idx = (__raw_readw(cprc_base) & 0x0007); |
58 | return clk->parent->rate / ifc_table[idx]; | 58 | return clk->parent->rate / ifc_table[idx]; |
59 | } | 59 | } |
60 | 60 | ||