diff options
| author | 2003-02-17 01:29:19 +0000 | |
|---|---|---|
| committer | 2003-02-17 01:29:19 +0000 | |
| commit | eb79e960df2d323f47be3c916d19f2570b9aacad (patch) | |
| tree | c56e5883e53ec2ca6418a6e570d16e872915ab1c /sys/dev/sbus/cs4231.c | |
| parent | sync (diff) | |
| download | wireguard-openbsd-eb79e960df2d323f47be3c916d19f2570b9aacad.tar.xz wireguard-openbsd-eb79e960df2d323f47be3c916d19f2570b9aacad.zip | |
Add support for the Sun Enterprise 450
Reduce the size of a GENERIC kernel by ~190k
Remove the nasty pointer/bus_space_handle_t casts
Adds debug bus_space code including the ability to trace
bus operations (it actually works now).
The following rules are now followed (and verfified by the debug
code):
1. A "bus_space_handle_t" may only be used with the
"bus_space_tag_t" that created it.
2. Only "bus_space_map()" may create "bus_space_handle_t"s.
3. A "bus_space_handle_t" may not be modified after it has
been created (other than being destroyed by "bus_space_unmap()").
Thanks to help from mcbride, marc, jason, drahn, to anyone that might
have slipped my mind at the moment.
ok jason@, deraadt@
Diffstat (limited to 'sys/dev/sbus/cs4231.c')
| -rw-r--r-- | sys/dev/sbus/cs4231.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/sbus/cs4231.c b/sys/dev/sbus/cs4231.c index 88d8b47c1ff..c530986f2c6 100644 --- a/sys/dev/sbus/cs4231.c +++ b/sys/dev/sbus/cs4231.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4231.c,v 1.15 2002/10/04 01:51:45 jason Exp $ */ +/* $OpenBSD: cs4231.c,v 1.16 2003/02/17 01:29:20 henric Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -250,11 +250,11 @@ cs4231_attach(parent, self, aux) } if (sbus_bus_map(sa->sa_bustag, - (bus_type_t)sa->sa_reg[0].sbr_slot, + sa->sa_reg[0].sbr_slot, (bus_addr_t)sa->sa_reg[0].sbr_offset, (bus_size_t)sa->sa_reg[0].sbr_size, BUS_SPACE_MAP_LINEAR, 0, &sc->sc_regs) != 0) { - printf(": couldn't map registers\n", self->dv_xname); + printf(": couldn't map registers\n"); return; } @@ -1548,7 +1548,7 @@ cs4231_trigger_output(addr, start, end, blksize, intr, arg, param) for (p = sc->sc_dmas; p->addr != start; p = p->next) /*EMPTY*/; if (p == NULL) { - printf("%s: trigger_output: bad addr: %x\n", + printf("%s: trigger_output: bad addr: %p\n", sc->sc_dev.dv_xname, start); return (EINVAL); } @@ -1613,7 +1613,7 @@ cs4231_trigger_input(addr, start, end, blksize, intr, arg, param) for (p = sc->sc_dmas; p->addr != start; p = p->next) /*EMPTY*/; if (p == NULL) { - printf("%s: trigger_input: bad addr: %x\n", + printf("%s: trigger_input: bad addr: %p\n", sc->sc_dev.dv_xname, start); return (EINVAL); } |
