programmers can restore pci value in shutdown function
Resetting the bit to zero can be done in
*_shutdown by reading the register, set it (for example,
reg &= ~(1 << 24)) and write it back with
pci_write_long(dev, SOME_SPECIAL_REG, reg).
It's related to next programmers:
See the comment thread in the linked patch for more details.
Updated by Alexander Goncharov over 1 year ago
- Description updated (diff)
Reversible writes were introduced in commit 2bee8cf898007687c58ddb29eb119b461704f18a . Before this commit, the programmers were restoring a PCI value themselves, e.g:
uint32_t reg32; /* Disable flash access again. */ reg32 = pci_read_long(pcidev_dev, REG_FLASH_ACCESS); reg32 &= ~(1 << 24); pci_write_long(pcidev_dev, REG_FLASH_ACCESS, reg32);
/* Write protect the flash again. */ pci_write_word(pcidev_dev, PCI_MAGIC_DRKAISER_ADDR, 0);
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);