* [PATCH] PCI: xgene: Use PCI_VENDOR_ID_AMCC macro
@ 2021-09-27 13:43 Pali Rohár
2021-09-27 22:01 ` Krzysztof Wilczyński
2021-09-30 9:45 ` Lorenzo Pieralisi
0 siblings, 2 replies; 3+ messages in thread
From: Pali Rohár @ 2021-09-27 13:43 UTC (permalink / raw)
To: Toan Le, Lorenzo Pieralisi, Rob Herring,
Krzysztof Wilczyński, Bjorn Helgaas
Cc: linux-pci, linux-arm-kernel, linux-kernel
Header file linux/pci_ids.h defines AMCC vendor id (0x10e8) macro named
PCI_VENDOR_ID_AMCC. So use this macro instead of driver custom macro.
Signed-off-by: Pali Rohár <pali@kernel.org>
---
drivers/pci/controller/pci-xgene.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/pci/controller/pci-xgene.c b/drivers/pci/controller/pci-xgene.c
index e64536047b65..56d0d50338c8 100644
--- a/drivers/pci/controller/pci-xgene.c
+++ b/drivers/pci/controller/pci-xgene.c
@@ -48,7 +48,6 @@
#define EN_COHERENCY 0xF0000000
#define EN_REG 0x00000001
#define OB_LO_IO 0x00000002
-#define XGENE_PCIE_VENDORID 0x10E8
#define XGENE_PCIE_DEVICEID 0xE004
#define SZ_1T (SZ_1G*1024ULL)
#define PIPE_PHY_RATE_RD(src) ((0xc000 & (u32)(src)) >> 0xe)
@@ -560,7 +559,7 @@ static int xgene_pcie_setup(struct xgene_pcie_port *port)
xgene_pcie_clear_config(port);
/* setup the vendor and device IDs correctly */
- val = (XGENE_PCIE_DEVICEID << 16) | XGENE_PCIE_VENDORID;
+ val = (XGENE_PCIE_DEVICEID << 16) | PCI_VENDOR_ID_AMCC;
xgene_pcie_writel(port, BRIDGE_CFG_0, val);
ret = xgene_pcie_map_ranges(port);
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] PCI: xgene: Use PCI_VENDOR_ID_AMCC macro
2021-09-27 13:43 [PATCH] PCI: xgene: Use PCI_VENDOR_ID_AMCC macro Pali Rohár
@ 2021-09-27 22:01 ` Krzysztof Wilczyński
2021-09-30 9:45 ` Lorenzo Pieralisi
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Wilczyński @ 2021-09-27 22:01 UTC (permalink / raw)
To: Pali Rohár
Cc: Toan Le, Lorenzo Pieralisi, Rob Herring, Bjorn Helgaas,
linux-pci, linux-arm-kernel, linux-kernel
Hi Pali,
> Header file linux/pci_ids.h defines AMCC vendor id (0x10e8) macro named
> PCI_VENDOR_ID_AMCC. So use this macro instead of driver custom macro.
[...]
> -#define XGENE_PCIE_VENDORID 0x10E8
Another possible way of doing this might have been to alias the macro:
#define XGENE_PCIE_VENDORID PCI_VENDOR_ID_AMCC
Not sure if this would be more or less confusing - I certainly had to go
and look up what "AMCC" was. Only to found out they got sold few years
ago, and such...
Nothing to change here, though.
> #define XGENE_PCIE_DEVICEID 0xE004
> #define SZ_1T (SZ_1G*1024ULL)
> #define PIPE_PHY_RATE_RD(src) ((0xc000 & (u32)(src)) >> 0xe)
> @@ -560,7 +559,7 @@ static int xgene_pcie_setup(struct xgene_pcie_port *port)
> xgene_pcie_clear_config(port);
>
> /* setup the vendor and device IDs correctly */
> - val = (XGENE_PCIE_DEVICEID << 16) | XGENE_PCIE_VENDORID;
> + val = (XGENE_PCIE_DEVICEID << 16) | PCI_VENDOR_ID_AMCC;
> xgene_pcie_writel(port, BRIDGE_CFG_0, val);
Thank you!
Reviewed-by: Krzysztof Wilczyński <kw@linux.com>
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PCI: xgene: Use PCI_VENDOR_ID_AMCC macro
2021-09-27 13:43 [PATCH] PCI: xgene: Use PCI_VENDOR_ID_AMCC macro Pali Rohár
2021-09-27 22:01 ` Krzysztof Wilczyński
@ 2021-09-30 9:45 ` Lorenzo Pieralisi
1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2021-09-30 9:45 UTC (permalink / raw)
To: Bjorn Helgaas, Krzysztof Wilczyński, Pali Rohár,
Rob Herring, Toan Le
Cc: Lorenzo Pieralisi, linux-kernel, linux-arm-kernel, linux-pci
On Mon, 27 Sep 2021 15:43:56 +0200, Pali Rohár wrote:
> Header file linux/pci_ids.h defines AMCC vendor id (0x10e8) macro named
> PCI_VENDOR_ID_AMCC. So use this macro instead of driver custom macro.
>
>
Applied to pci/xgene, thanks!
[1/1] PCI: xgene: Use PCI_VENDOR_ID_AMCC macro
https://git.kernel.org/lpieralisi/pci/c/894682f0a9
Thanks,
Lorenzo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-30 9:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 13:43 [PATCH] PCI: xgene: Use PCI_VENDOR_ID_AMCC macro Pali Rohár
2021-09-27 22:01 ` Krzysztof Wilczyński
2021-09-30 9:45 ` Lorenzo Pieralisi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).