#include <stdint.h>
Go to the source code of this file.
Data Structures | |
| struct | pci_config_backup |
| A PCI configuration space backup. More... | |
Defines | |
| #define | PCI_CONFIG_BACKUP_EXCLUDE_END 0xff |
| PCI configuration space backup exclusion list end marker. | |
| #define | PCI_CONFIG_BACKUP_EXCLUDE(...) { __VA_ARGS__, PCI_CONFIG_BACKUP_EXCLUDE_END } |
| Define a PCI configuration space backup exclusion list. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| void | pci_backup (struct pci_device *pci, struct pci_config_backup *backup, const uint8_t *exclude) |
| Back up PCI configuration space. | |
| void | pci_restore (struct pci_device *pci, struct pci_config_backup *backup, const uint8_t *exclude) |
| Restore PCI configuration space. | |
Definition in file pcibackup.h.
| #define PCI_CONFIG_BACKUP_EXCLUDE_END 0xff |
PCI configuration space backup exclusion list end marker.
Definition at line 20 of file pcibackup.h.
Referenced by pci_backup_excluded().
| #define PCI_CONFIG_BACKUP_EXCLUDE | ( | ... | ) | { __VA_ARGS__, PCI_CONFIG_BACKUP_EXCLUDE_END } |
Define a PCI configuration space backup exclusion list.
Definition at line 23 of file pcibackup.h.
Referenced by hermon_reset().
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
| void pci_backup | ( | struct pci_device * | pci, | |
| struct pci_config_backup * | backup, | |||
| const uint8_t * | exclude | |||
| ) |
Back up PCI configuration space.
| pci | PCI device | |
| backup | PCI configuration space backup | |
| exclude | PCI configuration space backup exclusion list, or NULL |
Definition at line 61 of file pcibackup.c.
References pci_config_backup::dwords, offset, pci_backup_excluded(), and pci_read_config_dword().
Referenced by hermon_reset().
00062 { 00063 unsigned int offset; 00064 uint32_t *dword; 00065 00066 for ( offset = 0, dword = backup->dwords ; offset < 0x100 ; 00067 offset += sizeof ( *dword ) , dword++ ) { 00068 if ( ! pci_backup_excluded ( pci, offset, exclude ) ) 00069 pci_read_config_dword ( pci, offset, dword ); 00070 } 00071 }
| void pci_restore | ( | struct pci_device * | pci, | |
| struct pci_config_backup * | backup, | |||
| const uint8_t * | exclude | |||
| ) |
Restore PCI configuration space.
| pci | PCI device | |
| backup | PCI configuration space backup | |
| exclude | PCI configuration space backup exclusion list, or NULL |
Definition at line 80 of file pcibackup.c.
References pci_config_backup::dwords, offset, pci_backup_excluded(), and pci_write_config_dword().
Referenced by hermon_reset().
00081 { 00082 unsigned int offset; 00083 uint32_t *dword; 00084 00085 for ( offset = 0, dword = backup->dwords ; offset < 0x100 ; 00086 offset += sizeof ( *dword ) , dword++ ) { 00087 if ( ! pci_backup_excluded ( pci, offset, exclude ) ) 00088 pci_write_config_dword ( pci, offset, *dword ); 00089 } 00090 }
1.5.7.1