Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/fdt/simplebus.h
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
/* devinfo and softc */ | /* devinfo and softc */ | ||||
struct simplebus_softc { | struct simplebus_softc { | ||||
device_t dev; | device_t dev; | ||||
phandle_t node; | phandle_t node; | ||||
struct simplebus_range *ranges; | struct simplebus_range *ranges; | ||||
int nranges; | int nranges; | ||||
#define SB_FLAG_NO_RANGES (1 << 0) /* Bus doesn't have ranges property */ | |||||
int flags; | |||||
pcell_t acells, scells; | pcell_t acells, scells; | ||||
}; | }; | ||||
struct simplebus_devinfo { | struct simplebus_devinfo { | ||||
struct ofw_bus_devinfo obdinfo; | struct ofw_bus_devinfo obdinfo; | ||||
struct resource_list rl; | struct resource_list rl; | ||||
}; | }; | ||||
void simplebus_init(device_t dev, phandle_t node); | void simplebus_init(device_t dev, phandle_t node); | ||||
device_t simplebus_add_device(device_t dev, phandle_t node, u_int order, | device_t simplebus_add_device(device_t dev, phandle_t node, u_int order, | ||||
const char *name, int unit, struct simplebus_devinfo *di); | const char *name, int unit, struct simplebus_devinfo *di); | ||||
struct simplebus_devinfo *simplebus_setup_dinfo(device_t dev, phandle_t node, | struct simplebus_devinfo *simplebus_setup_dinfo(device_t dev, phandle_t node, | ||||
struct simplebus_devinfo *di); | struct simplebus_devinfo *di); | ||||
int simplebus_fill_ranges(phandle_t node, | int simplebus_fill_ranges(phandle_t node, | ||||
struct simplebus_softc *sc); | struct simplebus_softc *sc); | ||||
int simplebus_attach(device_t dev); | |||||
#endif /* _FDT_SIMPLEBUS_H */ | #endif /* _FDT_SIMPLEBUS_H */ |