Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ofw/openfirm.h
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | |||||
* often necessary to use interfaces provided by the driver for the referenced | * often necessary to use interfaces provided by the driver for the referenced | ||||
* instance. These routines allow a driver that provides such an interface to | * instance. These routines allow a driver that provides such an interface to | ||||
* register its association with an xref handle, and for other drivers to obtain | * register its association with an xref handle, and for other drivers to obtain | ||||
* the device_t associated with an xref handle. | * the device_t associated with an xref handle. | ||||
*/ | */ | ||||
device_t OF_device_from_xref(phandle_t xref); | device_t OF_device_from_xref(phandle_t xref); | ||||
phandle_t OF_xref_from_device(device_t dev); | phandle_t OF_xref_from_device(device_t dev); | ||||
int OF_device_register_xref(phandle_t xref, device_t dev); | int OF_device_register_xref(phandle_t xref, device_t dev); | ||||
void OF_device_unregister_xref(phandle_t xref, device_t dev); | |||||
/* Device I/O functions */ | /* Device I/O functions */ | ||||
ihandle_t OF_open(const char *path); | ihandle_t OF_open(const char *path); | ||||
void OF_close(ihandle_t instance); | void OF_close(ihandle_t instance); | ||||
ssize_t OF_read(ihandle_t instance, void *buf, size_t len); | ssize_t OF_read(ihandle_t instance, void *buf, size_t len); | ||||
ssize_t OF_write(ihandle_t instance, const void *buf, size_t len); | ssize_t OF_write(ihandle_t instance, const void *buf, size_t len); | ||||
int OF_seek(ihandle_t instance, uint64_t where); | int OF_seek(ihandle_t instance, uint64_t where); | ||||
Show All 29 Lines |