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
This commit is contained in:
parent
9520071f7e
commit
3df0c02623
@ -882,7 +882,7 @@ rk_pinctrl_configure_pin(struct rk_pinctrl_softc *sc, uint32_t *pindata)
|
||||
|
||||
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, uint32_t *pindata)
|
||||
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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user