Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/puc/puc_bfe.h
Show All 25 Lines | |||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _DEV_PUC_BFE_H_ | #ifndef _DEV_PUC_BFE_H_ | ||||
#define _DEV_PUC_BFE_H_ | #define _DEV_PUC_BFE_H_ | ||||
#include <sys/serial.h> | |||||
#define PUC_PCI_BARS 6 | #define PUC_PCI_BARS 6 | ||||
struct puc_cfg; | struct puc_cfg; | ||||
struct puc_port; | |||||
extern const struct puc_cfg puc_pci_devices[]; | extern const struct puc_cfg puc_pci_devices[]; | ||||
extern devclass_t puc_devclass; | extern devclass_t puc_devclass; | ||||
extern const char puc_driver_name[]; | extern const char puc_driver_name[]; | ||||
struct puc_bar { | struct puc_bar { | ||||
struct resource *b_res; | struct resource *b_res; | ||||
int b_rid; | int b_rid; | ||||
int b_type; | int b_type; | ||||
}; | }; | ||||
#define PUC_ISRCCNT 5 | |||||
struct puc_port { | |||||
struct puc_bar *p_bar; | |||||
struct resource *p_rres; | |||||
struct resource *p_ires; | |||||
device_t p_dev; | |||||
int p_nr; | |||||
int p_type; | |||||
int p_rclk; | |||||
int p_hasintr:1; | |||||
serdev_intr_t *p_ihsrc[PUC_ISRCCNT]; | |||||
void *p_iharg; | |||||
int p_ipend; | |||||
}; | |||||
struct puc_softc { | struct puc_softc { | ||||
device_t sc_dev; | device_t sc_dev; | ||||
const struct puc_cfg *sc_cfg; | const struct puc_cfg *sc_cfg; | ||||
intptr_t sc_cfg_data; | intptr_t sc_cfg_data; | ||||
struct puc_bar sc_bar[PUC_PCI_BARS]; | struct puc_bar sc_bar[PUC_PCI_BARS]; | ||||
struct rman sc_ioport; | struct rman sc_ioport; | ||||
Show All 29 Lines | |||||
int puc_bus_child_location_str(device_t, device_t, char *, size_t); | int puc_bus_child_location_str(device_t, device_t, char *, size_t); | ||||
int puc_bus_child_pnpinfo_str(device_t, device_t, char *, size_t); | int puc_bus_child_pnpinfo_str(device_t, device_t, char *, size_t); | ||||
struct resource *puc_bus_alloc_resource(device_t, device_t, int, int *, | struct resource *puc_bus_alloc_resource(device_t, device_t, int, int *, | ||||
rman_res_t, rman_res_t, rman_res_t, u_int); | rman_res_t, rman_res_t, rman_res_t, u_int); | ||||
int puc_bus_get_resource(device_t, device_t, int, int, rman_res_t *, rman_res_t *); | int puc_bus_get_resource(device_t, device_t, int, int, rman_res_t *, rman_res_t *); | ||||
int puc_bus_print_child(device_t, device_t); | int puc_bus_print_child(device_t, device_t); | ||||
int puc_bus_read_ivar(device_t, device_t, int, uintptr_t *); | int puc_bus_read_ivar(device_t, device_t, int, uintptr_t *); | ||||
int puc_bus_write_ivar(device_t, device_t, int, uintptr_t); | |||||
int puc_bus_release_resource(device_t, device_t, int, int, struct resource *); | int puc_bus_release_resource(device_t, device_t, int, int, struct resource *); | ||||
int puc_bus_setup_intr(device_t, device_t, struct resource *, int, | int puc_bus_setup_intr(device_t, device_t, struct resource *, int, | ||||
driver_filter_t *, driver_intr_t *, void *, void **); | driver_filter_t *, driver_intr_t *, void *, void **); | ||||
int puc_bus_teardown_intr(device_t, device_t, struct resource *, void *); | int puc_bus_teardown_intr(device_t, device_t, struct resource *, void *); | ||||
SYSCTL_DECL(_hw_puc); | SYSCTL_DECL(_hw_puc); | ||||
#endif /* _DEV_PUC_BFE_H_ */ | #endif /* _DEV_PUC_BFE_H_ */ |