Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bhnd/bhndb/bhndb.h
| Context not available. | |||||
| extern devclass_t bhndb_devclass; | extern devclass_t bhndb_devclass; | ||||
| int bhndb_attach_bridge(device_t parent, device_t *bhndb, int unit); | int bhndb_attach_bridge(device_t parent, device_t *bhndb, int unit); | ||||
| int bhndb_attach_by_class(device_t parent, device_t *child, int unit, devclass_t child_devclass); | |||||
| /** | /** | ||||
| * bhndb register window types. | * bhndb register window types. | ||||
| Context not available. | |||||
| BHNDB_REGWIN_T_CORE, /**< Fixed mapping of a core port region. */ | BHNDB_REGWIN_T_CORE, /**< Fixed mapping of a core port region. */ | ||||
| BHNDB_REGWIN_T_SPROM, /**< Fixed mapping of device SPROM */ | BHNDB_REGWIN_T_SPROM, /**< Fixed mapping of device SPROM */ | ||||
| BHNDB_REGWIN_T_DYN, /**< A dynamically configurable window */ | BHNDB_REGWIN_T_DYN, /**< A dynamically configurable window */ | ||||
| BHNDB_REGWIN_T_FIXED, /**< Memory mapped direct window */ | |||||
| BHNDB_REGWIN_T_INVALID /**< Invalid type */ | BHNDB_REGWIN_T_INVALID /**< Invalid type */ | ||||
| } bhndb_regwin_type_t; | } bhndb_regwin_type_t; | ||||
| Context not available. | |||||
| */ | */ | ||||
| #define BHNDB_REGWIN_T_IS_STATIC(_rt) \ | #define BHNDB_REGWIN_T_IS_STATIC(_rt) \ | ||||
| ((_rt) == BHNDB_REGWIN_T_CORE || \ | ((_rt) == BHNDB_REGWIN_T_CORE || \ | ||||
| (_rt) == BHNDB_REGWIN_T_SPROM) | (_rt) == BHNDB_REGWIN_T_SPROM || \ | ||||
| (_rt) == BHNDB_REGWIN_T_FIXED) | |||||
| /** | /** | ||||
| * bhndb register window definition. | * bhndb register window definition. | ||||
| Context not available. | |||||
| int rid; /**< resource id */ | int rid; /**< resource id */ | ||||
| } res; | } res; | ||||
| /** changed from unnamed to named to meet C99 */ | |||||
| union { | union specific { | ||||
| /** Core-specific register window (BHNDB_REGWIN_T_CORE). */ | /** Core-specific register window (BHNDB_REGWIN_T_CORE). */ | ||||
| struct { | struct { | ||||
| bhnd_devclass_t class; /**< mapped core's class */ | bhnd_devclass_t class; /**< mapped core's class */ | ||||
| Context not available. | |||||
| u_int region; /**< mapped region number */ | u_int region; /**< mapped region number */ | ||||
| } core; | } core; | ||||
| /** Fixed memory mapped bus windows */ | |||||
| struct{} direct; | |||||
| /** SPROM register window (BHNDB_REGWIN_T_SPROM). */ | /** SPROM register window (BHNDB_REGWIN_T_SPROM). */ | ||||
| struct {} sprom; | struct {} sprom; | ||||
| Context not available. | |||||
| struct { | struct { | ||||
| bus_size_t cfg_offset; /**< window address config offset. */ | bus_size_t cfg_offset; /**< window address config offset. */ | ||||
| } dyn; | } dyn; | ||||
| }; | } win_spec; | ||||
| }; | }; | ||||
| #define BHNDB_REGWIN_TABLE_END { BHNDB_REGWIN_T_INVALID, 0, 0, { 0, 0 } } | #define BHNDB_REGWIN_TABLE_END { BHNDB_REGWIN_T_INVALID, 0, 0, { 0, 0 } } | ||||
| Context not available. | |||||
| * via which those mappings may be accessed. | * via which those mappings may be accessed. | ||||
| */ | */ | ||||
| struct bhndb_hwcfg { | struct bhndb_hwcfg { | ||||
| bool is_hostb_required; | |||||
| const struct resource_spec *resource_specs; | const struct resource_spec *resource_specs; | ||||
| const struct bhndb_regwin *register_windows; | const struct bhndb_regwin *register_windows; | ||||
| }; | }; | ||||
| Context not available. | |||||
| #define BHNDB_HW_PRIORITY_TABLE_END { {}, BHNDB_PRIORITY_NONE, NULL, 0 } | #define BHNDB_HW_PRIORITY_TABLE_END { {}, BHNDB_PRIORITY_NONE, NULL, 0 } | ||||
| #endif /* _BHND_BHNDB_H_ */ | #endif /* _BHND_BHNDB_H_ */ | ||||
| No newline at end of file | |||||
| Context not available. | |||||