[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240429104633.11060-6-ilpo.jarvinen@linux.intel.com>
Date: Mon, 29 Apr 2024 13:46:28 +0300
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: linux-pci@...r.kernel.org,
Bjorn Helgaas <bhelgaas@...gle.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Rob Herring <robh@...nel.org>,
Krzysztof Wilczyński <kw@...ux.com>,
Linus Walleij <linus.walleij@...aro.org>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
linux-kernel@...r.kernel.org
Cc: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Subject: [PATCH 05/10] PCI: ixp4xx: Use generic PCI Conf Type 0 helper
Convert Type 0 address calculation to use pci_conf0_offset() instead of
abusing PCI_CONF1_ADDRESS().
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
---
drivers/pci/controller/pci-ixp4xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/controller/pci-ixp4xx.c b/drivers/pci/controller/pci-ixp4xx.c
index acb85e0d5675..44639838df9c 100644
--- a/drivers/pci/controller/pci-ixp4xx.c
+++ b/drivers/pci/controller/pci-ixp4xx.c
@@ -188,8 +188,8 @@ static u32 ixp4xx_config_addr(u8 bus_num, u16 devfn, int where)
/* Root bus is always 0 in this hardware */
if (bus_num == 0) {
/* type 0 */
- return (PCI_CONF1_ADDRESS(0, 0, PCI_FUNC(devfn), where) &
- ~PCI_CONF1_ENABLE) | BIT(32-PCI_SLOT(devfn));
+ return pci_conf0_addr(devfn, where) |
+ BIT(32 - PCI_SLOT(devfn));
} else {
/* type 1 */
return (PCI_CONF1_ADDRESS(bus_num, PCI_SLOT(devfn),
--
2.39.2
Powered by blists - more mailing lists