These changes previously appeared as part of a series "Add MVME3100 PPC SBC v2" back in November. David Gibson, who looked that that series, suggested getting this reviewed separately. There doesn't appear to be a listed maintainer for this code, so I'm addressing this to the 3 people who have made more than cosmetic changes to it. The most recent of these was in 2012.
This series replaces the ds1338 RTC with a model covering a number of these similar chips: ds1307, ds1337, ds1338, ds1339, ds1340, ds1375, ds1388, and ds3231. The limits of the new model are the same as the old. Only the time of day registers, and NVRAM are modeled. The alarm and control registers are not. I've added a more thorough test of the time of day function, covering reading and setting in both 12 and 24 hour mode. In the process I found two minor issues with the ds1338 model. These are described in the commit message for #3. So this series first adds those tests which pass with both old and new model. Then later adds some additional tests which only pass with the new model. Michael Davidsaver (5): timer: ds1338 add magic reset for test code tests: more thorough test of ds1338 timer: generalize Dallas/Maxim RTC i2c devices tests: ds-rtc-i2c-test test 12 hour mode and DoW tests: drop ds1338-test default-configs/arm-softmmu.mak | 2 +- hw/timer/Makefile.objs | 2 +- hw/timer/ds-rtc-i2c.c | 466 ++++++++++++++++++++++++++++++++++++++++ hw/timer/ds1338.c | 239 --------------------- tests/Makefile.include | 4 +- tests/ds-rtc-i2c-test.c | 245 +++++++++++++++++++++ tests/ds1338-test.c | 75 ------- 7 files changed, 715 insertions(+), 318 deletions(-) create mode 100644 hw/timer/ds-rtc-i2c.c delete mode 100644 hw/timer/ds1338.c create mode 100644 tests/ds-rtc-i2c-test.c delete mode 100644 tests/ds1338-test.c -- 2.11.0