Rex-BC Chen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59653 )
Change subject: soc/medaitek/mt8186: fix wrong condition of RTC drivers ......................................................................
soc/medaitek/mt8186: fix wrong condition of RTC drivers
We need to report error while rtc_xosc_write() returns false.
TEST=error logs for RTC disappear BUG=b:202871018
Signed-off-by: Rex-BC Chen rex-bc.chen@mediatek.com Change-Id: I5fdf4de0383ef373dd45e8d8741aa861c9c4bdc6 --- M src/soc/mediatek/mt8186/rtc.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/59653/1
diff --git a/src/soc/mediatek/mt8186/rtc.c b/src/soc/mediatek/mt8186/rtc.c index 346fca6..f607420 100644 --- a/src/soc/mediatek/mt8186/rtc.c +++ b/src/soc/mediatek/mt8186/rtc.c @@ -88,7 +88,7 @@ }
rtc_read(RTC_OSC32CON, &osc32con); - if (rtc_xosc_write((osc32con & ~RTC_XOSCCALI_MASK) | + if (!rtc_xosc_write((osc32con & ~RTC_XOSCCALI_MASK) | (val & RTC_XOSCCALI_MASK))) { rtc_info("rtc_xosc_write() failed\n"); return false;