mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
hw/rtc: Rename rtc_[get|set]_memory -> mc146818rtc_[get|set]_cmos_data
rtc_get_memory() and rtc_set_memory() helpers only work with TYPE_MC146818_RTC devices. 'memory' in their name refer to the CMOS region. Rename them as mc146818rtc_get_cmos_data() and mc146818rtc_set_cmos_data() to be explicit about what they are doing. Mechanical change doing: $ sed -i -e 's/rtc_set_memory/mc146818rtc_set_cmos_data/g' \ $(git grep -wl rtc_set_memory) $ sed -i -e 's/rtc_get_memory/mc146818rtc_get_cmos_data/g' \ $(git grep -wl rtc_get_memory) Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230210233116.80311-4-philmd@linaro.org>
This commit is contained in:
parent
55c86cb803
commit
2d4bd81e39
6 changed files with 51 additions and 51 deletions
|
@ -215,10 +215,10 @@ static int prep_set_cmos_checksum(DeviceState *dev, void *opaque)
|
|||
|
||||
if (object_dynamic_cast(OBJECT(dev), TYPE_MC146818_RTC)) {
|
||||
MC146818RtcState *rtc = MC146818_RTC(dev);
|
||||
rtc_set_memory(rtc, 0x2e, checksum & 0xff);
|
||||
rtc_set_memory(rtc, 0x3e, checksum & 0xff);
|
||||
rtc_set_memory(rtc, 0x2f, checksum >> 8);
|
||||
rtc_set_memory(rtc, 0x3f, checksum >> 8);
|
||||
mc146818rtc_set_cmos_data(rtc, 0x2e, checksum & 0xff);
|
||||
mc146818rtc_set_cmos_data(rtc, 0x3e, checksum & 0xff);
|
||||
mc146818rtc_set_cmos_data(rtc, 0x2f, checksum >> 8);
|
||||
mc146818rtc_set_cmos_data(rtc, 0x3f, checksum >> 8);
|
||||
|
||||
object_property_add_alias(qdev_get_machine(), "rtc-time", OBJECT(rtc),
|
||||
"date");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue