Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46395 )
Change subject: soc/mediatek/mt8192: add rtc MT6359P driver ......................................................................
Patch Set 53:
(3 comments)
https://review.coreboot.org/c/coreboot/+/46395/51//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46395/51//COMMIT_MSG@8 PS51, Line 8:
Done
We change the code for mt8173 and mt8183 for these two reasons. 1. Move rtc_read and rtc_write to SoC folder. - mt8173 and mt8183 accesses RTC via pmic wrapper. - mt8192 accesses RTC via PMIF.
2. Following functions can share with mt8192. Move them to common/. - rtc_lpen - rtc_powerkey_init - rtc_eosc_cali - rtc_osc_init
https://review.coreboot.org/c/coreboot/+/46395/53/src/soc/mediatek/common/in... File src/soc/mediatek/common/include/soc/rtc_common.h:
https://review.coreboot.org/c/coreboot/+/46395/53/src/soc/mediatek/common/in... PS53, Line 8: <soc/rtc.h> rtc.h
https://review.coreboot.org/c/coreboot/+/46395/51/src/soc/mediatek/common/rt... File src/soc/mediatek/common/rtc.c:
https://review.coreboot.org/c/coreboot/+/46395/51/src/soc/mediatek/common/rt... PS51, Line 47: int rtc_set(const struct rtc_time *time) : { : return -1; : } : : /* get rtc time */ : int rtc_get(struct rtc_time *time) : { : u16 value; : : rtc_read(RTC_TC_SEC, &value); : time->sec = value; : rtc_read(RTC_TC_MIN, &value); : time->min = value; : rtc_read(RTC_TC_HOU, &value); : time->hour = value; : rtc_read(RTC_TC_DOM, &value); : time->mday = value; : rtc_read(RTC_TC_MTH, &value); : time->mon = value; : rtc_read(RTC_TC_YEA, &value); : time->year = (value + RTC_MIN_YEAR_OFFSET) % 100; : : return 0; : } : these two functions is needed for src/include/rtc.h