From 4a644931589499a444cafe8a7c6eeec614b8bdb7 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 25 Feb 2009 10:22:49 -0800 Subject: [PATCH] Devices: Make the RTC device reflect the use of BCD in its status registers. --- src/dev/mc146818.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dev/mc146818.cc b/src/dev/mc146818.cc index 7b219e30c..c01d945b3 100644 --- a/src/dev/mc146818.cc +++ b/src/dev/mc146818.cc @@ -49,7 +49,9 @@ MC146818::MC146818(EventManager *em, const string &n, const struct tm time, { memset(clock_data, 0, sizeof(clock_data)); stat_regA = RTCA_32768HZ | RTCA_1024HZ; - stat_regB = RTCB_PRDC_IE |RTCB_BIN | RTCB_24HR; + stat_regB = RTCB_PRDC_IE | RTCB_24HR; + if (!bcd) + stat_regB |= RTCB_BIN; year = time.tm_year; -- 2.30.2