summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-07-21 21:43:25 -0700
committerDavid S. Miller <davem@davemloft.net>2014-07-21 21:43:25 -0700
commitcfcfe22256d5a8a14924a1145d56017b043b554f (patch)
treee1ba97ac58eb21f7e94e831c3f6d37e4f44907ba /drivers
parent07d66921337176e9d27e4d0a8a23425c8284a381 (diff)
parent453c9abd38910cc36a59d503fac15a2d0f4d36c7 (diff)
downloadlinux-cfcfe22256d5a8a14924a1145d56017b043b554f.tar.bz2
Merge branch 'sparc64_io'
Sam Ravnborg says: ==================== sparc64 io refactoring The following patchset refactor io_64.h. This was triggered by another patchset by Thierry Reding that updates the the generic io.h such that it may be used by sparc64 and thus make sparc and sparc64 more equal in this area. Before attempting to introduce the generic version it was necessary to clean up the current state to avoid any mistakes. The updates from Thierry needs to go in before I will attempt introducing the generic io.h. The sparcspkr used inb()/outb() primitives for of_ioremap() memory. Update this driver to use sbus_ variants. This change was triggered by a number of new warnings that would otherwise have been seen when dropping the macro indirections. Likewise PeeCeeI.c had some warnings that was fixed by using another IO varaint - which simplified the code too. The patchs has been generated with the --histogram option to make the patch that re-order functions in io_64.h more readable. So to see the same patches locally you need this option too. I have not yet any working sparc64 HW - so this is not tested. But I brought a SUN NetraX1 that I am working on gettting running. That may allow me to do some minimal tests in the future. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/misc/sparcspkr.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c
index 65fd3150919b..179ff1cd6f6b 100644
--- a/drivers/input/misc/sparcspkr.c
+++ b/drivers/input/misc/sparcspkr.c
@@ -86,13 +86,13 @@ static int bbc_spkr_event(struct input_dev *dev, unsigned int type, unsigned int
spin_lock_irqsave(&state->lock, flags);
if (count) {
- outb(0x01, info->regs + 0);
- outb(0x00, info->regs + 2);
- outb((count >> 16) & 0xff, info->regs + 3);
- outb((count >> 8) & 0xff, info->regs + 4);
- outb(0x00, info->regs + 5);
+ sbus_writeb(0x01, info->regs + 0);
+ sbus_writeb(0x00, info->regs + 2);
+ sbus_writeb((count >> 16) & 0xff, info->regs + 3);
+ sbus_writeb((count >> 8) & 0xff, info->regs + 4);
+ sbus_writeb(0x00, info->regs + 5);
} else {
- outb(0x00, info->regs + 0);
+ sbus_writeb(0x00, info->regs + 0);
}
spin_unlock_irqrestore(&state->lock, flags);
@@ -123,15 +123,15 @@ static int grover_spkr_event(struct input_dev *dev, unsigned int type, unsigned
if (count) {
/* enable counter 2 */
- outb(inb(info->enable_reg) | 3, info->enable_reg);
+ sbus_writeb(sbus_readb(info->enable_reg) | 3, info->enable_reg);
/* set command for counter 2, 2 byte write */
- outb(0xB6, info->freq_regs + 1);
+ sbus_writeb(0xB6, info->freq_regs + 1);
/* select desired HZ */
- outb(count & 0xff, info->freq_regs + 0);
- outb((count >> 8) & 0xff, info->freq_regs + 0);
+ sbus_writeb(count & 0xff, info->freq_regs + 0);
+ sbus_writeb((count >> 8) & 0xff, info->freq_regs + 0);
} else {
/* disable counter 2 */
- outb(inb_p(info->enable_reg) & 0xFC, info->enable_reg);
+ sbus_writeb(sbus_readb(info->enable_reg) & 0xFC, info->enable_reg);
}
spin_unlock_irqrestore(&state->lock, flags);