diff options
| author | ad <ad@NetBSD.org> | 2000-03-25 13:38:35 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 2000-03-25 13:38:35 +0000 |
| commit | b84aceb90dcfff2787e858df9a2a7123f31ea420 (patch) | |
| tree | c9b669bd93289a40504ae8738bde0c6c66055e10 /sys/dev | |
| parent | 61609b54e2b3242093fb7755e9c79f19e885ae36 (diff) | |
The bus_space stuff handles byte order conversions for us.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/dptreg.h | 10 | ||||
| -rw-r--r-- | sys/dev/isa/dpt_isa.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/ic/dptreg.h b/sys/dev/ic/dptreg.h index 951a4914cfd..a601fab4d54 100644 --- a/sys/dev/ic/dptreg.h +++ b/sys/dev/ic/dptreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: dptreg.h,v 1.7 2000/02/24 18:47:55 ad Exp $ */ +/* $NetBSD: dptreg.h,v 1.8 2000/03/25 13:38:35 ad Exp $ */ /* * Copyright (c) 1999 Andy Doran <ad@NetBSD.org> @@ -48,16 +48,16 @@ #define dpt_inb(x, o) \ bus_space_read_1((x)->sc_iot, (x)->sc_ioh, (o)) #define dpt_inw(x, o) \ - le16toh(bus_space_read_2((x)->sc_iot, (x)->sc_ioh, (o))) + bus_space_read_2((x)->sc_iot, (x)->sc_ioh, (o)) #define dpt_inl(x, o) \ - le32toh(bus_space_read_4((x)->sc_iot, (x)->sc_ioh, (o))) + bus_space_read_4((x)->sc_iot, (x)->sc_ioh, (o)) #define dpt_outb(x, o, d) \ bus_space_write_1((x)->sc_iot, (x)->sc_ioh, (o), (d)) #define dpt_outw(x, o, d) \ - bus_space_write_2((x)->sc_iot, (x)->sc_ioh, (o), htole16(d)) + bus_space_write_2((x)->sc_iot, (x)->sc_ioh, (o), (d)) #define dpt_outl(x, o, d) \ - bus_space_write_4((x)->sc_iot, (x)->sc_ioh, (o), htole32(d)) + bus_space_write_4((x)->sc_iot, (x)->sc_ioh, (o), (d)) #endif /* _KERNEL */ diff --git a/sys/dev/isa/dpt_isa.c b/sys/dev/isa/dpt_isa.c index c66178ffe48..9e38474ffae 100644 --- a/sys/dev/isa/dpt_isa.c +++ b/sys/dev/isa/dpt_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: dpt_isa.c,v 1.2 2000/03/16 15:09:59 ad Exp $ */ +/* $NetBSD: dpt_isa.c,v 1.3 2000/03/25 13:38:36 ad Exp $ */ /* * Copyright (c) 1999, 2000 Andy Doran <ad@NetBSD.org> @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dpt_isa.c,v 1.2 2000/03/16 15:09:59 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dpt_isa.c,v 1.3 2000/03/25 13:38:36 ad Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -185,7 +185,7 @@ dpt_isa_probe(ia, iobase) /* Begin reading */ while (i--) - *p++ = le16toh(bus_space_read_2(iot, ioh, HA_DATA)); + *p++ = bus_space_read_2(iot, ioh, HA_DATA); if ((i = ec.ec_cfglen) > (sizeof(struct eata_cfg) - (int)(&(((struct eata_cfg *)0L)->ec_cfglen)) @@ -199,12 +199,12 @@ dpt_isa_probe(ia, iobase) i >>= 1; while (i--) - *p++ = le16toh(bus_space_read_2(iot, ioh, HA_DATA)); + *p++ = bus_space_read_2(iot, ioh, HA_DATA); /* Flush until we have read 512 bytes. */ i = (512 - j + 1) >> 1; while (i--) - le16toh(bus_space_read_2(iot, ioh, HA_DATA)); + bus_space_read_2(iot, ioh, HA_DATA); /* Puke if we don't like the returned configuration data. */ if ((bus_space_read_1(iot, ioh, HA_STATUS) & HA_ST_ERROR) != 0 || |
