[Pdbg] [PATCH 03/10] libpdbg/p9chip.c: use the OTR special wakeup status latch
Nicholas Piggin
npiggin at gmail.com
Tue May 1 22:00:38 AEST 2018
Use this to poll for special wakeup done (like skiboot does with
the HYP register).
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
libpdbg/p9chip.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c
index 85416ae..51d6db5 100644
--- a/libpdbg/p9chip.c
+++ b/libpdbg/p9chip.c
@@ -63,6 +63,7 @@
#define NET_CTRL0_WOR 0xf0042
#define PPM_GPMMR 0xf0100
#define PPM_SPWKUP_OTR 0xf010a
+#define PPM_SSHOTR 0xf0113
#define SPECIAL_WKUP_DONE PPC_BIT(1)
#define RAS_STATUS_TIMEOUT 100 /* 100ms */
@@ -315,7 +316,7 @@ static int p9_core_probe(struct pdbg_target *target)
CHECK_ERR(pib_write(target, PPM_SPWKUP_OTR, PPC_BIT(0)));
do {
usleep(1000);
- CHECK_ERR(pib_read(target, PPM_GPMMR, &value));
+ CHECK_ERR(pib_read(target, PPM_SSHOTR, &value));
if (i++ > SPECIAL_WKUP_TIMEOUT) {
PR_ERROR("Timeout waiting for special wakeup on %s at 0x%08" PRIx64 "\n", target->name,
--
2.17.0
More information about the Pdbg
mailing list