linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/3] PCI: Rename host functions for consistency
@ 2017-11-13 22:40 Bjorn Helgaas
  2017-11-13 22:40 ` [PATCH v1 1/3] PCI: xgene: Rename xgene_pcie_probe_bridge() to xgene_pcie_probe() Bjorn Helgaas
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Bjorn Helgaas @ 2017-11-13 22:40 UTC (permalink / raw)
  To: linux-arm-kernel

All native host bridge driver probe functions are called *_pci_probe() or
*_pcie_probe() *except* X-Gene's.  All "is the link up?" functions are
called *_pcie_link_up() *except* Altera's and Xilinx's.  Rename them to be
consistent.

I plan to include these for v4.15 unless there are objections.

---

Bjorn Helgaas (3):
      PCI: xgene: Rename xgene_pcie_probe_bridge() to xgene_pcie_probe()
      PCI: altera: Rename altera_pcie_link_is_up() to altera_pcie_link_up()
      PCI: xilinx: Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up()


 drivers/pci/host/pci-xgene.c   |    4 ++--
 drivers/pci/host/pcie-altera.c |    8 ++++----
 drivers/pci/host/pcie-xilinx.c |    6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v1 1/3] PCI: xgene: Rename xgene_pcie_probe_bridge() to xgene_pcie_probe()
  2017-11-13 22:40 [PATCH v1 0/3] PCI: Rename host functions for consistency Bjorn Helgaas
@ 2017-11-13 22:40 ` Bjorn Helgaas
  2017-11-13 22:40 ` [PATCH v1 2/3] PCI: altera: Rename altera_pcie_link_is_up() to altera_pcie_link_up() Bjorn Helgaas
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Bjorn Helgaas @ 2017-11-13 22:40 UTC (permalink / raw)
  To: linux-arm-kernel

From: Bjorn Helgaas <bhelgaas@google.com>

Rename xgene_pcie_probe_bridge() to xgene_pcie_probe() to follow the
convention of other drivers.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pci-xgene.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
index 087645116ecb..9f53612f6594 100644
--- a/drivers/pci/host/pci-xgene.c
+++ b/drivers/pci/host/pci-xgene.c
@@ -628,7 +628,7 @@ static struct pci_ops xgene_pcie_ops = {
 	.write = pci_generic_config_write32,
 };
 
-static int xgene_pcie_probe_bridge(struct platform_device *pdev)
+static int xgene_pcie_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *dn = dev->of_node;
@@ -709,7 +709,7 @@ static struct platform_driver xgene_pcie_driver = {
 		.of_match_table = of_match_ptr(xgene_pcie_match_table),
 		.suppress_bind_attrs = true,
 	},
-	.probe = xgene_pcie_probe_bridge,
+	.probe = xgene_pcie_probe,
 };
 builtin_platform_driver(xgene_pcie_driver);
 #endif

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v1 2/3] PCI: altera: Rename altera_pcie_link_is_up() to altera_pcie_link_up()
  2017-11-13 22:40 [PATCH v1 0/3] PCI: Rename host functions for consistency Bjorn Helgaas
  2017-11-13 22:40 ` [PATCH v1 1/3] PCI: xgene: Rename xgene_pcie_probe_bridge() to xgene_pcie_probe() Bjorn Helgaas
@ 2017-11-13 22:40 ` Bjorn Helgaas
  2017-11-14 16:58   ` Ley Foon Tan
  2017-11-13 22:40 ` [PATCH v1 3/3] PCI: xilinx: Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up() Bjorn Helgaas
  2017-11-14 17:21 ` [PATCH v1 0/3] PCI: Rename host functions for consistency Lorenzo Pieralisi
  3 siblings, 1 reply; 7+ messages in thread
From: Bjorn Helgaas @ 2017-11-13 22:40 UTC (permalink / raw)
  To: linux-arm-kernel

From: Bjorn Helgaas <bhelgaas@google.com>

Rename altera_pcie_link_is_up() to altera_pcie_link_up() to follow the
convention of other drivers.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pcie-altera.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c
index b468b8cccf8d..5cc4f594d79a 100644
--- a/drivers/pci/host/pcie-altera.c
+++ b/drivers/pci/host/pcie-altera.c
@@ -105,7 +105,7 @@ static inline u32 cra_readl(struct altera_pcie *pcie, const u32 reg)
 	return readl_relaxed(pcie->cra_base + reg);
 }
 
-static bool altera_pcie_link_is_up(struct altera_pcie *pcie)
+static bool altera_pcie_link_up(struct altera_pcie *pcie)
 {
 	return !!((cra_readl(pcie, RP_LTSSM) & RP_LTSSM_MASK) == LTSSM_L0);
 }
@@ -142,7 +142,7 @@ static bool altera_pcie_valid_device(struct altera_pcie *pcie,
 {
 	/* If there is no link, then there is no device */
 	if (bus->number != pcie->root_bus_nr) {
-		if (!altera_pcie_link_is_up(pcie))
+		if (!altera_pcie_link_up(pcie))
 			return false;
 	}
 
@@ -412,7 +412,7 @@ static void altera_wait_link_retrain(struct altera_pcie *pcie)
 	/* Wait for link is up */
 	start_jiffies = jiffies;
 	for (;;) {
-		if (altera_pcie_link_is_up(pcie))
+		if (altera_pcie_link_up(pcie))
 			break;
 
 		if (time_after(jiffies, start_jiffies + LINK_UP_TIMEOUT)) {
@@ -427,7 +427,7 @@ static void altera_pcie_retrain(struct altera_pcie *pcie)
 {
 	u16 linkcap, linkstat, linkctl;
 
-	if (!altera_pcie_link_is_up(pcie))
+	if (!altera_pcie_link_up(pcie))
 		return;
 
 	/*

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v1 3/3] PCI: xilinx: Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up()
  2017-11-13 22:40 [PATCH v1 0/3] PCI: Rename host functions for consistency Bjorn Helgaas
  2017-11-13 22:40 ` [PATCH v1 1/3] PCI: xgene: Rename xgene_pcie_probe_bridge() to xgene_pcie_probe() Bjorn Helgaas
  2017-11-13 22:40 ` [PATCH v1 2/3] PCI: altera: Rename altera_pcie_link_is_up() to altera_pcie_link_up() Bjorn Helgaas
@ 2017-11-13 22:40 ` Bjorn Helgaas
  2017-11-14  7:17   ` Michal Simek
  2017-11-14 17:21 ` [PATCH v1 0/3] PCI: Rename host functions for consistency Lorenzo Pieralisi
  3 siblings, 1 reply; 7+ messages in thread
From: Bjorn Helgaas @ 2017-11-13 22:40 UTC (permalink / raw)
  To: linux-arm-kernel

From: Bjorn Helgaas <bhelgaas@google.com>

Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up() to follow the
convention of other drivers.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pcie-xilinx.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
index 94e13cb8608f..7b5325990f5e 100644
--- a/drivers/pci/host/pcie-xilinx.c
+++ b/drivers/pci/host/pcie-xilinx.c
@@ -129,7 +129,7 @@ static inline void pcie_write(struct xilinx_pcie_port *port, u32 val, u32 reg)
 	writel(val, port->reg_base + reg);
 }
 
-static inline bool xilinx_pcie_link_is_up(struct xilinx_pcie_port *port)
+static inline bool xilinx_pcie_link_up(struct xilinx_pcie_port *port)
 {
 	return (pcie_read(port, XILINX_PCIE_REG_PSCR) &
 		XILINX_PCIE_REG_PSCR_LNKUP) ? 1 : 0;
@@ -165,7 +165,7 @@ static bool xilinx_pcie_valid_device(struct pci_bus *bus, unsigned int devfn)
 
 	/* Check if link is up when trying to access downstream ports */
 	if (bus->number != port->root_busno)
-		if (!xilinx_pcie_link_is_up(port))
+		if (!xilinx_pcie_link_up(port))
 			return false;
 
 	/* Only one device down on each root port */
@@ -541,7 +541,7 @@ static void xilinx_pcie_init_port(struct xilinx_pcie_port *port)
 {
 	struct device *dev = port->dev;
 
-	if (xilinx_pcie_link_is_up(port))
+	if (xilinx_pcie_link_up(port))
 		dev_info(dev, "PCIe Link is UP\n");
 	else
 		dev_info(dev, "PCIe Link is DOWN\n");

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v1 3/3] PCI: xilinx: Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up()
  2017-11-13 22:40 ` [PATCH v1 3/3] PCI: xilinx: Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up() Bjorn Helgaas
@ 2017-11-14  7:17   ` Michal Simek
  0 siblings, 0 replies; 7+ messages in thread
From: Michal Simek @ 2017-11-14  7:17 UTC (permalink / raw)
  To: linux-arm-kernel

On 13.11.2017 23:40, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
> 
> Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up() to follow the
> convention of other drivers.  No functional change intended.
> 
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
>  drivers/pci/host/pcie-xilinx.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
> index 94e13cb8608f..7b5325990f5e 100644
> --- a/drivers/pci/host/pcie-xilinx.c
> +++ b/drivers/pci/host/pcie-xilinx.c
> @@ -129,7 +129,7 @@ static inline void pcie_write(struct xilinx_pcie_port *port, u32 val, u32 reg)
>  	writel(val, port->reg_base + reg);
>  }
>  
> -static inline bool xilinx_pcie_link_is_up(struct xilinx_pcie_port *port)
> +static inline bool xilinx_pcie_link_up(struct xilinx_pcie_port *port)
>  {
>  	return (pcie_read(port, XILINX_PCIE_REG_PSCR) &
>  		XILINX_PCIE_REG_PSCR_LNKUP) ? 1 : 0;
> @@ -165,7 +165,7 @@ static bool xilinx_pcie_valid_device(struct pci_bus *bus, unsigned int devfn)
>  
>  	/* Check if link is up when trying to access downstream ports */
>  	if (bus->number != port->root_busno)
> -		if (!xilinx_pcie_link_is_up(port))
> +		if (!xilinx_pcie_link_up(port))
>  			return false;
>  
>  	/* Only one device down on each root port */
> @@ -541,7 +541,7 @@ static void xilinx_pcie_init_port(struct xilinx_pcie_port *port)
>  {
>  	struct device *dev = port->dev;
>  
> -	if (xilinx_pcie_link_is_up(port))
> +	if (xilinx_pcie_link_up(port))
>  		dev_info(dev, "PCIe Link is UP\n");
>  	else
>  		dev_info(dev, "PCIe Link is DOWN\n");
> 

Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v1 2/3] PCI: altera: Rename altera_pcie_link_is_up() to altera_pcie_link_up()
  2017-11-13 22:40 ` [PATCH v1 2/3] PCI: altera: Rename altera_pcie_link_is_up() to altera_pcie_link_up() Bjorn Helgaas
@ 2017-11-14 16:58   ` Ley Foon Tan
  0 siblings, 0 replies; 7+ messages in thread
From: Ley Foon Tan @ 2017-11-14 16:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 2017-11-13 at 16:40 -0600, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
> 
> Rename altera_pcie_link_is_up() to altera_pcie_link_up() to follow
> the
> convention of other drivers.??No functional change intended.
> 
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
> ?drivers/pci/host/pcie-altera.c |????8 ++++----
> ?1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-
> altera.c
> index b468b8cccf8d..5cc4f594d79a 100644
> --- a/drivers/pci/host/pcie-altera.c
> +++ b/drivers/pci/host/pcie-altera.c
> @@ -105,7 +105,7 @@ static inline u32 cra_readl(struct altera_pcie
> *pcie, const u32 reg)
> ????????return readl_relaxed(pcie->cra_base + reg);
> ?}
> 
> -static bool altera_pcie_link_is_up(struct altera_pcie *pcie)
> +static bool altera_pcie_link_up(struct altera_pcie *pcie)
> ?{
> ????????return !!((cra_readl(pcie, RP_LTSSM) & RP_LTSSM_MASK) ==
> LTSSM_L0);
> ?}
> @@ -142,7 +142,7 @@ static bool altera_pcie_valid_device(struct
> altera_pcie *pcie,
> ?{
> ????????/* If there is no link, then there is no device */
> ????????if (bus->number != pcie->root_bus_nr) {
> -???????????????if (!altera_pcie_link_is_up(pcie))
> +???????????????if (!altera_pcie_link_up(pcie))
> ????????????????????????return false;
> ????????}
> 
> @@ -412,7 +412,7 @@ static void altera_wait_link_retrain(struct
> altera_pcie *pcie)
> ????????/* Wait for link is up */
> ????????start_jiffies = jiffies;
> ????????for (;;) {
> -???????????????if (altera_pcie_link_is_up(pcie))
> +???????????????if (altera_pcie_link_up(pcie))
> ????????????????????????break;
> 
> ????????????????if (time_after(jiffies, start_jiffies +
> LINK_UP_TIMEOUT)) {
> @@ -427,7 +427,7 @@ static void altera_pcie_retrain(struct
> altera_pcie *pcie)
> ?{
> ????????u16 linkcap, linkstat, linkctl;
> 
> -???????if (!altera_pcie_link_is_up(pcie))
> +???????if (!altera_pcie_link_up(pcie))
> ????????????????return;
> 
> ????????/*
> 
Acked-by: Ley Foon Tan <ley.foon.tan@intel.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v1 0/3] PCI: Rename host functions for consistency
  2017-11-13 22:40 [PATCH v1 0/3] PCI: Rename host functions for consistency Bjorn Helgaas
                   ` (2 preceding siblings ...)
  2017-11-13 22:40 ` [PATCH v1 3/3] PCI: xilinx: Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up() Bjorn Helgaas
@ 2017-11-14 17:21 ` Lorenzo Pieralisi
  3 siblings, 0 replies; 7+ messages in thread
From: Lorenzo Pieralisi @ 2017-11-14 17:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 13, 2017 at 04:40:36PM -0600, Bjorn Helgaas wrote:
> All native host bridge driver probe functions are called *_pci_probe() or
> *_pcie_probe() *except* X-Gene's.  All "is the link up?" functions are
> called *_pcie_link_up() *except* Altera's and Xilinx's.  Rename them to be
> consistent.
> 
> I plan to include these for v4.15 unless there are objections.
> 
> ---
> 
> Bjorn Helgaas (3):
>       PCI: xgene: Rename xgene_pcie_probe_bridge() to xgene_pcie_probe()
>       PCI: altera: Rename altera_pcie_link_is_up() to altera_pcie_link_up()
>       PCI: xilinx: Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up()
> 
> 
>  drivers/pci/host/pci-xgene.c   |    4 ++--
>  drivers/pci/host/pcie-altera.c |    8 ++++----
>  drivers/pci/host/pcie-xilinx.c |    6 +++---
>  3 files changed, 9 insertions(+), 9 deletions(-)

On the series:

Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-14 17:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13 22:40 [PATCH v1 0/3] PCI: Rename host functions for consistency Bjorn Helgaas
2017-11-13 22:40 ` [PATCH v1 1/3] PCI: xgene: Rename xgene_pcie_probe_bridge() to xgene_pcie_probe() Bjorn Helgaas
2017-11-13 22:40 ` [PATCH v1 2/3] PCI: altera: Rename altera_pcie_link_is_up() to altera_pcie_link_up() Bjorn Helgaas
2017-11-14 16:58   ` Ley Foon Tan
2017-11-13 22:40 ` [PATCH v1 3/3] PCI: xilinx: Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up() Bjorn Helgaas
2017-11-14  7:17   ` Michal Simek
2017-11-14 17:21 ` [PATCH v1 0/3] PCI: Rename host functions for consistency 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).