From 7593252cee8745bbf1b05deb2f4a5f742d36c412 Mon Sep 17 00:00:00 2001 From: Dimitris Papastamos Date: Tue, 28 Nov 2017 15:16:00 +0000 Subject: Add PubSub events for CPU powerdown/powerup The suspend hook is published at the start of a CPU powerdown operation. The resume hook is published at the end of a CPU powerup operation. Change-Id: I50c05e2dde0d33834095ac41b4fcea4c161bb434 Signed-off-by: Dimitris Papastamos --- lib/psci/psci_suspend.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/psci') diff --git a/lib/psci/psci_suspend.c b/lib/psci/psci_suspend.c index d9490672e..a77972d38 100644 --- a/lib/psci/psci_suspend.c +++ b/lib/psci/psci_suspend.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include "psci_private.h" @@ -68,6 +69,8 @@ static void psci_suspend_to_pwrdown_start(unsigned int end_pwrlvl, { unsigned int max_off_lvl = psci_find_max_off_lvl(state_info); + PUBLISH_EVENT(psci_suspend_pwrdown_start); + /* Save PSCI target power level for the suspend finisher handler */ psci_set_suspend_pwrlvl(end_pwrlvl); @@ -308,6 +311,8 @@ void psci_cpu_suspend_finish(unsigned int cpu_idx, /* Invalidate the suspend level for the cpu */ psci_set_suspend_pwrlvl(PSCI_INVALID_PWR_LVL); + PUBLISH_EVENT(psci_suspend_pwrdown_finish); + /* * Generic management: Now we just need to retrieve the * information that we had stashed away during the suspend -- cgit v1.2.3