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/boards/mach-landisk | |
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/boards/mach-landisk')
-rw-r--r-- | arch/sh/boards/mach-landisk/gio.c | 12 | ||||
-rw-r--r-- | arch/sh/boards/mach-landisk/irq.c | 6 | ||||
-rw-r--r-- | arch/sh/boards/mach-landisk/psw.c | 4 | ||||
-rw-r--r-- | arch/sh/boards/mach-landisk/setup.c | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/arch/sh/boards/mach-landisk/gio.c b/arch/sh/boards/mach-landisk/gio.c index 528013188196..01e6abb769b9 100644 --- a/arch/sh/boards/mach-landisk/gio.c +++ b/arch/sh/boards/mach-landisk/gio.c | |||
@@ -76,39 +76,39 @@ static long gio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
76 | break; | 76 | break; |
77 | 77 | ||
78 | case GIODRV_IOCSGIODATA1: /* write byte */ | 78 | case GIODRV_IOCSGIODATA1: /* write byte */ |
79 | ctrl_outb((unsigned char)(0x0ff & data), addr); | 79 | __raw_writeb((unsigned char)(0x0ff & data), addr); |
80 | break; | 80 | break; |
81 | 81 | ||
82 | case GIODRV_IOCSGIODATA2: /* write word */ | 82 | case GIODRV_IOCSGIODATA2: /* write word */ |
83 | if (addr & 0x01) { | 83 | if (addr & 0x01) { |
84 | return -EFAULT; | 84 | return -EFAULT; |
85 | } | 85 | } |
86 | ctrl_outw((unsigned short int)(0x0ffff & data), addr); | 86 | __raw_writew((unsigned short int)(0x0ffff & data), addr); |
87 | break; | 87 | break; |
88 | 88 | ||
89 | case GIODRV_IOCSGIODATA4: /* write long */ | 89 | case GIODRV_IOCSGIODATA4: /* write long */ |
90 | if (addr & 0x03) { | 90 | if (addr & 0x03) { |
91 | return -EFAULT; | 91 | return -EFAULT; |
92 | } | 92 | } |
93 | ctrl_outl(data, addr); | 93 | __raw_writel(data, addr); |
94 | break; | 94 | break; |
95 | 95 | ||
96 | case GIODRV_IOCGGIODATA1: /* read byte */ | 96 | case GIODRV_IOCGGIODATA1: /* read byte */ |
97 | data = ctrl_inb(addr); | 97 | data = __raw_readb(addr); |
98 | break; | 98 | break; |
99 | 99 | ||
100 | case GIODRV_IOCGGIODATA2: /* read word */ | 100 | case GIODRV_IOCGGIODATA2: /* read word */ |
101 | if (addr & 0x01) { | 101 | if (addr & 0x01) { |
102 | return -EFAULT; | 102 | return -EFAULT; |
103 | } | 103 | } |
104 | data = ctrl_inw(addr); | 104 | data = __raw_readw(addr); |
105 | break; | 105 | break; |
106 | 106 | ||
107 | case GIODRV_IOCGGIODATA4: /* read long */ | 107 | case GIODRV_IOCGGIODATA4: /* read long */ |
108 | if (addr & 0x03) { | 108 | if (addr & 0x03) { |
109 | return -EFAULT; | 109 | return -EFAULT; |
110 | } | 110 | } |
111 | data = ctrl_inl(addr); | 111 | data = __raw_readl(addr); |
112 | break; | 112 | break; |
113 | default: | 113 | default: |
114 | return -EFAULT; | 114 | return -EFAULT; |
diff --git a/arch/sh/boards/mach-landisk/irq.c b/arch/sh/boards/mach-landisk/irq.c index 7b284cde1f58..96f38a4187d0 100644 --- a/arch/sh/boards/mach-landisk/irq.c +++ b/arch/sh/boards/mach-landisk/irq.c | |||
@@ -22,14 +22,14 @@ static void disable_landisk_irq(unsigned int irq) | |||
22 | { | 22 | { |
23 | unsigned char mask = 0xff ^ (0x01 << (irq - 5)); | 23 | unsigned char mask = 0xff ^ (0x01 << (irq - 5)); |
24 | 24 | ||
25 | ctrl_outb(ctrl_inb(PA_IMASK) & mask, PA_IMASK); | 25 | __raw_writeb(__raw_readb(PA_IMASK) & mask, PA_IMASK); |
26 | } | 26 | } |
27 | 27 | ||
28 | static void enable_landisk_irq(unsigned int irq) | 28 | static void enable_landisk_irq(unsigned int irq) |
29 | { | 29 | { |
30 | unsigned char value = (0x01 << (irq - 5)); | 30 | unsigned char value = (0x01 << (irq - 5)); |
31 | 31 | ||
32 | ctrl_outb(ctrl_inb(PA_IMASK) | value, PA_IMASK); | 32 | __raw_writeb(__raw_readb(PA_IMASK) | value, PA_IMASK); |
33 | } | 33 | } |
34 | 34 | ||
35 | static struct irq_chip landisk_irq_chip __read_mostly = { | 35 | static struct irq_chip landisk_irq_chip __read_mostly = { |
@@ -52,5 +52,5 @@ void __init init_landisk_IRQ(void) | |||
52 | handle_level_irq, "level"); | 52 | handle_level_irq, "level"); |
53 | enable_landisk_irq(i); | 53 | enable_landisk_irq(i); |
54 | } | 54 | } |
55 | ctrl_outb(0x00, PA_PWRINT_CLR); | 55 | __raw_writeb(0x00, PA_PWRINT_CLR); |
56 | } | 56 | } |
diff --git a/arch/sh/boards/mach-landisk/psw.c b/arch/sh/boards/mach-landisk/psw.c index e6b0efa098d1..bef83522f958 100644 --- a/arch/sh/boards/mach-landisk/psw.c +++ b/arch/sh/boards/mach-landisk/psw.c | |||
@@ -25,7 +25,7 @@ static irqreturn_t psw_irq_handler(int irq, void *arg) | |||
25 | unsigned int sw_value; | 25 | unsigned int sw_value; |
26 | int ret = 0; | 26 | int ret = 0; |
27 | 27 | ||
28 | sw_value = (0x0ff & (~ctrl_inb(PA_STATUS))); | 28 | sw_value = (0x0ff & (~__raw_readb(PA_STATUS))); |
29 | 29 | ||
30 | /* Nothing to do if there's no state change */ | 30 | /* Nothing to do if there's no state change */ |
31 | if (psw->state) { | 31 | if (psw->state) { |
@@ -42,7 +42,7 @@ static irqreturn_t psw_irq_handler(int irq, void *arg) | |||
42 | 42 | ||
43 | out: | 43 | out: |
44 | /* Clear the switch IRQs */ | 44 | /* Clear the switch IRQs */ |
45 | ctrl_outb(0x00, PA_PWRINT_CLR); | 45 | __raw_writeb(0x00, PA_PWRINT_CLR); |
46 | 46 | ||
47 | return IRQ_RETVAL(ret); | 47 | return IRQ_RETVAL(ret); |
48 | } | 48 | } |
diff --git a/arch/sh/boards/mach-landisk/setup.c b/arch/sh/boards/mach-landisk/setup.c index 2d09d4d34f87..50337acc18c5 100644 --- a/arch/sh/boards/mach-landisk/setup.c +++ b/arch/sh/boards/mach-landisk/setup.c | |||
@@ -25,7 +25,7 @@ void init_landisk_IRQ(void); | |||
25 | 25 | ||
26 | static void landisk_power_off(void) | 26 | static void landisk_power_off(void) |
27 | { | 27 | { |
28 | ctrl_outb(0x01, PA_SHUTDOWN); | 28 | __raw_writeb(0x01, PA_SHUTDOWN); |
29 | } | 29 | } |
30 | 30 | ||
31 | static struct resource cf_ide_resources[3]; | 31 | static struct resource cf_ide_resources[3]; |
@@ -88,7 +88,7 @@ __initcall(landisk_devices_setup); | |||
88 | static void __init landisk_setup(char **cmdline_p) | 88 | static void __init landisk_setup(char **cmdline_p) |
89 | { | 89 | { |
90 | /* LED ON */ | 90 | /* LED ON */ |
91 | ctrl_outb(ctrl_inb(PA_LED) | 0x03, PA_LED); | 91 | __raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED); |
92 | 92 | ||
93 | printk(KERN_INFO "I-O DATA DEVICE, INC. \"LANDISK Series\" support.\n"); | 93 | printk(KERN_INFO "I-O DATA DEVICE, INC. \"LANDISK Series\" support.\n"); |
94 | pm_power_off = landisk_power_off; | 94 | pm_power_off = landisk_power_off; |