1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 14:33:18 +02:00

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>
This commit is contained in:
Carl-Daniel Hailfinger
2010-11-10 15:25:18 +00:00
parent caf2d42d9a
commit 2bee8cf898
7 changed files with 118 additions and 65 deletions

View File

@ -47,7 +47,7 @@ int drkaiser_init(void)
drkaiser_pcidev);
/* Write magic register to enable flash write. */
pci_write_word(pcidev_dev, PCI_MAGIC_DRKAISER_ADDR,
rpci_write_word(pcidev_dev, PCI_MAGIC_DRKAISER_ADDR,
PCI_MAGIC_DRKAISER_VALUE);
/* Map 128KB flash memory window. */
@ -61,8 +61,7 @@ int drkaiser_init(void)
int drkaiser_shutdown(void)
{
/* Write protect the flash again. */
pci_write_word(pcidev_dev, PCI_MAGIC_DRKAISER_ADDR, 0);
/* Flash write is disabled automatically by PCI restore. */
pci_cleanup(pacc);
release_io_perms();
return 0;