summaryrefslogtreecommitdiff
path: root/src/drivers/pc80/rtc
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2024-07-16 11:05:59 +0800
committerYu-Ping Wu <yupingso@google.com>2024-07-18 08:14:52 +0000
commitb9a52a4c8d5e6a3ba912304ff2570f209efb330d (patch)
treea515b5cc2a3c24839e240cc0ae138b0511823863 /src/drivers/pc80/rtc
parent41723aee678b2ebc99be5ff064cdd23b25922bdf (diff)
drivers/pc80/rtc/mc146818rtc: Use macros for CMOS addresses
Replace integer literals with macros for CMOS addresses for readability. Change-Id: I454662c90fabb41af864728febdefa57f5ff2cb2 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83477 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/drivers/pc80/rtc')
-rw-r--r--src/drivers/pc80/rtc/mc146818rtc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/pc80/rtc/mc146818rtc.c b/src/drivers/pc80/rtc/mc146818rtc.c
index 6474ecbd1a..b4ddadd4f7 100644
--- a/src/drivers/pc80/rtc/mc146818rtc.c
+++ b/src/drivers/pc80/rtc/mc146818rtc.c
@@ -97,9 +97,9 @@ static bool __cmos_init(bool invalid)
if (invalid || cmos_invalid || checksum_invalid) {
if (!CONFIG(USE_OPTION_TABLE)) {
- cmos_write(0, 0x01);
- cmos_write(0, 0x03);
- cmos_write(0, 0x05);
+ cmos_write(0, RTC_CLK_SECOND_ALARM);
+ cmos_write(0, RTC_CLK_MINUTE_ALARM);
+ cmos_write(0, RTC_CLK_HOUR_ALARM);
for (i = 10; i < 128; i++)
cmos_write(0, i);
cleared_cmos = true;