Date: Sun, 19 Jan 2014 07:44:14 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r260877 - projects/pmac_pmu/sys/powerpc/powermac Message-ID: <201401190744.s0J7iE24085192@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Sun Jan 19 07:44:14 2014 New Revision: 260877 URL: http://svnweb.freebsd.org/changeset/base/260877 Log: With the new bus suspend/resume, the buses don't need to be explicitly suspended and resumed, so remove the calls. Modified: projects/pmac_pmu/sys/powerpc/powermac/macio.c projects/pmac_pmu/sys/powerpc/powermac/uninorth.c Modified: projects/pmac_pmu/sys/powerpc/powermac/macio.c ============================================================================== --- projects/pmac_pmu/sys/powerpc/powermac/macio.c Sun Jan 19 07:43:02 2014 (r260876) +++ projects/pmac_pmu/sys/powerpc/powermac/macio.c Sun Jan 19 07:44:14 2014 (r260877) @@ -665,18 +665,9 @@ macio_enable_wireless(device_t dev, bool static int macio_suspend(device_t dev) { - int error; uint32_t temp; struct macio_softc *sc = device_get_softc(dev); - error = bus_generic_suspend(dev); - - if (error) - return (error); - - if (bus_current_pass != BUS_PASS_BUS) { - return (EAGAIN); - } powerpc_sync(); sc->saved_fcrs[0] = bus_read_4(sc->sc_memr, KEYLARGO_FCR0); @@ -745,20 +736,18 @@ static int macio_resume(device_t dev) { struct macio_softc *sc = device_get_softc(dev); - if (bus_current_pass == BUS_PASS_BUS) { - if (sc->sc_devid == 0x22) - bus_write_4(sc->sc_memr, KEYLARGO_MEDIABAY, sc->saved_mbcr); - - bus_write_4(sc->sc_memr, KEYLARGO_FCR0, sc->saved_fcrs[0]); - bus_write_4(sc->sc_memr, KEYLARGO_FCR1, sc->saved_fcrs[1]); - bus_write_4(sc->sc_memr, KEYLARGO_FCR2, sc->saved_fcrs[2]); - bus_write_4(sc->sc_memr, KEYLARGO_FCR3, sc->saved_fcrs[3]); - bus_write_4(sc->sc_memr, KEYLARGO_FCR4, sc->saved_fcrs[4]); - bus_write_4(sc->sc_memr, KEYLARGO_FCR5, sc->saved_fcrs[5]); - } + if (sc->sc_devid == 0x22) + bus_write_4(sc->sc_memr, KEYLARGO_MEDIABAY, sc->saved_mbcr); + + bus_write_4(sc->sc_memr, KEYLARGO_FCR0, sc->saved_fcrs[0]); + bus_write_4(sc->sc_memr, KEYLARGO_FCR1, sc->saved_fcrs[1]); + bus_write_4(sc->sc_memr, KEYLARGO_FCR2, sc->saved_fcrs[2]); + bus_write_4(sc->sc_memr, KEYLARGO_FCR3, sc->saved_fcrs[3]); + bus_write_4(sc->sc_memr, KEYLARGO_FCR4, sc->saved_fcrs[4]); + bus_write_4(sc->sc_memr, KEYLARGO_FCR5, sc->saved_fcrs[5]); /* Let things settle. */ DELAY(1000); - return (bus_generic_resume(dev)); + return (0); } Modified: projects/pmac_pmu/sys/powerpc/powermac/uninorth.c ============================================================================== --- projects/pmac_pmu/sys/powerpc/powermac/uninorth.c Sun Jan 19 07:43:02 2014 (r260876) +++ projects/pmac_pmu/sys/powerpc/powermac/uninorth.c Sun Jan 19 07:44:14 2014 (r260877) @@ -649,15 +649,7 @@ unin_chip_suspend(device_t dev) { int error; - error = bus_generic_suspend(dev); - - if (error) - return (error); - - if (bus_current_pass == BUS_PASS_BUS) - error = unin_chip_sleep(dev, 0); - else - error = EAGAIN; + error = unin_chip_sleep(dev, 0); return (error); } @@ -666,10 +658,9 @@ static int unin_chip_resume(device_t dev) { - if (bus_current_pass == BUS_PASS_BUS) - unin_chip_wake(dev); + unin_chip_wake(dev); - return (bus_generic_resume(dev)); + return (0); } int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401190744.s0J7iE24085192>