Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/fdt/simplebus.c
Show All 40 Lines | |||||
#include <dev/fdt/simplebus.h> | #include <dev/fdt/simplebus.h> | ||||
/* | /* | ||||
* Bus interface. | * Bus interface. | ||||
*/ | */ | ||||
static int simplebus_probe(device_t dev); | static int simplebus_probe(device_t dev); | ||||
static int simplebus_attach(device_t dev); | static int simplebus_attach(device_t dev); | ||||
static struct resource *simplebus_alloc_resource(device_t, device_t, int, | static struct resource *simplebus_alloc_resource(device_t, device_t, int, | ||||
int *, u_long, u_long, u_long, u_int); | int *, rman_res_t, rman_res_t, rman_res_t, u_int); | ||||
static void simplebus_probe_nomatch(device_t bus, device_t child); | static void simplebus_probe_nomatch(device_t bus, device_t child); | ||||
static int simplebus_print_child(device_t bus, device_t child); | static int simplebus_print_child(device_t bus, device_t child); | ||||
static device_t simplebus_add_child(device_t dev, u_int order, | static device_t simplebus_add_child(device_t dev, u_int order, | ||||
const char *name, int unit); | const char *name, int unit); | ||||
static struct resource_list *simplebus_get_resource_list(device_t bus, | static struct resource_list *simplebus_get_resource_list(device_t bus, | ||||
device_t child); | device_t child); | ||||
/* | /* | ||||
* ofw_bus interface | * ofw_bus interface | ||||
▲ Show 20 Lines • Show All 259 Lines • ▼ Show 20 Lines | simplebus_get_resource_list(device_t bus __unused, device_t child) | ||||
ndi = device_get_ivars(child); | ndi = device_get_ivars(child); | ||||
if (ndi == NULL) | if (ndi == NULL) | ||||
return (NULL); | return (NULL); | ||||
return (&ndi->rl); | return (&ndi->rl); | ||||
} | } | ||||
static struct resource * | static struct resource * | ||||
simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, | simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, | ||||
u_long start, u_long end, u_long count, u_int flags) | rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) | ||||
{ | { | ||||
struct simplebus_softc *sc; | struct simplebus_softc *sc; | ||||
struct simplebus_devinfo *di; | struct simplebus_devinfo *di; | ||||
struct resource_list_entry *rle; | struct resource_list_entry *rle; | ||||
int j; | int j; | ||||
sc = device_get_softc(bus); | sc = device_get_softc(bus); | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |