summaryrefslogtreecommitdiffstats
path: root/programmer.h
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-11-10 15:25:18 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-11-10 15:25:18 +0000
commit2bee8cf898007687c58ddb29eb119b461704f18a (patch)
treeb219ae51fc082062a2a0dd28a5a65c4559bc166e /programmer.h
parentcaf2d42d9a9654477bcbb27e2e3c5a8ab5fe7971 (diff)
downloadast2050-flashrom-2bee8cf898007687c58ddb29eb119b461704f18a.zip
ast2050-flashrom-2bee8cf898007687c58ddb29eb119b461704f18a.tar.gz
Revert PCI config space writes on shutdown
This means all chipset enables etc. will be undone on shutdown. Reversible PCI config space writes now use rpci_write_*(). PCI config space writes which are one-shot (e.g. communication via config space) should continue to use the permanent pci_write_* variants. Extend the number of available register_shutdown slots to 32. Corresponding to flashrom svn r1232. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Diffstat (limited to 'programmer.h')
-rw-r--r--programmer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/programmer.h b/programmer.h
index 6407695..ed9d0b2 100644
--- a/programmer.h
+++ b/programmer.h
@@ -212,6 +212,12 @@ struct pcidev_status {
};
uint32_t pcidev_validate(struct pci_dev *dev, uint32_t bar, const struct pcidev_status *devs);
uint32_t pcidev_init(uint16_t vendor_id, uint32_t bar, const struct pcidev_status *devs);
+/* rpci_write_* are reversible writes. The original PCI config space register
+ * contents will be restored on shutdown.
+ */
+int rpci_write_byte(struct pci_dev *dev, int reg, u8 data);
+int rpci_write_word(struct pci_dev *dev, int reg, u16 data);
+int rpci_write_long(struct pci_dev *dev, int reg, u32 data);
#endif
/* print.c */
OpenPOWER on IntegriCloud