Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev The bus_space stuff handles byte order conversions f...
details: https://anonhg.NetBSD.org/src/rev/299ca07f1717
branches: trunk
changeset: 484092:299ca07f1717
user: ad <ad%NetBSD.org@localhost>
date: Sat Mar 25 13:38:35 2000 +0000
description:
The bus_space stuff handles byte order conversions for us.
diffstat:
sys/dev/ic/dptreg.h | 10 +++++-----
sys/dev/isa/dpt_isa.c | 10 +++++-----
2 files changed, 10 insertions(+), 10 deletions(-)
diffs (72 lines):
diff -r b423df0f0b81 -r 299ca07f1717 sys/dev/ic/dptreg.h
--- a/sys/dev/ic/dptreg.h Sat Mar 25 10:14:13 2000 +0000
+++ b/sys/dev/ic/dptreg.h Sat Mar 25 13:38:35 2000 +0000
@@ -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@localhost>
@@ -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 -r b423df0f0b81 -r 299ca07f1717 sys/dev/isa/dpt_isa.c
--- a/sys/dev/isa/dpt_isa.c Sat Mar 25 10:14:13 2000 +0000
+++ b/sys/dev/isa/dpt_isa.c Sat Mar 25 13:38:35 2000 +0000
@@ -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@localhost>
@@ -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 @@
/* 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 @@
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 ||
Home |
Main Index |
Thread Index |
Old Index