summaryrefslogtreecommitdiffstats
path: root/programmer.h
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2011-05-03 21:49:41 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2011-05-03 21:49:41 +0000
commit54ce73a1f5c7ddecc7579c136dbac9c2c201b621 (patch)
treef24b7ce88dfdedbb3388cb3f6e4e44ee4e9f15f0 /programmer.h
parent8ed293416dc3d47539dd95709f2b1dc0ccfe0736 (diff)
downloadast2050-flashrom-54ce73a1f5c7ddecc7579c136dbac9c2c201b621.zip
ast2050-flashrom-54ce73a1f5c7ddecc7579c136dbac9c2c201b621.tar.gz
Revert MMIO space writes on shutdown as needed
Reversible MMIO space writes now use rmmio_write*(). Reversible PCI MMIO space writes now use pci_rmmio_write*(). If a MMIO value needs to be queued for restore without writing it, use rmmio_val*(). MMIO space writes which are one-shot (e.g. communication with some chip) should continue to use the permanent mmio_write* variants. Corresponding to flashrom svn r1292. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> David tested it successfully on some NM10/ICH7 platforms which switch between SPI and LPC targets (x86 BIOS ROM vs. EC firmware ROM). Acked-by: David Hendricks <dhendrix@google.com>
Diffstat (limited to 'programmer.h')
-rw-r--r--programmer.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/programmer.h b/programmer.h
index 7698ef0..cd5d584 100644
--- a/programmer.h
+++ b/programmer.h
@@ -316,6 +316,18 @@ uint32_t mmio_le_readl(void *addr);
#define pci_mmio_readb mmio_le_readb
#define pci_mmio_readw mmio_le_readw
#define pci_mmio_readl mmio_le_readl
+void rmmio_writeb(uint8_t val, void *addr);
+void rmmio_writew(uint16_t val, void *addr);
+void rmmio_writel(uint32_t val, void *addr);
+void rmmio_le_writeb(uint8_t val, void *addr);
+void rmmio_le_writew(uint16_t val, void *addr);
+void rmmio_le_writel(uint32_t val, void *addr);
+#define pci_rmmio_writeb rmmio_le_writeb
+#define pci_rmmio_writew rmmio_le_writew
+#define pci_rmmio_writel rmmio_le_writel
+void rmmio_valb(void *addr);
+void rmmio_valw(void *addr);
+void rmmio_vall(void *addr);
/* programmer.c */
int noop_shutdown(void);
OpenPOWER on IntegriCloud