MFC: sys/sparc64/central/central.c 1.11, sys/sparc64/ebus/ebus.c 1.25 (partial),
sys/sparc64/fhc/fhc_central.c 1.10, sys/sparc64/fhc/fhc_nexus.c 1.9, sys/sparc64/pci/psycho.c 1.59, sys/sparc64/sbus/dma_sbus.c 1.3 - 1.4, sys/sparc64/sbus/sbus.c 1.37 - Register the generic implementations for the device shutdown, suspend and resume methods so these events propagate through the device driver hierarchy. - Remove dma_setup_intr() (was commented out in RELENG_6).
This commit is contained in:
parent
fdc4af4670
commit
4a0340a5b3
@ -77,6 +77,9 @@ static device_method_t central_methods[] = {
|
||||
/* Device interface. */
|
||||
DEVMETHOD(device_probe, central_probe),
|
||||
DEVMETHOD(device_attach, central_attach),
|
||||
DEVMETHOD(device_shutdown, bus_generic_shutdown),
|
||||
DEVMETHOD(device_suspend, bus_generic_suspend),
|
||||
DEVMETHOD(device_resume, bus_generic_resume),
|
||||
|
||||
/* Bus interface. */
|
||||
DEVMETHOD(bus_print_child, central_print_child),
|
||||
|
@ -125,6 +125,9 @@ static device_method_t ebus_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, ebus_probe),
|
||||
DEVMETHOD(device_attach, ebus_attach),
|
||||
DEVMETHOD(device_shutdown, bus_generic_shutdown),
|
||||
DEVMETHOD(device_suspend, bus_generic_suspend),
|
||||
DEVMETHOD(device_resume, bus_generic_resume),
|
||||
|
||||
/* Bus interface */
|
||||
DEVMETHOD(bus_print_child, ebus_print_child),
|
||||
|
@ -51,6 +51,9 @@ static device_method_t fhc_central_methods[] = {
|
||||
/* Device interface. */
|
||||
DEVMETHOD(device_probe, fhc_central_probe),
|
||||
DEVMETHOD(device_attach, fhc_central_attach),
|
||||
DEVMETHOD(device_shutdown, bus_generic_shutdown),
|
||||
DEVMETHOD(device_suspend, bus_generic_suspend),
|
||||
DEVMETHOD(device_resume, bus_generic_resume),
|
||||
|
||||
/* Bus interface. */
|
||||
DEVMETHOD(bus_print_child, fhc_print_child),
|
||||
|
@ -54,6 +54,9 @@ static device_method_t fhc_nexus_methods[] = {
|
||||
/* Device interface. */
|
||||
DEVMETHOD(device_probe, fhc_nexus_probe),
|
||||
DEVMETHOD(device_attach, fhc_nexus_attach),
|
||||
DEVMETHOD(device_shutdown, bus_generic_shutdown),
|
||||
DEVMETHOD(device_suspend, bus_generic_suspend),
|
||||
DEVMETHOD(device_resume, bus_generic_resume),
|
||||
|
||||
/* Bus interface. */
|
||||
DEVMETHOD(bus_print_child, fhc_print_child),
|
||||
|
@ -124,6 +124,9 @@ static device_method_t psycho_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, psycho_probe),
|
||||
DEVMETHOD(device_attach, psycho_attach),
|
||||
DEVMETHOD(device_shutdown, bus_generic_shutdown),
|
||||
DEVMETHOD(device_suspend, bus_generic_suspend),
|
||||
DEVMETHOD(device_resume, bus_generic_resume),
|
||||
|
||||
/* Bus interface */
|
||||
DEVMETHOD(bus_print_child, bus_generic_print_child),
|
||||
|
@ -109,9 +109,6 @@ static device_attach_t dma_attach;
|
||||
static bus_print_child_t dma_print_child;
|
||||
static bus_probe_nomatch_t dma_probe_nomatch;
|
||||
static bus_get_resource_list_t dma_get_resource_list;
|
||||
#if 0
|
||||
static bus_setup_intr_t dma_setup_intr;
|
||||
#endif
|
||||
static ofw_bus_get_compat_t dma_get_compat;
|
||||
static ofw_bus_get_model_t dma_get_model;
|
||||
static ofw_bus_get_name_t dma_get_name;
|
||||
@ -125,15 +122,14 @@ static device_method_t dma_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, dma_probe),
|
||||
DEVMETHOD(device_attach, dma_attach),
|
||||
DEVMETHOD(device_shutdown, bus_generic_shutdown),
|
||||
DEVMETHOD(device_suspend, bus_generic_suspend),
|
||||
DEVMETHOD(device_resume, bus_generic_resume),
|
||||
|
||||
/* Bus interface */
|
||||
DEVMETHOD(bus_print_child, dma_print_child),
|
||||
DEVMETHOD(bus_probe_nomatch, dma_probe_nomatch),
|
||||
#if 0
|
||||
DEVMETHOD(bus_setup_intr, dma_setup_intr),
|
||||
#else
|
||||
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
|
||||
#endif
|
||||
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
|
||||
DEVMETHOD(bus_alloc_resource, bus_generic_rl_alloc_resource),
|
||||
DEVMETHOD(bus_release_resource, bus_generic_rl_release_resource),
|
||||
@ -188,7 +184,6 @@ dma_attach(device_t dev)
|
||||
int error, burst, children;
|
||||
|
||||
dsc = device_get_softc(dev);
|
||||
bzero(dsc, sizeof(struct dma_softc));
|
||||
lsc = &dsc->sc_lsi64854;
|
||||
|
||||
name = ofw_bus_get_name(dev);
|
||||
@ -439,27 +434,6 @@ dma_get_resource_list(device_t dev, device_t child)
|
||||
return (&ddi->ddi_rl);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int
|
||||
dma_setup_intr(device_t dev, device_t child, struct resource *ires, int flags,
|
||||
driver_intr_t *intr, void *arg, void **cookiep)
|
||||
{
|
||||
struct lsi64854_softc *sc;
|
||||
|
||||
sc = (struct lsi64854_softc *)device_get_softc(dev);
|
||||
/* XXX - for now only le; do ESP later */
|
||||
if (sc->sc_channel == L64854_CHANNEL_ENET) {
|
||||
sc->sc_intrchain = intr;
|
||||
sc->sc_intrchainarg = arg;
|
||||
intr = (driver_intr_t *)lsi64854_enet_intr;
|
||||
arg = sc;
|
||||
}
|
||||
|
||||
return (BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags,
|
||||
intr, arg, cookiep));
|
||||
}
|
||||
#endif
|
||||
|
||||
static const char *
|
||||
dma_get_compat(device_t bus, device_t dev)
|
||||
{
|
||||
|
@ -225,6 +225,9 @@ static device_method_t sbus_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, sbus_probe),
|
||||
DEVMETHOD(device_attach, sbus_attach),
|
||||
DEVMETHOD(device_shutdown, bus_generic_shutdown),
|
||||
DEVMETHOD(device_suspend, bus_generic_suspend),
|
||||
DEVMETHOD(device_resume, bus_generic_resume),
|
||||
|
||||
/* Bus interface */
|
||||
DEVMETHOD(bus_print_child, sbus_print_child),
|
||||
|
Loading…
Reference in New Issue
Block a user