aboutsummaryrefslogtreecommitdiff
path: root/core/pci-opal.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-07-07 11:49:56 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-07-08 17:32:25 +1000
commitdc21b4db3a2ed9a119b0555b622723cf48330a59 (patch)
tree87e09040f1122971c573a2894f43239d031c69e7 /core/pci-opal.c
parent7609fd61960f1e6e4a316aca1d7ab665cc4487ca (diff)
downloadskiboot-dc21b4db3a2ed9a119b0555b622723cf48330a59.zip
skiboot-dc21b4db3a2ed9a119b0555b622723cf48330a59.tar.gz
skiboot-dc21b4db3a2ed9a119b0555b622723cf48330a59.tar.bz2
hw/phb4: Add initial support
This adds the base support for the PHB4. It currently only support the M32 window, EEH or in general error recovery aren't supported yet. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [stewart@linux.vnet.ibm.com: update (C) year, fix indenting] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/pci-opal.c')
-rw-r--r--core/pci-opal.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/core/pci-opal.c b/core/pci-opal.c
index c0f399c..ba8e27f 100644
--- a/core/pci-opal.c
+++ b/core/pci-opal.c
@@ -342,6 +342,27 @@ static int64_t opal_pci_msi_eoi(uint64_t phb_id,
}
opal_call(OPAL_PCI_MSI_EOI, opal_pci_msi_eoi, 2);
+static int64_t opal_pci_tce_kill(uint64_t phb_id,
+ uint32_t kill_type,
+ uint32_t pe_num, uint32_t tce_size,
+ uint64_t dma_addr, uint32_t npages)
+{
+ struct phb *phb = pci_get_phb(phb_id);
+ int64_t rc;
+
+ if (!phb)
+ return OPAL_PARAMETER;
+ if (!phb->ops->tce_kill)
+ return OPAL_UNSUPPORTED;
+ phb_lock(phb);
+ rc = phb->ops->tce_kill(phb, kill_type, pe_num, tce_size,
+ dma_addr, npages);
+ phb_unlock(phb);
+
+ return rc;
+}
+opal_call(OPAL_PCI_TCE_KILL, opal_pci_tce_kill, 6);
+
static int64_t opal_pci_set_xive_pe(uint64_t phb_id, uint32_t pe_number,
uint32_t xive_num)
{