diff mbox series

[3/3] libpdbg: For p10 do not assert special wakeup for core by default

Message ID 20220128061221.1054173-4-amitay@ozlabs.org
State Accepted
Headers show
Series Add long/short running application context | expand

Checks

Context Check Description
snowpatch_ozlabs/github-CI success Successfully ran 1 jobs.
snowpatch_ozlabs/github-build_and_test success Successfully ran 1 jobs.

Commit Message

Amitay Isaacs Jan. 28, 2022, 6:12 a.m. UTC
For p10 systems, the default behaviour (for long running bmc applications)
of libpdbg is to not assert special wakeup, as the applications are not
supposed to use special wakeup.  So only assert special wakeup if
running short applications such as pdbg tool.

Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/p10chip.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/libpdbg/p10chip.c b/libpdbg/p10chip.c
index f5c3b9f..e0d9ee2 100644
--- a/libpdbg/p10chip.c
+++ b/libpdbg/p10chip.c
@@ -200,6 +200,16 @@  static int p10_core_probe(struct pdbg_target *target)
 	uint64_t value;
 	int i = 0;
 
+	/*
+	 * BMC applications using libpdbg, do not need special wakeup
+	 * asserted by default. Only when running pdbg tool or equivalent
+	 * assert special wakeup.
+	 */
+	if (!pdbg_context_is_short()) {
+		core->release_spwkup = false;
+		return 0;
+	}
+
 	CHECK_ERR(pib_write(target, QME_SPWU_FSP, PPC_BIT(0)));
 	do {
 		usleep(1000);