Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/bhnd/bhnd.h
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
#include "bhnd_match.h" | #include "bhnd_match.h" | ||||
#include "nvram/bhnd_nvram.h" | #include "nvram/bhnd_nvram.h" | ||||
extern devclass_t bhnd_devclass; | extern devclass_t bhnd_devclass; | ||||
extern devclass_t bhnd_hostb_devclass; | extern devclass_t bhnd_hostb_devclass; | ||||
extern devclass_t bhnd_nvram_devclass; | extern devclass_t bhnd_nvram_devclass; | ||||
#define BHND_CHIPID_MAX_NAMELEN 32 /**< maximum buffer required for a | |||||
bhnd_format_chip_id() */ | |||||
/** | /** | ||||
* bhnd child instance variables | * bhnd child instance variables | ||||
*/ | */ | ||||
enum bhnd_device_vars { | enum bhnd_device_vars { | ||||
BHND_IVAR_VENDOR, /**< Designer's JEP-106 manufacturer ID. */ | BHND_IVAR_VENDOR, /**< Designer's JEP-106 manufacturer ID. */ | ||||
BHND_IVAR_DEVICE, /**< Part number */ | BHND_IVAR_DEVICE, /**< Part number */ | ||||
BHND_IVAR_HWREV, /**< Core revision */ | BHND_IVAR_HWREV, /**< Core revision */ | ||||
BHND_IVAR_DEVICE_CLASS, /**< Core class (@sa bhnd_devclass_t) */ | BHND_IVAR_DEVICE_CLASS, /**< Core class (@sa bhnd_devclass_t) */ | ||||
▲ Show 20 Lines • Show All 189 Lines • ▼ Show 20 Lines | |||||
const char *bhnd_find_core_name(uint16_t vendor, | const char *bhnd_find_core_name(uint16_t vendor, | ||||
uint16_t device); | uint16_t device); | ||||
bhnd_devclass_t bhnd_find_core_class(uint16_t vendor, | bhnd_devclass_t bhnd_find_core_class(uint16_t vendor, | ||||
uint16_t device); | uint16_t device); | ||||
const char *bhnd_core_name(const struct bhnd_core_info *ci); | const char *bhnd_core_name(const struct bhnd_core_info *ci); | ||||
bhnd_devclass_t bhnd_core_class(const struct bhnd_core_info *ci); | bhnd_devclass_t bhnd_core_class(const struct bhnd_core_info *ci); | ||||
int bhnd_format_chip_id(char *buffer, size_t size, | |||||
uint16_t chip_id); | |||||
device_t bhnd_match_child(device_t dev, | device_t bhnd_match_child(device_t dev, | ||||
const struct bhnd_core_match *desc); | const struct bhnd_core_match *desc); | ||||
device_t bhnd_find_child(device_t dev, | device_t bhnd_find_child(device_t dev, | ||||
bhnd_devclass_t class, int unit); | bhnd_devclass_t class, int unit); | ||||
device_t bhnd_find_bridge_root(device_t dev, | device_t bhnd_find_bridge_root(device_t dev, | ||||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | |||||
int bhnd_read_chipid(device_t dev, | int bhnd_read_chipid(device_t dev, | ||||
struct resource_spec *rs, | struct resource_spec *rs, | ||||
bus_size_t chipc_offset, | bus_size_t chipc_offset, | ||||
struct bhnd_chipid *result); | struct bhnd_chipid *result); | ||||
void bhnd_set_custom_core_desc(device_t dev, | void bhnd_set_custom_core_desc(device_t dev, | ||||
const char *name); | const char *name); | ||||
void bhnd_set_default_core_desc(device_t dev); | void bhnd_set_default_core_desc(device_t dev); | ||||
void bhnd_set_default_bus_desc(device_t dev, | |||||
const struct bhnd_chipid *chip_id); | |||||
int bhnd_nvram_getvar_str(device_t dev, | int bhnd_nvram_getvar_str(device_t dev, | ||||
const char *name, char *buf, size_t len, | const char *name, char *buf, size_t len, | ||||
size_t *rlen); | size_t *rlen); | ||||
int bhnd_nvram_getvar_uint(device_t dev, | int bhnd_nvram_getvar_uint(device_t dev, | ||||
const char *name, void *value, int width); | const char *name, void *value, int width); | ||||
int bhnd_nvram_getvar_uint8(device_t dev, | int bhnd_nvram_getvar_uint8(device_t dev, | ||||
▲ Show 20 Lines • Show All 861 Lines • Show Last 20 Lines |