Author: manu Date: Tue Dec 17 10:55:28 2019 New Revision: 355852 URL: https://svnweb.freebsd.org/changeset/base/355852
Log: arm64: rockchip: rk_pinctrl: Fix clear bits in SYSCON_MODIFY r351187 change the SYSCON_WRITE to SYSCON_MODIFY but didn't changed the mask variable that used to hold the bitmask in the upper 16 bits of the register that control which bits are changed. So we ended up clearing bit from the upper 16bits half which are always 0 after a read. Use the correct bit mask for bits that we want to clear. MFC after: 3 days Modified: head/sys/arm64/rockchip/rk_pinctrl.c Modified: head/sys/arm64/rockchip/rk_pinctrl.c ============================================================================== --- head/sys/arm64/rockchip/rk_pinctrl.c Tue Dec 17 10:26:44 2019 (r355851) +++ head/sys/arm64/rockchip/rk_pinctrl.c Tue Dec 17 10:55:28 2019 (r355852) @@ -882,7 +882,7 @@ rk_pinctrl_configure_pin(struct rk_pinctrl_softc *sc, reg += bank * 0x10 + ((pin / 8) * 0x4); bit = (pin % 8) * 2; - mask = (0x3 << bit) << 16; + mask = (0x3 << bit); SYSCON_MODIFY_4(syscon, reg, mask, bias << bit | (mask << 16)); } @@ -890,7 +890,7 @@ rk_pinctrl_configure_pin(struct rk_pinctrl_softc *sc, rv = rk_pinctrl_parse_drive(sc, pin_conf, bank, subbank, &drive, ®); if (rv == 0) { bit = (pin % 8) * 2; - mask = (0x3 << bit) << 16; + mask = (0x3 << bit); SYSCON_MODIFY_4(syscon, reg, mask, drive << bit | (mask << 16)); } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"