Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ofw/ofw_bus_subr.h
Show All 26 Lines | |||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _DEV_OFW_OFW_BUS_SUBR_H_ | #ifndef _DEV_OFW_OFW_BUS_SUBR_H_ | ||||
#define _DEV_OFW_OFW_BUS_SUBR_H_ | #define _DEV_OFW_OFW_BUS_SUBR_H_ | ||||
#include <sys/bus.h> | #include <sys/bus.h> | ||||
#include <sys/intr.h> | |||||
nwhitehorn: This should be gated on #ifdef INTRNG. I think none of the things in sys/intr.h actually… | |||||
#include <dev/ofw/openfirm.h> | #include <dev/ofw/openfirm.h> | ||||
#include "ofw_bus_if.h" | #include "ofw_bus_if.h" | ||||
#define ORIP_NOINT -1 | #define ORIP_NOINT -1 | ||||
#define ORIR_NOTFOUND 0xffffffff | #define ORIR_NOTFOUND 0xffffffff | ||||
struct ofw_bus_iinfo { | struct ofw_bus_iinfo { | ||||
uint8_t *opi_imap; | uint8_t *opi_imap; | ||||
uint8_t *opi_imapmsk; | uint8_t *opi_imapmsk; | ||||
int opi_imapsz; | int opi_imapsz; | ||||
pcell_t opi_addrc; | pcell_t opi_addrc; | ||||
}; | }; | ||||
struct ofw_compat_data { | struct ofw_compat_data { | ||||
const char *ocd_str; | const char *ocd_str; | ||||
uintptr_t ocd_data; | uintptr_t ocd_data; | ||||
}; | }; | ||||
struct intr_map_data_fdt { | struct intr_map_data_fdt { | ||||
struct intr_map_data hdr; | struct intr_map_data hdr; | ||||
phandle_t iparent; | phandle_t iparent; | ||||
u_int ncells; | u_int ncells; | ||||
pcell_t *cells; | pcell_t cells[]; | ||||
}; | }; | ||||
#define SIMPLEBUS_PNP_DESCR "Z:compat;P:private;" | #define SIMPLEBUS_PNP_DESCR "Z:compat;P:private;" | ||||
#define SIMPLEBUS_PNP_INFO(t) \ | #define SIMPLEBUS_PNP_INFO(t) \ | ||||
MODULE_PNP_INFO(SIMPLEBUS_PNP_DESCR, simplebus, t, t, sizeof(t[0]), sizeof(t) / sizeof(t[0])); | MODULE_PNP_INFO(SIMPLEBUS_PNP_DESCR, simplebus, t, t, sizeof(t[0]), sizeof(t) / sizeof(t[0])); | ||||
/* Generic implementation of ofw_bus_if.m methods and helper routines */ | /* Generic implementation of ofw_bus_if.m methods and helper routines */ | ||||
int ofw_bus_gen_setup_devinfo(struct ofw_bus_devinfo *, phandle_t); | int ofw_bus_gen_setup_devinfo(struct ofw_bus_devinfo *, phandle_t); | ||||
Show All 16 Lines | int ofw_bus_search_intrmap(void *, int, void *, int, void *, int, void *, | ||||
void *, void *, int, phandle_t *); | void *, void *, int, phandle_t *); | ||||
/* Routines for processing msi maps */ | /* Routines for processing msi maps */ | ||||
int ofw_bus_msimap(phandle_t, uint16_t, phandle_t *, uint32_t *); | int ofw_bus_msimap(phandle_t, uint16_t, phandle_t *, uint32_t *); | ||||
/* Routines for parsing device-tree data into resource lists. */ | /* Routines for parsing device-tree data into resource lists. */ | ||||
int ofw_bus_reg_to_rl(device_t, phandle_t, pcell_t, pcell_t, | int ofw_bus_reg_to_rl(device_t, phandle_t, pcell_t, pcell_t, | ||||
struct resource_list *); | struct resource_list *); | ||||
#ifndef INTRNG | |||||
int ofw_bus_intr_to_rl(device_t, phandle_t, struct resource_list *, int *); | int ofw_bus_intr_to_rl(device_t, phandle_t, struct resource_list *, int *); | ||||
#endif | |||||
int ofw_bus_intr_by_rid(device_t, phandle_t, int, phandle_t *, int *, | int ofw_bus_intr_by_rid(device_t, phandle_t, int, phandle_t *, int *, | ||||
pcell_t **); | pcell_t **); | ||||
/* Helper to get device status property */ | /* Helper to get device status property */ | ||||
const char *ofw_bus_get_status(device_t dev); | const char *ofw_bus_get_status(device_t dev); | ||||
int ofw_bus_status_okay(device_t dev); | int ofw_bus_status_okay(device_t dev); | ||||
/* Helper to get node's interrupt parent */ | /* Helper to get node's interrupt parent */ | ||||
Show All 40 Lines |
This should be gated on #ifdef INTRNG. I think none of the things in sys/intr.h actually conflict with powerpc/intr_machdep.h, but that's only by chance.