Date: Sun, 26 Oct 2014 07:07:54 +0000 (UTC) From: Rui Paulo <rpaulo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r273686 - stable/10/sys/arm/ti Message-ID: <201410260707.s9Q77sd6023070@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rpaulo Date: Sun Oct 26 07:07:54 2014 New Revision: 273686 URL: https://svnweb.freebsd.org/changeset/base/273686 Log: MFC r273281: Style changes as pointed out by stas@. Modified: stable/10/sys/arm/ti/ti_wdt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/ti/ti_wdt.c ============================================================================== --- stable/10/sys/arm/ti/ti_wdt.c Sun Oct 26 06:04:09 2014 (r273685) +++ stable/10/sys/arm/ti/ti_wdt.c Sun Oct 26 07:07:54 2014 (r273686) @@ -98,12 +98,14 @@ DRIVER_MODULE(ti_wdt, simplebus, ti_wdt_ static volatile __inline uint32_t ti_wdt_reg_read(struct ti_wdt_softc *sc, uint32_t reg) { + return (bus_space_read_4(sc->sc_bt, sc->sc_bh, reg)); } static __inline void ti_wdt_reg_write(struct ti_wdt_softc *sc, uint32_t reg, uint32_t val) { + bus_space_write_4(sc->sc_bt, sc->sc_bh, reg, val); } @@ -113,14 +115,15 @@ ti_wdt_reg_write(struct ti_wdt_softc *sc static __inline void ti_wdt_reg_wait(struct ti_wdt_softc *sc, uint32_t bit) { + while (ti_wdt_reg_read(sc, TI_WDT_WWPS) & bit) DELAY(10); - } static __inline void ti_wdt_disable(struct ti_wdt_softc *sc) { + DPRINTF("disabling watchdog %p\n", sc); ti_wdt_reg_write(sc, TI_WDT_WSPR, 0xAAAA); ti_wdt_reg_wait(sc, TI_W_PEND_WSPR); @@ -131,6 +134,7 @@ ti_wdt_disable(struct ti_wdt_softc *sc) static __inline void ti_wdt_enable(struct ti_wdt_softc *sc) { + DPRINTF("enabling watchdog %p\n", sc); ti_wdt_reg_write(sc, TI_WDT_WSPR, 0xBBBB); ti_wdt_reg_wait(sc, TI_W_PEND_WSPR);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410260707.s9Q77sd6023070>