diff options
author | Linas Vepstas <linas@austin.ibm.com> | 2006-09-15 18:57:42 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-09-21 22:59:14 +1000 |
commit | 47b5c838af92d3504e99633bf568578203b7305f (patch) | |
tree | 0122e533f39c48572d74a592c61ac394466fff01 /arch/powerpc | |
parent | cb5b562444c27cf53f5d297bd7a89807ea614cf3 (diff) | |
download | linux-stable-47b5c838af92d3504e99633bf568578203b7305f.tar.gz linux-stable-47b5c838af92d3504e99633bf568578203b7305f.tar.bz2 linux-stable-47b5c838af92d3504e99633bf568578203b7305f.zip |
[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 <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh.c | 29 |
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) } /** + * 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 * @state: 1/0 to raise/lower the #RST |