diff options
author | Ryan Grimm <grimm@linux.vnet.ibm.com> | 2014-09-29 23:51:35 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-09-30 14:45:48 +1000 |
commit | f68bd30f5bc58a21533d834b315f880bfb54e0db (patch) | |
tree | 53f349a7e2bff9475cbaad2d8091f8eb37eb5d0b /core/pci-opal.c | |
parent | 8b925076b139a973b25ef88d3d701a810b38f1c0 (diff) | |
download | skiboot-f68bd30f5bc58a21533d834b315f880bfb54e0db.zip skiboot-f68bd30f5bc58a21533d834b315f880bfb54e0db.tar.gz skiboot-f68bd30f5bc58a21533d834b315f880bfb54e0db.tar.bz2 |
phb3/capi: Add two new modes to opal_pci_set_phb_capi_mode
For user initiated capp recovery, provide a mode to turn snoops off. The perst
alone does not turn snoops off and we need to do this as part of the capp
recovery procedure before reinitializing the phb.
A second mode turns snoops back on after recovery. The driver needs to do this
after it reinitializes the PSL otherwise tlbies could come in before the psl is
initialized. Also write 0 to capp error status and control as part of the
recovery procedure.
Put modes as flag defines in opal.h so the driver can pick them up.
Add a dt property "ibm,capi-modes" which tells the driver which modes sapphire
supports. For backwards compatibility with older opals. Also, the driver can
disable reset in sysfs if not supported.
Move the mode checking into phb3.c so it's all in one place.
Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'core/pci-opal.c')
-rw-r--r-- | core/pci-opal.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/core/pci-opal.c b/core/pci-opal.c index 2048d7f..47c9377 100644 --- a/core/pci-opal.c +++ b/core/pci-opal.c @@ -703,15 +703,10 @@ static int64_t opal_pci_set_phb_capi_mode(uint64_t phb_id, uint64_t mode, uint64 return OPAL_PARAMETER; if (!phb->ops->set_capi_mode) return OPAL_UNSUPPORTED; - if (mode == 1) { - phb->ops->lock(phb); - rc = phb->ops->set_capi_mode(phb, mode, pe_number); - phb->ops->unlock(phb); - return rc; - } - if (mode == 0) { - /* FIXME add support for PCI mode*/ - } - return OPAL_UNSUPPORTED; + + phb->ops->lock(phb); + rc = phb->ops->set_capi_mode(phb, mode, pe_number); + phb->ops->unlock(phb); + return rc; } opal_call(OPAL_PCI_SET_PHB_CAPI_MODE, opal_pci_set_phb_capi_mode, 3); |