Date: Tue, 15 Nov 2016 04:49:26 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308669 - head/sys/powerpc/mpc85xx Message-ID: <201611150449.uAF4nQYp066872@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Tue Nov 15 04:49:26 2016 New Revision: 308669 URL: https://svnweb.freebsd.org/changeset/base/308669 Log: Write to the correct GPIO registers. Offset 0 is the direction register, not the data register. MFC after: 1 week Modified: head/sys/powerpc/mpc85xx/qoriq_gpio.c Modified: head/sys/powerpc/mpc85xx/qoriq_gpio.c ============================================================================== --- head/sys/powerpc/mpc85xx/qoriq_gpio.c Tue Nov 15 04:12:19 2016 (r308668) +++ head/sys/powerpc/mpc85xx/qoriq_gpio.c Tue Nov 15 04:49:26 2016 (r308669) @@ -173,7 +173,7 @@ qoriq_gpio_pin_set(device_t dev, uint32_ outvals = bus_read_4(sc->sc_mem, GPIO_GPDAT); outvals &= ~(1 << pinbit); outvals |= (value << pinbit); - bus_write_4(sc->sc_mem, 0, outvals); + bus_write_4(sc->sc_mem, GPIO_GPDAT, outvals); GPIO_UNLOCK(sc); @@ -208,7 +208,7 @@ qoriq_gpio_pin_toggle(device_t dev, uint val = bus_read_4(sc->sc_mem, GPIO_GPDAT); val ^= (1 << (31 - pin)); - bus_write_4(sc->sc_mem, 0, val); + bus_write_4(sc->sc_mem, GPIO_GPDAT, val); GPIO_UNLOCK(sc);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611150449.uAF4nQYp066872>