aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-10-01 02:19:10 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-10-01 02:19:10 -0400
commit62429e03644833693e6f94afe537f252e2d3b475 (patch)
treed2c3c3139fb7d2e86480ab3f55c7b976d4becf16 /arch
parent64c9627c2628bc3bd3291710b8ee6f8335883f8b (diff)
sh: Use __raw_xxx() I/O accessors for INTC and IPR.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/kernel/cpu/irq/intc.c24
-rw-r--r--arch/sh/kernel/cpu/irq/ipr.c4
2 files changed, 14 insertions, 14 deletions
diff --git a/arch/sh/kernel/cpu/irq/intc.c b/arch/sh/kernel/cpu/irq/intc.c
index 94536d358fe1..138efa4e95db 100644
--- a/arch/sh/kernel/cpu/irq/intc.c
+++ b/arch/sh/kernel/cpu/irq/intc.c
@@ -86,24 +86,24 @@ static inline unsigned int set_field(unsigned int value,
86 86
87static void write_8(unsigned long addr, unsigned long h, unsigned long data) 87static void write_8(unsigned long addr, unsigned long h, unsigned long data)
88{ 88{
89 ctrl_outb(set_field(0, data, h), addr); 89 __raw_writeb(set_field(0, data, h), addr);
90} 90}
91 91
92static void write_16(unsigned long addr, unsigned long h, unsigned long data) 92static void write_16(unsigned long addr, unsigned long h, unsigned long data)
93{ 93{
94 ctrl_outw(set_field(0, data, h), addr); 94 __raw_writew(set_field(0, data, h), addr);
95} 95}
96 96
97static void write_32(unsigned long addr, unsigned long h, unsigned long data) 97static void write_32(unsigned long addr, unsigned long h, unsigned long data)
98{ 98{
99 ctrl_outl(set_field(0, data, h), addr); 99 __raw_writel(set_field(0, data, h), addr);
100} 100}
101 101
102static void modify_8(unsigned long addr, unsigned long h, unsigned long data) 102static void modify_8(unsigned long addr, unsigned long h, unsigned long data)
103{ 103{
104 unsigned long flags; 104 unsigned long flags;
105 local_irq_save(flags); 105 local_irq_save(flags);
106 ctrl_outb(set_field(ctrl_inb(addr), data, h), addr); 106 __raw_writeb(set_field(__raw_readb(addr), data, h), addr);
107 local_irq_restore(flags); 107 local_irq_restore(flags);
108} 108}
109 109
@@ -111,7 +111,7 @@ static void modify_16(unsigned long addr, unsigned long h, unsigned long data)
111{ 111{
112 unsigned long flags; 112 unsigned long flags;
113 local_irq_save(flags); 113 local_irq_save(flags);
114 ctrl_outw(set_field(ctrl_inw(addr), data, h), addr); 114 __raw_writew(set_field(__raw_readw(addr), data, h), addr);
115 local_irq_restore(flags); 115 local_irq_restore(flags);
116} 116}
117 117
@@ -119,7 +119,7 @@ static void modify_32(unsigned long addr, unsigned long h, unsigned long data)
119{ 119{
120 unsigned long flags; 120 unsigned long flags;
121 local_irq_save(flags); 121 local_irq_save(flags);
122 ctrl_outl(set_field(ctrl_inl(addr), data, h), addr); 122 __raw_writel(set_field(__raw_readl(addr), data, h), addr);
123 local_irq_restore(flags); 123 local_irq_restore(flags);
124} 124}
125 125
@@ -246,16 +246,16 @@ static void intc_mask_ack(unsigned int irq)
246 addr = INTC_REG(d, _INTC_ADDR_D(handle), 0); 246 addr = INTC_REG(d, _INTC_ADDR_D(handle), 0);
247 switch (_INTC_FN(handle)) { 247 switch (_INTC_FN(handle)) {
248 case REG_FN_MODIFY_BASE + 0: /* 8bit */ 248 case REG_FN_MODIFY_BASE + 0: /* 8bit */
249 ctrl_inb(addr); 249 __raw_readb(addr);
250 ctrl_outb(0xff ^ set_field(0, 1, handle), addr); 250 __raw_writeb(0xff ^ set_field(0, 1, handle), addr);
251 break; 251 break;
252 case REG_FN_MODIFY_BASE + 1: /* 16bit */ 252 case REG_FN_MODIFY_BASE + 1: /* 16bit */
253 ctrl_inw(addr); 253 __raw_readw(addr);
254 ctrl_outw(0xffff ^ set_field(0, 1, handle), addr); 254 __raw_writew(0xffff ^ set_field(0, 1, handle), addr);
255 break; 255 break;
256 case REG_FN_MODIFY_BASE + 3: /* 32bit */ 256 case REG_FN_MODIFY_BASE + 3: /* 32bit */
257 ctrl_inl(addr); 257 __raw_readl(addr);
258 ctrl_outl(0xffffffff ^ set_field(0, 1, handle), addr); 258 __raw_writel(0xffffffff ^ set_field(0, 1, handle), addr);
259 break; 259 break;
260 default: 260 default:
261 BUG(); 261 BUG();
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c
index 56ea7b269b59..3eb17ee5540e 100644
--- a/arch/sh/kernel/cpu/irq/ipr.c
+++ b/arch/sh/kernel/cpu/irq/ipr.c
@@ -33,7 +33,7 @@ static void disable_ipr_irq(unsigned int irq)
33 struct ipr_data *p = get_irq_chip_data(irq); 33 struct ipr_data *p = get_irq_chip_data(irq);
34 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx]; 34 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx];
35 /* Set the priority in IPR to 0 */ 35 /* Set the priority in IPR to 0 */
36 ctrl_outw(ctrl_inw(addr) & (0xffff ^ (0xf << p->shift)), addr); 36 __raw_writew(__raw_readw(addr) & (0xffff ^ (0xf << p->shift)), addr);
37} 37}
38 38
39static void enable_ipr_irq(unsigned int irq) 39static void enable_ipr_irq(unsigned int irq)
@@ -41,7 +41,7 @@ static void enable_ipr_irq(unsigned int irq)
41 struct ipr_data *p = get_irq_chip_data(irq); 41 struct ipr_data *p = get_irq_chip_data(irq);
42 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx]; 42 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx];
43 /* Set priority in IPR back to original value */ 43 /* Set priority in IPR back to original value */
44 ctrl_outw(ctrl_inw(addr) | (p->priority << p->shift), addr); 44 __raw_writew(__raw_readw(addr) | (p->priority << p->shift), addr);
45} 45}
46 46
47/* 47/*