aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index fb91842fc819..4534886e3b4e 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -482,6 +482,35 @@ eeh_slot_availability(struct pci_dn *pdn)
482} 482}
483 483
484/** 484/**
485 * rtas_pci_enable - enable MMIO or DMA transfers for this slot
486 * @pdn pci device node
487 */
488
489int
490rtas_pci_enable(struct pci_dn *pdn, int function)
491{
492 int config_addr;
493 int rc;
494
495 /* Use PE configuration address, if present */
496 config_addr = pdn->eeh_config_addr;
497 if (pdn->eeh_pe_config_addr)
498 config_addr = pdn->eeh_pe_config_addr;
499
500 rc = rtas_call(ibm_set_eeh_option, 4, 1, NULL,
501 config_addr,
502 BUID_HI(pdn->phb->buid),
503 BUID_LO(pdn->phb->buid),
504 function);
505
506 if (rc)
507 printk(KERN_WARNING "EEH: Cannot enable function %d, err=%d dn=%s\n",
508 function, rc, pdn->node->full_name);
509
510 return rc;
511}
512
513/**
485 * rtas_pci_slot_reset - raises/lowers the pci #RST line 514 * rtas_pci_slot_reset - raises/lowers the pci #RST line
486 * @pdn pci device node 515 * @pdn pci device node
487 * @state: 1/0 to raise/lower the #RST 516 * @state: 1/0 to raise/lower the #RST