diff options
author | Linas Vepstas <linas@linas.org> | 2005-11-04 03:50:17 +0300 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-10 03:38:14 +0300 |
commit | 8b553f32db3bf5d0ec0819c595932eb21cd45945 (patch) | |
tree | c147ee62bdb580a17d0eec827740c1d97dd29967 /include | |
parent | 6dee3fb94004c43ce09f6bf5e7c0b778ec5b8cc8 (diff) | |
download | linux-8b553f32db3bf5d0ec0819c595932eb21cd45945.tar.xz |
[PATCH] ppc64: Save & restore of PCI device BARS
14-eeh-device-bar-save.patch
After a PCI device has been resest, the device BAR's and other config
space info must be restored to the same state as they were in when
the firmware first handed us this device. This will allow the
PCI device driver, when restarted, to correctly recognize and set up
the device.
Tis patch saves the device config space as early as reasonable after
the firmware has handed over the device. Te state resore funcion
is inteded for use by the EEH recovery routines.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/ppc-pci.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/asm-powerpc/ppc-pci.h b/include/asm-powerpc/ppc-pci.h index 930a606b4e35..d86c47872bea 100644 --- a/include/asm-powerpc/ppc-pci.h +++ b/include/asm-powerpc/ppc-pci.h @@ -64,6 +64,29 @@ extern int pci_read_irq_line(struct pci_dev *pci_dev); */ void rtas_set_slot_reset (struct pci_dn *); +/** + * eeh_restore_bars - Restore device configuration info. + * + * A reset of a PCI device will clear out its config space. + * This routines will restore the config space for this + * device, and is children, to values previously obtained + * from the firmware. + */ +void eeh_restore_bars(struct pci_dn *); + +/** + * rtas_configure_bridge -- firmware initialization of pci bridge + * + * Ask the firmware to configure all PCI bridges devices + * located behind the indicated node. Required after a + * pci device reset. Does essentially the same hing as + * eeh_restore_bars, but for brdges, and lets firmware + * do the work. + */ +void rtas_configure_bridge(struct pci_dn *); + +int rtas_write_config(struct pci_dn *, int where, int size, u32 val); + #endif #endif /* _ASM_POWERPC_PPC_PCI_H */ |