All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: horms@verge.net.au, bhelgaas@google.com,
	linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Subject: [PATCH v2 2/5] pcie-rcar: remove PHYRDY polling from rcar_pcie_hw_init_h1()
Date: Sun, 8 Apr 2018 21:01:44 +0300	[thread overview]
Message-ID: <3c582c72-cee2-54b3-f82a-186999450f44@cogentembedded.com> (raw)
In-Reply-To: <26e803ca-06b6-28c5-b87c-fc639b322d6f@cogentembedded.com>

Now that we've added PCIEPHYSR.PHYRDY polling to rcar_pcie_hw_init(),
there is no need anymore  for polling the PHY specific register in
rcar_pcie_hw_init_h1() -- remove it.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 drivers/pci/host/pcie-rcar.c |   12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

Index: pci/drivers/pci/host/pcie-rcar.c
===================================================================
--- pci.orig/drivers/pci/host/pcie-rcar.c
+++ pci/drivers/pci/host/pcie-rcar.c
@@ -102,7 +102,6 @@
 #define  LANE_POS		8
 #define  ADR_POS		0
 #define H1_PCIEPHYDOUTR		0x040014
-#define H1_PCIEPHYSR		0x040018
 
 /* R-Car Gen2 PHY */
 #define GEN2_PCIEPHYADDR	0x780
@@ -627,8 +626,6 @@ static int rcar_pcie_hw_init(struct rcar
 
 static int rcar_pcie_hw_init_h1(struct rcar_pcie *pcie)
 {
-	unsigned int timeout = 10;
-
 	/* Initialize the phy */
 	phy_write_reg(pcie, 0, 0x42, 0x1, 0x0EC34191);
 	phy_write_reg(pcie, 1, 0x42, 0x1, 0x0EC34180);
@@ -647,14 +644,7 @@ static int rcar_pcie_hw_init_h1(struct r
 	phy_write_reg(pcie, 0, 0x64, 0x1, 0x3F0F1F0F);
 	phy_write_reg(pcie, 0, 0x66, 0x1, 0x00008000);
 
-	while (timeout--) {
-		if (rcar_pci_read_reg(pcie, H1_PCIEPHYSR))
-			return rcar_pcie_hw_init(pcie);
-
-		msleep(5);
-	}
-
-	return -ETIMEDOUT;
+	return rcar_pcie_hw_init(pcie);
 }
 
 static int rcar_pcie_hw_init_gen2(struct rcar_pcie *pcie)

  parent reply	other threads:[~2018-04-08 18:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-08 17:57 [PATCH v2 0/5] Add R8A77980 PCIe support & some driver cleanups Sergei Shtylyov
2018-04-08 17:59 ` [PATCH v2 1/5] pcie-rcar: poll PHYRDY in rcar_pcie_hw_init() Sergei Shtylyov
2018-04-08 18:01 ` Sergei Shtylyov [this message]
2018-04-08 18:05 ` [PATCH v2 3/5] pcie-rcar: add R-Car gen3 PHY support Sergei Shtylyov
2018-04-13 17:22   ` Rob Herring
2018-04-08 18:07 ` [PATCH v2 4/5] pcie-rcar: factor out rcar_pcie_hw_init() call Sergei Shtylyov
2018-04-08 18:10 ` [PATCH v2 5/5] DT: pci: rcar-pci: document R8A77980 bindings Sergei Shtylyov
2018-04-09 11:44   ` Simon Horman
2018-04-13 17:23   ` Rob Herring
2018-05-01  5:55 ` [PATCH v2 0/5] Add R8A77980 PCIe support & some driver cleanups Simon Horman
2018-05-01 10:57   ` Lorenzo Pieralisi
2018-05-03 15:26     ` Sergei Shtylyov
2018-05-03 16:22       ` Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3c582c72-cee2-54b3-f82a-186999450f44@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=bhelgaas@google.com \
    --cc=horms@verge.net.au \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.