diff options
author | marcel <marcel@FreeBSD.org> | 2003-09-02 20:32:12 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-09-02 20:32:12 +0000 |
commit | 2432ffe7fb7e8c66deef64402e25c458e2132707 (patch) | |
tree | 2e06204ca3d740714bdb022c5d067c677892e266 /sys/sparc64/include/ofw_machdep.h | |
parent | 3a5e34ed9ea402d643342c93f0c33d054db0ab56 (diff) | |
download | FreeBSD-src-2432ffe7fb7e8c66deef64402e25c458e2132707.zip FreeBSD-src-2432ffe7fb7e8c66deef64402e25c458e2132707.tar.gz |
Add function OF_decode_addr(). This function obtains the physical
address of the device identified by its phandle_t by traversing OFW's
device tree. The space and address returned by this function can
subsequently be passed to sparc64_fake_bustag() to construct a valid
tag and handle for use by the newbus I/O functions.
Use of this function is expected to be limited to pre-newbus access to
devices, such as consoles and keyboards.
Partially obtained from: tmm
Reviewed by: jake, jmg, tmm
SBus testing made possible by: jake
Tested with: LINT
Diffstat (limited to 'sys/sparc64/include/ofw_machdep.h')
-rw-r--r-- | sys/sparc64/include/ofw_machdep.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sparc64/include/ofw_machdep.h b/sys/sparc64/include/ofw_machdep.h index 64c7d56..f7062f7 100644 --- a/sys/sparc64/include/ofw_machdep.h +++ b/sys/sparc64/include/ofw_machdep.h @@ -30,7 +30,8 @@ #include <sys/bus.h> -void OF_getetheraddr(device_t dev, u_char *addr); +int OF_decode_addr(phandle_t, int *, bus_addr_t *); +void OF_getetheraddr(device_t, u_char *); void cpu_shutdown(void *); void openfirmware_exit(void *); |