[coreboot] New patch to review for coreboot: 3df9cec romcc_io: add pci_or_configX functions.

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Wed Nov 7 03:56:10 CET 2012

Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1797


commit 3df9cecc530e45a979f394e0fc0da4c2defa70a0
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Wed Oct 31 21:46:35 2012 -0500

    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 at chromium.org>
 src/arch/x86/include/arch/romcc_io.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/arch/x86/include/arch/romcc_io.h b/src/arch/x86/include/arch/romcc_io.h
index 37fb7ab..51dd8ee 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
+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)

More information about the coreboot mailing list