Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bhnd/cores/chipc/chipc.c
Show First 20 Lines • Show All 590 Lines • ▼ Show 20 Lines | chipc_print_child(device_t dev, device_t child) | ||||
} | } | ||||
retval += bus_print_child_domain(dev, child); | retval += bus_print_child_domain(dev, child); | ||||
retval += bus_print_child_footer(dev, child); | retval += bus_print_child_footer(dev, child); | ||||
return (retval); | return (retval); | ||||
} | } | ||||
static int | |||||
chipc_child_pnpinfo_str(device_t dev, device_t child, char *buf, | |||||
size_t buflen) | |||||
{ | |||||
if (buflen == 0) | |||||
return (EOVERFLOW); | |||||
*buf = '\0'; | |||||
return (0); | |||||
} | |||||
static int | |||||
chipc_child_location_str(device_t dev, device_t child, char *buf, | |||||
size_t buflen) | |||||
{ | |||||
if (buflen == 0) | |||||
return (EOVERFLOW); | |||||
*buf = '\0'; | |||||
return (ENXIO); | |||||
} | |||||
static device_t | static device_t | ||||
chipc_add_child(device_t dev, u_int order, const char *name, int unit) | chipc_add_child(device_t dev, u_int order, const char *name, int unit) | ||||
{ | { | ||||
struct chipc_softc *sc; | struct chipc_softc *sc; | ||||
struct chipc_devinfo *dinfo; | struct chipc_devinfo *dinfo; | ||||
device_t child; | device_t child; | ||||
sc = device_get_softc(dev); | sc = device_get_softc(dev); | ||||
▲ Show 20 Lines • Show All 778 Lines • ▼ Show 20 Lines | static device_method_t chipc_methods[] = { | ||||
DEVMETHOD(device_attach, chipc_attach), | DEVMETHOD(device_attach, chipc_attach), | ||||
DEVMETHOD(device_detach, chipc_detach), | DEVMETHOD(device_detach, chipc_detach), | ||||
DEVMETHOD(device_suspend, chipc_suspend), | DEVMETHOD(device_suspend, chipc_suspend), | ||||
DEVMETHOD(device_resume, chipc_resume), | DEVMETHOD(device_resume, chipc_resume), | ||||
/* Bus interface */ | /* Bus interface */ | ||||
DEVMETHOD(bus_probe_nomatch, chipc_probe_nomatch), | DEVMETHOD(bus_probe_nomatch, chipc_probe_nomatch), | ||||
DEVMETHOD(bus_print_child, chipc_print_child), | DEVMETHOD(bus_print_child, chipc_print_child), | ||||
DEVMETHOD(bus_child_pnpinfo_str, chipc_child_pnpinfo_str), | |||||
DEVMETHOD(bus_child_location_str, chipc_child_location_str), | |||||
DEVMETHOD(bus_add_child, chipc_add_child), | DEVMETHOD(bus_add_child, chipc_add_child), | ||||
DEVMETHOD(bus_child_deleted, chipc_child_deleted), | DEVMETHOD(bus_child_deleted, chipc_child_deleted), | ||||
DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), | DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), | ||||
DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), | DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), | ||||
DEVMETHOD(bus_delete_resource, bus_generic_rl_delete_resource), | DEVMETHOD(bus_delete_resource, bus_generic_rl_delete_resource), | ||||
DEVMETHOD(bus_alloc_resource, chipc_alloc_resource), | DEVMETHOD(bus_alloc_resource, chipc_alloc_resource), | ||||
Show All 30 Lines |