Commit 62429e03 authored by Paul Mundt's avatar Paul Mundt

sh: Use __raw_xxx() I/O accessors for INTC and IPR.

Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 64c9627c
......@@ -86,24 +86,24 @@ static inline unsigned int set_field(unsigned int value,
static void write_8(unsigned long addr, unsigned long h, unsigned long data)
{
ctrl_outb(set_field(0, data, h), addr);
__raw_writeb(set_field(0, data, h), addr);
}
static void write_16(unsigned long addr, unsigned long h, unsigned long data)
{
ctrl_outw(set_field(0, data, h), addr);
__raw_writew(set_field(0, data, h), addr);
}
static void write_32(unsigned long addr, unsigned long h, unsigned long data)
{
ctrl_outl(set_field(0, data, h), addr);
__raw_writel(set_field(0, data, h), addr);
}
static void modify_8(unsigned long addr, unsigned long h, unsigned long data)
{
unsigned long flags;
local_irq_save(flags);
ctrl_outb(set_field(ctrl_inb(addr), data, h), addr);
__raw_writeb(set_field(__raw_readb(addr), data, h), addr);
local_irq_restore(flags);
}
......@@ -111,7 +111,7 @@ static void modify_16(unsigned long addr, unsigned long h, unsigned long data)
{
unsigned long flags;
local_irq_save(flags);
ctrl_outw(set_field(ctrl_inw(addr), data, h), addr);
__raw_writew(set_field(__raw_readw(addr), data, h), addr);
local_irq_restore(flags);
}
......@@ -119,7 +119,7 @@ static void modify_32(unsigned long addr, unsigned long h, unsigned long data)
{
unsigned long flags;
local_irq_save(flags);
ctrl_outl(set_field(ctrl_inl(addr), data, h), addr);
__raw_writel(set_field(__raw_readl(addr), data, h), addr);
local_irq_restore(flags);
}
......@@ -246,16 +246,16 @@ static void intc_mask_ack(unsigned int irq)
addr = INTC_REG(d, _INTC_ADDR_D(handle), 0);
switch (_INTC_FN(handle)) {
case REG_FN_MODIFY_BASE + 0: /* 8bit */
ctrl_inb(addr);
ctrl_outb(0xff ^ set_field(0, 1, handle), addr);
__raw_readb(addr);
__raw_writeb(0xff ^ set_field(0, 1, handle), addr);
break;
case REG_FN_MODIFY_BASE + 1: /* 16bit */
ctrl_inw(addr);
ctrl_outw(0xffff ^ set_field(0, 1, handle), addr);
__raw_readw(addr);
__raw_writew(0xffff ^ set_field(0, 1, handle), addr);
break;
case REG_FN_MODIFY_BASE + 3: /* 32bit */
ctrl_inl(addr);
ctrl_outl(0xffffffff ^ set_field(0, 1, handle), addr);
__raw_readl(addr);
__raw_writel(0xffffffff ^ set_field(0, 1, handle), addr);
break;
default:
BUG();
......
......@@ -33,7 +33,7 @@ static void disable_ipr_irq(unsigned int irq)
struct ipr_data *p = get_irq_chip_data(irq);
unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx];
/* Set the priority in IPR to 0 */
ctrl_outw(ctrl_inw(addr) & (0xffff ^ (0xf << p->shift)), addr);
__raw_writew(__raw_readw(addr) & (0xffff ^ (0xf << p->shift)), addr);
}
static void enable_ipr_irq(unsigned int irq)
......@@ -41,7 +41,7 @@ static void enable_ipr_irq(unsigned int irq)
struct ipr_data *p = get_irq_chip_data(irq);
unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx];
/* Set priority in IPR back to original value */
ctrl_outw(ctrl_inw(addr) | (p->priority << p->shift), addr);
__raw_writew(__raw_readw(addr) | (p->priority << p->shift), addr);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment