[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 03/18] hw/pci-host/bonito: Use PCI_DEVFN() macro
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 03/18] hw/pci-host/bonito: Use PCI_DEVFN() macro |
Date: |
Thu, 31 Dec 2020 23:48:56 +0100 |
Use the PCI_DEVFN() macro to replace the '0x28' magic value,
this way it is clearer we access PCI function #0 of slot #5.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/pci-host/bonito.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c
index efeba29011f..4c903d4f682 100644
--- a/hw/pci-host/bonito.c
+++ b/hw/pci-host/bonito.c
@@ -626,7 +626,7 @@ static void bonito_pcihost_realize(DeviceState *dev, Error
**errp)
phb->bus = pci_register_root_bus(dev, "pci",
pci_bonito_set_irq, pci_bonito_map_irq,
dev, &bs->pci_mem, get_system_io(),
- 0x28, 32, TYPE_PCI_BUS);
+ PCI_DEVFN(5, 0), 32, TYPE_PCI_BUS);
for (size_t i = 0; i < 3; i++) {
char *name = g_strdup_printf("pci.lomem%zu", i);
--
2.26.2
- [PATCH 00/18] hw/pci-host/bonito: Remap PCI "lo" regions when PCIMAP reg is modified, Philippe Mathieu-Daudé, 2020/12/31
- [PATCH 01/18] hw/pci-host/bonito: Remove unused definitions, Philippe Mathieu-Daudé, 2020/12/31
- [PATCH 02/18] hw/pci-host/bonito: Display hexadecimal value with '0x' prefix, Philippe Mathieu-Daudé, 2020/12/31
- [PATCH 03/18] hw/pci-host/bonito: Use PCI_DEVFN() macro,
Philippe Mathieu-Daudé <=
- [PATCH 04/18] hw/pci-host/bonito: Use pci_config_set_interrupt_pin(), Philippe Mathieu-Daudé, 2020/12/31
- [PATCH 05/18] hw/pci-host/bonito: Simplify soft reset using FIELD_EX32(), Philippe Mathieu-Daudé, 2020/12/31
- [RFC PATCH 06/18] hw/pci-host/bonito: Do not allow big-endian targets, Philippe Mathieu-Daudé, 2020/12/31
- [PATCH 07/18] hw/pci-host/bonito: Make BONPONCFG register read-only, Philippe Mathieu-Daudé, 2020/12/31
- [RFC PATCH 08/18] hw/pci-host/bonito: Remap PCI "lo" regions when PCIMAP reg is modified, Philippe Mathieu-Daudé, 2020/12/31
- [PATCH 09/18] hw/pci-host/bonito: Rename north bridge helpers, Philippe Mathieu-Daudé, 2020/12/31
- [PATCH 10/18] hw/pci-host/bonito: Rename PCI host helpers, Philippe Mathieu-Daudé, 2020/12/31
- [PATCH 11/18] hw/pci-host/bonito: Rename PCI function helpers, Philippe Mathieu-Daudé, 2020/12/31
- [PATCH 12/18] hw/pci-host/bonito: Rename PCIBonitoState -> BonitoPciState, Philippe Mathieu-Daudé, 2020/12/31
- [PATCH 13/18] hw/pci-host/bonito: Create PCI regions in bonito_host_realize(), Philippe Mathieu-Daudé, 2020/12/31