diff mbox

[2/3] phb4: Fix config space enable bits on DD1

Message ID 20161116054925.20568-2-mikey@neuling.org
State Accepted
Headers show

Commit Message

Michael Neuling Nov. 16, 2016, 5:49 a.m. UTC
Fix enabling config space on DD1.

Without this PCI devices disappear on kexec.

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 hw/phb4.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/hw/phb4.c b/hw/phb4.c
index 3ebd303985..d6960d4e25 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -277,6 +277,9 @@  static int64_t phb4_rc_write(struct phb4 *p, uint32_t offset, uint8_t sz,
 		break;
 	default:
 		/* XXX Add ASB support ? */
+		/* Workaround PHB config space enable */
+		if ((p->rev == PHB4_REV_NIMBUS_DD10) && (reg == PCI_CFG_CMD))
+			val |= PCI_CFG_CMD_MEM_EN | PCI_CFG_CMD_BUS_MASTER_EN;
 		out_le32(p->regs + PHB_RC_CONFIG_BASE + reg, val);
 	}
 	return OPAL_SUCCESS;