summaryrefslogtreecommitdiffstats
path: root/gfxnvidia.c
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 /gfxnvidia.c
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 'gfxnvidia.c')
-rw-r--r--gfxnvidia.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/gfxnvidia.c b/gfxnvidia.c
index 7825380..b6dc5f4 100644
--- a/gfxnvidia.c
+++ b/gfxnvidia.c
@@ -75,7 +75,7 @@ int gfxnvidia_init(void)
/* Allow access to flash interface (will disable screen). */
reg32 = pci_read_long(pcidev_dev, 0x50);
reg32 &= ~(1 << 0);
- pci_write_long(pcidev_dev, 0x50, reg32);
+ rpci_write_long(pcidev_dev, 0x50, reg32);
nvidia_bar = physmap("NVIDIA", io_base_addr, 16 * 1024 * 1024);
@@ -89,13 +89,9 @@ int gfxnvidia_init(void)
int gfxnvidia_shutdown(void)
{
- uint32_t reg32;
-
- /* Disallow access to flash interface (and re-enable screen). */
- reg32 = pci_read_long(pcidev_dev, 0x50);
- reg32 |= (1 << 0);
- pci_write_long(pcidev_dev, 0x50, reg32);
-
+ /* Flash interface access is disabled (and screen enabled) automatically
+ * by PCI restore.
+ */
pci_cleanup(pacc);
release_io_perms();
return 0;
OpenPOWER on IntegriCloud