From: Gabe Black Date: Wed, 25 Feb 2009 18:22:49 +0000 (-0800) Subject: Devices: Make the RTC device reflect the use of BCD in its status registers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a644931589499a444cafe8a7c6eeec614b8bdb7;p=gem5.git Devices: Make the RTC device reflect the use of BCD in its status registers. --- 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;