Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bhnd/bhnd_bus_if.m
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | bhnd_bus_null_get_region_addr(device_t dev, device_t child, | ||||
bhnd_port_type type, u_int port, u_int region, bhnd_addr_t *addr, | bhnd_port_type type, u_int port, u_int region, bhnd_addr_t *addr, | ||||
bhnd_size_t *size) | bhnd_size_t *size) | ||||
{ | { | ||||
return (ENOENT); | return (ENOENT); | ||||
} | } | ||||
static int | static int | ||||
bhnd_bus_null_get_nvram_var(device_t dev, device_t child, | bhnd_bus_null_get_nvram_var(device_t dev, device_t child, | ||||
const char *name, void *buf, size_t *size) | const char *name, void *buf, size_t *size, bhnd_nvram_type type) | ||||
{ | { | ||||
return (ENODEV); | return (ENODEV); | ||||
} | } | ||||
} | } | ||||
/** | /** | ||||
* Return the active host bridge core for the bhnd bus, if any. | * Return the active host bridge core for the bhnd bus, if any. | ||||
▲ Show 20 Lines • Show All 359 Lines • ▼ Show 20 Lines | |||||
* @param dev The bus device. | * @param dev The bus device. | ||||
* @param child The requesting device. | * @param child The requesting device. | ||||
* @param name The NVRAM variable name. | * @param name The NVRAM variable name. | ||||
* @param[out] buf On success, the requested value will be written | * @param[out] buf On success, the requested value will be written | ||||
* to this buffer. This argment may be NULL if | * to this buffer. This argment may be NULL if | ||||
* the value is not desired. | * the value is not desired. | ||||
* @param[in,out] size The capacity of @p buf. On success, will be set | * @param[in,out] size The capacity of @p buf. On success, will be set | ||||
* to the actual size of the requested value. | * to the actual size of the requested value. | ||||
* @param type The data type to be written to @p buf. | |||||
* | * | ||||
* @retval 0 success | * @retval 0 success | ||||
* @retval ENOENT The requested variable was not found. | * @retval ENOENT The requested variable was not found. | ||||
* @retval ENOMEM If @p buf is non-NULL and a buffer of @p size is too | * @retval ENOMEM If @p buf is non-NULL and a buffer of @p size is too | ||||
* small to hold the requested value. | * small to hold the requested value. | ||||
* @retval ENODEV No valid NVRAM source could be found. | * @retval ENODEV No valid NVRAM source could be found. | ||||
* @retval EFTYPE If the @p name's data type cannot be coerced to @p type. | |||||
* @retval ERANGE If value coercion would overflow @p type. | |||||
* @retval non-zero If reading @p name otherwise fails, a regular unix | * @retval non-zero If reading @p name otherwise fails, a regular unix | ||||
* error code will be returned. | * error code will be returned. | ||||
*/ | */ | ||||
METHOD int get_nvram_var { | METHOD int get_nvram_var { | ||||
device_t dev; | device_t dev; | ||||
device_t child; | device_t child; | ||||
const char *name; | const char *name; | ||||
void *buf; | void *buf; | ||||
size_t *size; | size_t *size; | ||||
bhnd_nvram_type type; | |||||
} DEFAULT bhnd_bus_null_get_nvram_var; | } DEFAULT bhnd_bus_null_get_nvram_var; | ||||
/** An implementation of bus_read_1() compatible with bhnd_resource */ | /** An implementation of bus_read_1() compatible with bhnd_resource */ | ||||
METHOD uint8_t read_1 { | METHOD uint8_t read_1 { | ||||
device_t dev; | device_t dev; | ||||
device_t child; | device_t child; | ||||
struct bhnd_resource *r; | struct bhnd_resource *r; | ||||
▲ Show 20 Lines • Show All 418 Lines • Show Last 20 Lines |