diff mbox series

[06/10] PCI: ixp4xx: Replace 1 with PCI_CONF1_TRANSACTION

Message ID 20240429104633.11060-7-ilpo.jarvinen@linux.intel.com
State New
Headers show
Series PCI: Add generic Conf Type 0/1 helpers | expand

Commit Message

Ilpo Järvinen April 29, 2024, 10:46 a.m. UTC
Add PCI_CONF1_TRANSACTION and replace literal 1 within PCI
Configuration Space Type 1 address with it.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
 drivers/pci/controller/pci-ixp4xx.c | 2 +-
 include/linux/pci.h                 | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Linus Walleij May 3, 2024, 8:43 a.m. UTC | #1
On Mon, Apr 29, 2024 at 12:47 PM Ilpo Järvinen
<ilpo.jarvinen@linux.intel.com> wrote:

> Add PCI_CONF1_TRANSACTION and replace literal 1 within PCI
> Configuration Space Type 1 address with it.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pci/controller/pci-ixp4xx.c b/drivers/pci/controller/pci-ixp4xx.c
index 44639838df9c..ec0125344ca1 100644
--- a/drivers/pci/controller/pci-ixp4xx.c
+++ b/drivers/pci/controller/pci-ixp4xx.c
@@ -194,7 +194,7 @@  static u32 ixp4xx_config_addr(u8 bus_num, u16 devfn, int where)
 		/* type 1 */
 		return (PCI_CONF1_ADDRESS(bus_num, PCI_SLOT(devfn),
 					  PCI_FUNC(devfn), where) &
-			~PCI_CONF1_ENABLE) | 1;
+			~PCI_CONF1_ENABLE) | PCI_CONF1_TRANSACTION;
 	}
 }
 
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 4c4e3bb52a0a..df613428bc4d 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1191,6 +1191,7 @@  void pci_sort_breadthfirst(void);
  * See PCI Local Bus Specification, Revision 3.0,
  * Section 3.2.2.3.2, Figure 3-1 and 3-2, p. 48-50.
  */
+#define PCI_CONF1_TRANSACTION	BIT(0)
 #define PCI_CONF_REG		0x000000ffU	/* common for Type 0/1 */
 #define PCI_CONF_FUNC		0x00000700U	/* common for Type 0/1 */
 #define PCI_CONF1_DEV		0x0000f800U