aboutsummaryrefslogtreecommitdiff
path: root/hw/phb3.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-04 10:45:49 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-04 10:45:49 +1000
commit1a6b9f2396ea973c40ef0a97f74d977f72ae4af5 (patch)
tree903405fd4be53f4efa9b0b8c94990bb3222736ca /hw/phb3.c
parent1d880992fd8c8457a2d990ac6622cfd58fb1b261 (diff)
downloadskiboot-1a6b9f2396ea973c40ef0a97f74d977f72ae4af5.zip
skiboot-1a6b9f2396ea973c40ef0a97f74d977f72ae4af5.tar.gz
skiboot-1a6b9f2396ea973c40ef0a97f74d977f72ae4af5.tar.bz2
phb3: Don't try to enable CAPI without microcode
If the microcode load didn't work, don't try to enable CAPI mode on the PHB. (Patch originally from grimm@linux.vnet.ibm.com but submitted without proper cset or s-o-b before he went on vacation, so taking ownership) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'hw/phb3.c')
-rw-r--r--hw/phb3.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/phb3.c b/hw/phb3.c
index 5e51e71..d4004e0 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -2702,6 +2702,11 @@ static int64_t phb3_set_capi_mode(struct phb *phb, uint64_t mode,
if (mode != 1)
return OPAL_PARAMETER;
+ if (!p->capp_ucode_loaded) {
+ PHBERR(p, "capp ucode not loaded into capp unit\n");
+ return OPAL_HARDWARE;
+ }
+
/* poll cqstat */
for (i = 0; i < 500; i++) {
xscom_read(p->chip_id, p->pe_xscom + 0xf, &reg);