<tt><font size=2>> So is pm_complex replacement to occ_reset?<br>All of the occ_* interfaces have been replaced with interfaces that act
upon the complete power management complex (occ + sgpe + pgpe).</font></tt><br><font size=2 face="sans-serif"><br>--<br>Dan Crowell<br>Senior Software Engineer - Power Systems Enablement Firmware<br>IBM Rochester: t/l 553-2987<br>dcrowell@us.ibm.com</font><br><br><br><br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Vasant Hegde <hegdevasant@linux.vnet.ibm.com></font><br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">Jeremy Kerr <jk@ozlabs.org>,
skiboot@lists.ozlabs.org</font><br><font size=1 color=#5f5f5f face="sans-serif">Cc:
</font><font size=1 face="sans-serif">Daniel M Crowell/Rochester/IBM@IBMUS</font><br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">05/25/2017 11:47 AM</font><br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">Re: [Skiboot]
[PATCH RFC 12/12] opal-prd: hook up reset_pm_complex</font><br><hr noshade><br><br><br><tt><font size=2>On 05/25/2017 12:35 PM, Jeremy Kerr wrote:<br>> This change provides the facility to invoke HBRT's reset_pm_complex,
in<br><br>So is pm_complete replacement to occ_reset?<br><br>> the same manner is done with process_occ_reset previously.<br>><br><br>.../...<br><br>> void hservice_puts(const char *str)<br>> {<br>> @@ -1310,22 +1311,40 @@ static int handle_msg_occ_error(struct opal_prd_ctx
*ctx,<br>>
return 0;<br>> }<br>><br>> +static int pm_complex_reset(uint64_t chip)<br>> +{<br>> +
int rc;<br>> +<br>> +
if (hservice_runtime->reset_pm_complex(chip)) {<br><br>if (hservice_runtime->reset_pm_complex) { ?<br><br>> +
pr_debug("PM:
calling pm_complex_reset(%ld)", chip);<br>> +
rc
= call_reset_pm_complex(chip);<br>> +<br>> +
} else if (hservice_runtime->process_occ_reset) {<br>> +
pr_debug("PM:
calling process_occ_reset(%ld)", chip);<br>> +
call_process_occ_reset(chip);<br>> +
rc
= 0;<br>> +<br>> +
} else {<br>> +
pr_log_nocall("reset_pm_complex/process_occ_reset");<br>> +
rc
= -1;<br>> +
}<br>> +<br>> +
return rc;<br>> +}<br>> +<br>> static int handle_msg_occ_reset(struct opal_prd_ctx *ctx,<br>>
struct
opal_prd_msg *msg)<br>> {<br>>
uint32_t proc;<br>> +
int rc;<br>><br>>
proc = be64toh(msg->occ_reset.chip);<br>><br>>
pr_debug("FW: firmware requested OCC reset for proc 0x%x", proc);<br>><br>> -
if (!hservice_runtime->process_occ_reset) {<br>> -
pr_log_nocall("process_occ_reset");<br>> -
return
-1;<br>> -
}<br>> +
rc = pm_complex_reset(proc);<br>><br>> -
call_process_occ_reset(proc);<br>> -
return 0;<br>> +
return rc;<br>> }<br>><br>> static int handle_msg_firmware_notify(struct opal_prd_ctx *ctx,<br>> @@ -1482,15 +1501,12 @@ static void handle_prd_control_occ_reset(struct
control_msg *send_msg,<br>>
if (rc != sizeof(omsg))<br>>
pr_log(LOG_WARNING,
"FW: Failed to send OCC_RESET message: %m");<br>><br>> -
if (!hservice_runtime->process_occ_reset) {<br>> -
pr_log_nocall("process_occ_reset");<br>> -
return;<br>> -
}<br>> -<br>>
chip = msg->occ_reset.chip;<br>><br>> -
pr_debug("CTRL: calling process_occ_reset(%ld)", chip);<br>> -
call_process_occ_reset(chip);<br>> +
/* do reset */<br>> +
pr_debug("CTRL: resetting PM complex on chip %ld", chip);<br>> +
pm_complex_reset(chip);<br>> +<br>>
send_msg->data_len = 0;<br>>
send_msg->response = 0;<br>> }<br>> @@ -2175,6 +2191,7 @@ static void usage(const char *progname)<br>>
printf("\t%s [--debug] [--file <hbrt-image>] [--pnor <device>]\n",<br>>
progname);<br>>
printf("\t%s occ <enable|disable|reset [chip]>\n", progname);<br>> +
printf("\t%s pm-complex reset [chip]>\n", progname);<br>>
printf("\t%s htmgt-passthru <bytes...>\n", progname);<br>>
printf("\t%s override <FILE>\n", progname);<br>>
printf("\t%s run [arg 0] [arg 1]..[arg n]\n", progname);<br>> @@ -2216,7 +2233,7 @@ static int parse_action(const char *str, enum
action *action)<br>> {<br>>
int rc;<br>><br>> -
if (!strcmp(str, "occ")) {<br>> +
if (!strcmp(str, "occ") || !strcmp(str, "pm-complex"))
{<br><br>Help says only reset option is supported. But this will enable other options
<br>like enable, disable.<br><br>-Vasant<br><br></font></tt><br><br><BR>