diff options
Diffstat (limited to 'sys/dev/ofw/openfirm.h')
-rw-r--r-- | sys/dev/ofw/openfirm.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/ofw/openfirm.h b/sys/dev/ofw/openfirm.h index d3967a4..acfd2d2 100644 --- a/sys/dev/ofw/openfirm.h +++ b/sys/dev/ofw/openfirm.h @@ -61,6 +61,7 @@ #define _DEV_OPENFIRM_H_ #include <sys/types.h> +#include <machine/_bus.h> /* * Prototypes for Open Firmware Interface Routines @@ -167,5 +168,16 @@ void OF_exit(void) __attribute__((noreturn)); /* User interface functions */ int OF_interpret(const char *cmd, int nreturns, ...); +/* + * Decode the Nth register property of the given device node and create a bus + * space tag and handle for accessing it. This is for use in setting up things + * like early console output before newbus is available. The implementation is + * machine-dependent, and sparc uses a different function signature as well. + */ +#ifndef __sparc64__ +int OF_decode_addr(phandle_t dev, int regno, bus_space_tag_t *ptag, + bus_space_handle_t *phandle); +#endif + #endif /* _KERNEL */ #endif /* _DEV_OPENFIRM_H_ */ |