bug in rk_tsadc.c causes reboot
titus <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.arm |
|---|---|
| Message-ID | <[email protected]> |
/sys/arm64/rockchip/rk_tsadc.c#L486 in the first line should be tsadc_temp_to_raw instead of tsadc_raw_to_temp the way its set for the alarm value writing a bogus value causes a reboot when shutdown_mode is 0 (cru) on rk3566. could cause the same effect on other boards too val = tsadc_raw_to_temp(sc, sc->shutdown_temp); WR4(sc, TSADC_COMP_SHUT(sensor->channel), val); val = RD4(sc, TSADC_AUTO_CON); val |= TSADC_AUTO_SRC_EN(sensor->channel); WR4(sc, TSADC_AUTO_CON, val); /* Alarm temperature */ val = tsadc_temp_to_raw(sc, sc->alarm_temp); WR4(sc, TSADC_COMP_INT(sensor->channel), val); val = RD4(sc, TSADC_INT_EN); val |= TSADC_COMP_INT_SRC_EN(sensor->channel); WR4(sc, TSADC_INT_EN, val);