aboutsummaryrefslogtreecommitdiff
path: root/core/hostservices.c
diff options
context:
space:
mode:
authorShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>2014-11-22 00:09:17 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2014-11-25 17:34:23 +1100
commit94c28c57e04df684c9c09b651937d7fbc7868b84 (patch)
tree19f45f62d103fcb1eec5a0d4890cf7cfd5e0bb98 /core/hostservices.c
parent73cd106cdfd9f6629e8ab720792f68d70ddf5b72 (diff)
downloadskiboot-94c28c57e04df684c9c09b651937d7fbc7868b84.zip
skiboot-94c28c57e04df684c9c09b651937d7fbc7868b84.tar.gz
skiboot-94c28c57e04df684c9c09b651937d7fbc7868b84.tar.bz2
occ/hbrt: Call stopOCC() for implementing reset OCC command from FSP
OPAL is expected to leave OCC stopped after receiving reset OCC message from FSP. FSP will send this either at boot before a load/start, or during runtime before load/start. If there is no subsequent load/start command, the OCC can be left stopped. After few attempts (runtime reset), FSP can just send reset and expect OPAL to leave OCC in stopped state. Call HBRT to stop OCC on FSP reset OCC command and acknowledge. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/hostservices.c')
-rw-r--r--core/hostservices.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/core/hostservices.c b/core/hostservices.c
index 85e62e3..0cd4b6a 100644
--- a/core/hostservices.c
+++ b/core/hostservices.c
@@ -758,6 +758,35 @@ int host_services_occ_start(void)
return rc;
}
+int host_services_occ_stop(void)
+{
+ struct proc_chip *chip;
+ int i, rc = 0, nr_chips=0;
+ uint64_t chipids[MAX_CHIPS];
+
+ prlog(PR_INFO, "HBRT: OCC Stop requested\n");
+
+ if (!(hservice_runtime && hservice_runtime->stopOCCs)) {
+ prerror("HBRT: No hservice_runtime->stopOCCs\n");
+ return -ENOENT;
+ }
+
+ for_each_chip(chip) {
+ chipids[nr_chips++] = chip->id;
+ }
+
+ for (i = 0; i < nr_chips; i++)
+ prlog(PR_TRACE, "HBRT: Calling stopOCC() for %04llx ",
+ chipids[i]);
+
+ /* Lets STOP all OCC */
+ rc = hservice_runtime->stopOCCs(chipids, nr_chips);
+ hservice_mark();
+ prlog(PR_DEBUG, "HBRT: stopOCCs() rc = %d\n", rc);
+ return rc;
+}
+
+
void host_services_occ_base_setup(void)
{
struct proc_chip *chip;