diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2002-10-15 00:02:51 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2002-10-15 00:02:51 +0000 |
| commit | 63e30378bcd24d057df505e5b60feced72821863 (patch) | |
| tree | 501a5ccb737c9cbda1d36d491252f55d9c4556bf | |
| parent | af3f249f3a71158428706037477aacb20cca54db (diff) | |
Notes
| -rw-r--r-- | sys/isa/isa_common.c | 8 | ||||
| -rw-r--r-- | sys/isa/isavar.h | 24 |
2 files changed, 10 insertions, 22 deletions
diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index 8b8034b7874c..debf0fbb279e 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -744,7 +744,7 @@ isa_read_ivar(device_t bus, device_t dev, int index, uintptr_t * result) *result = -1; break; - case ISA_IVAR_MSIZE_0: + case ISA_IVAR_MEMSIZE_0: rle = resource_list_find(rl, SYS_RES_MEMORY, 0); if (rle) *result = rle->count; @@ -752,7 +752,7 @@ isa_read_ivar(device_t bus, device_t dev, int index, uintptr_t * result) *result = 0; break; - case ISA_IVAR_MSIZE_1: + case ISA_IVAR_MEMSIZE_1: rle = resource_list_find(rl, SYS_RES_MEMORY, 1); if (rle) *result = rle->count; @@ -832,8 +832,8 @@ isa_write_ivar(device_t bus, device_t dev, case ISA_IVAR_PORTSIZE_1: case ISA_IVAR_MADDR_0: case ISA_IVAR_MADDR_1: - case ISA_IVAR_MSIZE_0: - case ISA_IVAR_MSIZE_1: + case ISA_IVAR_MEMSIZE_0: + case ISA_IVAR_MEMSIZE_1: case ISA_IVAR_IRQ_0: case ISA_IVAR_IRQ_1: case ISA_IVAR_DRQ_0: diff --git a/sys/isa/isavar.h b/sys/isa/isavar.h index 774d6a40291b..d0306e0a3721 100644 --- a/sys/isa/isavar.h +++ b/sys/isa/isavar.h @@ -111,9 +111,9 @@ enum isa_device_ivars { ISA_IVAR_MADDR, ISA_IVAR_MADDR_0 = ISA_IVAR_MADDR, ISA_IVAR_MADDR_1, - ISA_IVAR_MSIZE, - ISA_IVAR_MSIZE_0 = ISA_IVAR_MSIZE, - ISA_IVAR_MSIZE_1, + ISA_IVAR_MEMSIZE, + ISA_IVAR_MEMSIZE_0 = ISA_IVAR_MEMSIZE, + ISA_IVAR_MEMSIZE_1, ISA_IVAR_IRQ, ISA_IVAR_IRQ_0 = ISA_IVAR_IRQ, ISA_IVAR_IRQ_1, @@ -137,27 +137,15 @@ enum isa_device_ivars { /* * Simplified accessors for isa devices */ -#define ISA_ACCESSOR(A, B, T) \ - \ -static __inline T isa_get_ ## A(device_t dev) \ -{ \ - uintptr_t v; \ - BUS_READ_IVAR(device_get_parent(dev), dev, ISA_IVAR_ ## B, &v); \ - return (T) v; \ -} \ - \ -static __inline void isa_set_ ## A(device_t dev, T t) \ -{ \ - u_long v = (u_long) t; \ - BUS_WRITE_IVAR(device_get_parent(dev), dev, ISA_IVAR_ ## B, v); \ -} +#define ISA_ACCESSOR(var, ivar, type) \ + __BUS_ACCESSOR(isa, var, ISA, ivar, type) ISA_ACCESSOR(port, PORT, int) ISA_ACCESSOR(portsize, PORTSIZE, int) ISA_ACCESSOR(irq, IRQ, int) ISA_ACCESSOR(drq, DRQ, int) ISA_ACCESSOR(maddr, MADDR, int) -ISA_ACCESSOR(msize, MSIZE, int) +ISA_ACCESSOR(msize, MEMSIZE, int) ISA_ACCESSOR(vendorid, VENDORID, int) ISA_ACCESSOR(serial, SERIAL, int) ISA_ACCESSOR(logicalid, LOGICALID, int) |
