diff options
author | Thomas Huth <thuth@redhat.com> | 2018-02-12 13:35:41 +0100 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2018-02-14 11:43:42 +0100 |
commit | 02f4fbecb93da2125d22d3f0b62c6ee44aea84d4 (patch) | |
tree | da8e76eecf805e31e278a592546e48ad0a76ac69 /tests/m48t59-test.c | |
parent | 9697ce405f07c055f8a1f0c7b0873ed222a12576 (diff) |
tests/m48t59: Use the m48t59 test on ppc, too
The ref405ep machine has a memory-mapped m48t59 device, so
we can run the m48t59 test on this machine, too.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/m48t59-test.c')
-rw-r--r-- | tests/m48t59-test.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/m48t59-test.c b/tests/m48t59-test.c index 8c25467828..26af7d6e8e 100644 --- a/tests/m48t59-test.c +++ b/tests/m48t59-test.c @@ -28,6 +28,7 @@ static uint32_t base; static uint16_t reg_base = 0x1ff0; /* 0x7f0 for m48t02 */ static int base_year; +static const char *base_machine; static bool use_mmio; static uint8_t cmos_read_mmio(QTestState *s, uint8_t reg) @@ -145,7 +146,7 @@ static void cmos_get_date_time(QTestState *s, struct tm *date) static QTestState *m48t59_qtest_start(void) { - return qtest_init("-rtc clock=vm"); + return qtest_startf("-M %s -rtc clock=vm", base_machine); } static void bcd_check_time(void) @@ -241,6 +242,12 @@ static void base_setup(void) /* Note: For sparc64, we'd need to map-in the PCI bridge memory first */ base = 0x71200000; base_year = 1968; + base_machine = "SS-5"; + use_mmio = true; + } else if (g_str_equal(arch, "ppc") || g_str_equal(arch, "ppc64")) { + base = 0xF0000000; + base_year = 1968; + base_machine = "ref405ep"; use_mmio = true; } else { g_assert_not_reached(); |