From 34cf5619f929775efd819468ba6036e637cfbd85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 11 Mar 2019 20:34:26 +0200 Subject: device/pci_ops: Reuse romstage PCI config for ramstage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By changing the signatures we do not need to define PCI config accessors separately for ramstage. Change-Id: I9364cb34fe8127972c772516a0a0b1d281c5ed00 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/31685 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/include/device/pci.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/include/device/pci.h') diff --git a/src/include/device/pci.h b/src/include/device/pci.h index 2cfcb602442f..14c469345969 100644 --- a/src/include/device/pci.h +++ b/src/include/device/pci.h @@ -35,14 +35,17 @@ struct pci_operations { /* Common pci bus operations */ struct pci_bus_operations { - uint8_t (*read8)(const struct device *dev, uint16_t reg); - uint16_t (*read16)(const struct device *dev, uint16_t reg); - uint32_t (*read32)(const struct device *dev, uint16_t reg); - void (*write8)(const struct device *dev, uint16_t reg, uint8_t val); - void (*write16)(const struct device *dev, uint16_t reg, uint16_t val); - void (*write32)(const struct device *dev, uint16_t reg, uint32_t val); + uint8_t (*read8)(pci_devfn_t dev, uint16_t reg); + uint16_t (*read16)(pci_devfn_t dev, uint16_t reg); + uint32_t (*read32)(pci_devfn_t dev, uint16_t reg); + void (*write8)(pci_devfn_t dev, uint16_t reg, uint8_t val); + void (*write16)(pci_devfn_t dev, uint16_t reg, uint16_t val); + void (*write32)(pci_devfn_t dev, uint16_t reg, uint32_t val); }; +// FIXME: Needs complete pci_bus_operations +#include + struct pci_driver { const struct device_operations *ops; unsigned short vendor; -- cgit v1.2.3