aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorLinas Vepstas <linas@linas.org>2005-11-03 19:50:17 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-09 19:38:14 -0500
commit8b553f32db3bf5d0ec0819c595932eb21cd45945 (patch)
treec147ee62bdb580a17d0eec827740c1d97dd29967 /include/asm-powerpc
parent6dee3fb94004c43ce09f6bf5e7c0b778ec5b8cc8 (diff)
[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/asm-powerpc')
-rw-r--r--include/asm-powerpc/ppc-pci.h23
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);
64 */ 64 */
65void rtas_set_slot_reset (struct pci_dn *); 65void rtas_set_slot_reset (struct pci_dn *);
66 66
67/**
68 * eeh_restore_bars - Restore device configuration info.
69 *
70 * A reset of a PCI device will clear out its config space.
71 * This routines will restore the config space for this
72 * device, and is children, to values previously obtained
73 * from the firmware.
74 */
75void eeh_restore_bars(struct pci_dn *);
76
77/**
78 * rtas_configure_bridge -- firmware initialization of pci bridge
79 *
80 * Ask the firmware to configure all PCI bridges devices
81 * located behind the indicated node. Required after a
82 * pci device reset. Does essentially the same hing as
83 * eeh_restore_bars, but for brdges, and lets firmware
84 * do the work.
85 */
86void rtas_configure_bridge(struct pci_dn *);
87
88int rtas_write_config(struct pci_dn *, int where, int size, u32 val);
89
67#endif 90#endif
68 91
69#endif /* _ASM_POWERPC_PPC_PCI_H */ 92#endif /* _ASM_POWERPC_PPC_PCI_H */