summaryrefslogtreecommitdiffstats
path: root/drivers/net/arcnet/com20020-isa.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2015-05-05 10:06:06 -0700
committerMichael Grzeschik <m.grzeschik@pengutronix.de>2015-09-23 08:44:26 +0200
commit0fec65130b9f11a73d74f47025491f97f82ba070 (patch)
tree52b39e84ef4717d17e62a0d9401e8d7f7f718f34 /drivers/net/arcnet/com20020-isa.c
parente5fcfc1f8d3cfaf432a93d39df3e5d7718c58848 (diff)
downloadop-kernel-dev-0fec65130b9f11a73d74f47025491f97f82ba070.zip
op-kernel-dev-0fec65130b9f11a73d74f47025491f97f82ba070.tar.gz
arcnet: com20020: Use arcnet_<I/O> routines
Simplify and make consistent the current uses of inb/outb by using the newly introduced arcnet_<I/O> equivalents. o Add new #defines for register offsets There is an register offset, 8, that is unnamed and used as-is. o Remove old #defines that included the ioaddr o Remove obfuscating macros by expanding them in-place where appropriate o Create static inline com20020_set_subaddress for the SET_SUBADR macro There is an unused arcnet config entry CONFIGSA100_CT6001 which added a special #define BUS_ALIGN which was introduced but never used in fullhist git tree commit 22cfce4b82b0 ("[ARCNET]: Fixes.") in Nov 2004 for Linux v2.6.10. This BUS_ALIGN #define tries to allow 8 bit devices to work on a 16 bit bus by aligning addresses to 16 bit boundaries. Move this currently unused CONFIG_SA1100_CT6001 BUS_ALIGN macro from com20020.h to arcdevice.h. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Diffstat (limited to 'drivers/net/arcnet/com20020-isa.c')
-rw-r--r--drivers/net/arcnet/com20020-isa.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/arcnet/com20020-isa.c b/drivers/net/arcnet/com20020-isa.c
index ab5202b..b9e9931 100644
--- a/drivers/net/arcnet/com20020-isa.c
+++ b/drivers/net/arcnet/com20020-isa.c
@@ -67,7 +67,7 @@ static int __init com20020isa_probe(struct net_device *dev)
ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1);
return -ENXIO;
}
- if (ASTATUS() == 0xFF) {
+ if (arcnet_inb(ioaddr, COM20020_REG_R_STATUS) == 0xFF) {
arc_printk(D_NORMAL, dev, "IO address %x empty\n", ioaddr);
err = -ENODEV;
goto out;
@@ -83,20 +83,20 @@ static int __init com20020isa_probe(struct net_device *dev)
* we tell it to start receiving.
*/
arc_printk(D_INIT_REASONS, dev, "intmask was %02Xh\n",
- inb(_INTMASK));
- outb(0, _INTMASK);
+ arcnet_inb(ioaddr, COM20020_REG_R_STATUS));
+ arcnet_outb(0, ioaddr, COM20020_REG_W_INTMASK);
airqmask = probe_irq_on();
- outb(NORXflag, _INTMASK);
+ arcnet_outb(NORXflag, ioaddr, COM20020_REG_W_INTMASK);
udelay(1);
- outb(0, _INTMASK);
+ arcnet_outb(0, ioaddr, COM20020_REG_W_INTMASK);
dev->irq = probe_irq_off(airqmask);
if ((int)dev->irq <= 0) {
arc_printk(D_INIT_REASONS, dev, "Autoprobe IRQ failed first time\n");
airqmask = probe_irq_on();
- outb(NORXflag, _INTMASK);
+ arcnet_outb(NORXflag, ioaddr, COM20020_REG_W_INTMASK);
udelay(5);
- outb(0, _INTMASK);
+ arcnet_outb(0, ioaddr, COM20020_REG_W_INTMASK);
dev->irq = probe_irq_off(airqmask);
if ((int)dev->irq <= 0) {
arc_printk(D_NORMAL, dev, "Autoprobe IRQ failed.\n");
OpenPOWER on IntegriCloud