Changeset 0ffa3ef5 in mainline for genarch/include/ofw/ofw.h
- Timestamp:
- 2006-07-10T20:57:30Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 11675207
- Parents:
- 7f1c620
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
genarch/include/ofw/ofw.h
r7f1c620 r0ffa3ef5 27 27 */ 28 28 29 29 /** @addtogroup genarch 30 30 * @{ 31 31 */ … … 33 33 */ 34 34 35 #ifndef __OFW_H__36 #define __OFW_H__35 #ifndef KERN_OFW_H_ 36 #define KERN_OFW_H_ 37 37 38 38 #include <arch/types.h> 39 39 40 #define MAX_OFW_ARGS 1 040 #define MAX_OFW_ARGS 12 41 41 42 42 typedef unative_t ofw_arg_t; 43 typedef int ihandle;44 typedef int phandle;43 typedef unsigned int ihandle; 44 typedef unsigned int phandle; 45 45 46 46 /** OpenFirmware command structure … … 48 48 */ 49 49 typedef struct { 50 const char *service; 51 unative_t nargs; 52 unative_t nret; 53 ofw_arg_t args[MAX_OFW_ARGS]; /**< List ofarguments */50 const char *service; /**< Command name */ 51 unative_t nargs; /**< Number of in arguments */ 52 unative_t nret; /**< Number of out arguments */ 53 ofw_arg_t args[MAX_OFW_ARGS]; /**< Buffer for in and out arguments */ 54 54 } ofw_args_t; 55 55 56 typedef void (*ofw_entry)(ofw_args_t *); 57 58 extern ofw_entry ofw; 56 extern int ofw(ofw_args_t *); /**< OpenFirmware Client Interface entry point. */ 59 57 60 58 extern void ofw_init(void); 61 59 extern void ofw_done(void); 62 extern unative_t ofw_call(const char *service, const int nargs, const int nret, ...);60 extern ofw_arg_t ofw_call(const char *service, const int nargs, const int nret, ofw_arg_t *rets, ...); 63 61 extern void ofw_putchar(const char ch); 64 extern char ofw_getchar(void);65 62 extern phandle ofw_find_device(const char *name); 66 extern int ofw_get_property(const phandle device, const char *name, void *buf, const int buflen); 63 extern int ofw_get_property(const phandle device, const char *name, const void *buf, const int buflen); 64 extern void *ofw_translate(const void *addr); 67 65 extern void *ofw_claim(const void *addr, const int size, const int align); 68 66 69 67 #endif 70 68 71 69 /** @} 72 70 */ 73
Note:
See TracChangeset
for help on using the changeset viewer.