[Skiboot] [PATCH] hw/chiptod: test QUIRK_NO_CHIPTOD in opal_resync_timebase

Nicholas Piggin npiggin at gmail.com
Wed Aug 8 22:13:40 AEST 2018


This allows some test coverage of deep stop states in Linux with
Mambo.

Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
 hw/chiptod.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/chiptod.c b/hw/chiptod.c
index df1274ca..97c8b8dd 100644
--- a/hw/chiptod.c
+++ b/hw/chiptod.c
@@ -1601,6 +1601,10 @@ error_out:
 
 static int64_t opal_resync_timebase(void)
 {
+	/* Mambo and qemu doesn't simulate the chiptod */
+	if (chip_quirk(QUIRK_NO_CHIPTOD))
+		return OPAL_SUCCESS;
+
 	if (!chiptod_wakeup_resync()) {
 		prerror("OPAL: Resync timebase failed on CPU 0x%04x\n",
 			this_cpu()->pir);
-- 
2.17.0



More information about the Skiboot mailing list