diff options
author | Aaron Durbin <adurbin@chromium.org> | 2012-10-31 21:46:35 -0500 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2012-11-12 17:32:52 +0100 |
commit | a5b70676385d6b5da3d18f81042de4a1bb4cf0da (patch) | |
tree | 23a3e9fe2ee4eaa76e97fb0abb8ceed808f5fa5f /src | |
parent | f75dd09a7f9e46c0c811b9918c9cde7d9d105e6c (diff) |
romcc_io: add pci_or_configX functions.
Some of the modules use their own rolled pci_or_configX functions.
Therefore, make them first class so everyone can use them without
copying them.
Change-Id: I9a4d3364c832548dbfe18139c27cce2d60c3316d
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/1797
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/x86/include/arch/romcc_io.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/arch/x86/include/arch/romcc_io.h b/src/arch/x86/include/arch/romcc_io.h index 37fb7ab2e0..51dd8eec91 100644 --- a/src/arch/x86/include/arch/romcc_io.h +++ b/src/arch/x86/include/arch/romcc_io.h @@ -244,6 +244,21 @@ static inline __attribute__((always_inline)) void pci_write_config32(device_t de #endif } +static inline __attribute__((always_inline)) void pci_or_config8(device_t dev, unsigned where, uint8_t value) +{ + pci_write_config8(dev, where, pci_read_config8(dev, where) | value); +} + +static inline __attribute__((always_inline)) void pci_or_config16(device_t dev, unsigned where, uint16_t value) +{ + pci_write_config16(dev, where, pci_read_config16(dev, where) | value); +} + +static inline __attribute__((always_inline)) void pci_or_config32(device_t dev, unsigned where, uint32_t value) +{ + pci_write_config32(dev, where, pci_read_config32(dev, where) | value); +} + #define PCI_DEV_INVALID (0xffffffffU) static inline device_t pci_io_locate_device(unsigned pci_id, device_t dev) { |