mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[POWERPC] EEH: enable MMIO/DMA on frozen slot
Add wrapper around the rtas call to enable MMIO or DMA on a frozen pci slot. Signed-off-by: Linas Vepstas <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
This commit is contained in:
parent
cb5b562444
commit
47b5c838af
2 changed files with 40 additions and 0 deletions
|
|
@ -481,6 +481,35 @@ eeh_slot_availability(struct pci_dn *pdn)
|
|||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* rtas_pci_enable - enable MMIO or DMA transfers for this slot
|
||||
* @pdn pci device node
|
||||
*/
|
||||
|
||||
int
|
||||
rtas_pci_enable(struct pci_dn *pdn, int function)
|
||||
{
|
||||
int config_addr;
|
||||
int rc;
|
||||
|
||||
/* Use PE configuration address, if present */
|
||||
config_addr = pdn->eeh_config_addr;
|
||||
if (pdn->eeh_pe_config_addr)
|
||||
config_addr = pdn->eeh_pe_config_addr;
|
||||
|
||||
rc = rtas_call(ibm_set_eeh_option, 4, 1, NULL,
|
||||
config_addr,
|
||||
BUID_HI(pdn->phb->buid),
|
||||
BUID_LO(pdn->phb->buid),
|
||||
function);
|
||||
|
||||
if (rc)
|
||||
printk(KERN_WARNING "EEH: Cannot enable function %d, err=%d dn=%s\n",
|
||||
function, rc, pdn->node->full_name);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* rtas_pci_slot_reset - raises/lowers the pci #RST line
|
||||
* @pdn pci device node
|
||||
|
|
|
|||
Loading…
Reference in a new issue