linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: zajec5@gmail.com (Rafał Miłecki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] phy: bcm-ns-usb3: enable MDIO in the platform specific code
Date: Thu, 11 May 2017 15:29:23 +0200	[thread overview]
Message-ID: <20170511132925.14564-4-zajec5@gmail.com> (raw)
In-Reply-To: <20170511132925.14564-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal@milecki.pl>

When we finally start using MDIO layer then bus initialization will be
handled in a separated driver. It means our code handling this has to be
used for the platform driver only.

Signed-off-by: Rafa? Mi?ecki <rafal@milecki.pl>
---
 drivers/phy/phy-bcm-ns-usb3.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/phy/phy-bcm-ns-usb3.c b/drivers/phy/phy-bcm-ns-usb3.c
index 3d0fe5728029..2c9a0d5f43d8 100644
--- a/drivers/phy/phy-bcm-ns-usb3.c
+++ b/drivers/phy/phy-bcm-ns-usb3.c
@@ -80,12 +80,6 @@ static int bcm_ns_usb3_phy_init_ns_bx(struct bcm_ns_usb3 *usb3)
 {
 	int err;
 
-	/* Enable MDIO. Setting MDCDIV as 26  */
-	writel(0x0000009a, usb3->ccb_mii + BCMA_CCB_MII_MNG_CTL);
-
-	/* Wait for MDIO? */
-	udelay(2);
-
 	/* USB3 PLL Block */
 	err = bcm_ns_usb3_mdio_phy_write(usb3, BCM_NS_USB3_PHY_BASE_ADDR_REG,
 					 BCM_NS_USB3_PHY_PLL30_BLOCK);
@@ -134,12 +128,6 @@ static int bcm_ns_usb3_phy_init_ns_ax(struct bcm_ns_usb3 *usb3)
 {
 	int err;
 
-	/* Enable MDIO. Setting MDCDIV as 26  */
-	writel(0x0000009a, usb3->ccb_mii + BCMA_CCB_MII_MNG_CTL);
-
-	/* Wait for MDIO? */
-	udelay(2);
-
 	/* PLL30 block */
 	err = bcm_ns_usb3_mdio_phy_write(usb3, BCM_NS_USB3_PHY_BASE_ADDR_REG,
 					 BCM_NS_USB3_PHY_PLL30_BLOCK);
@@ -278,6 +266,12 @@ static int bcm_ns_usb3_probe(struct platform_device *pdev)
 		return PTR_ERR(usb3->ccb_mii);
 	}
 
+	/* Enable MDIO. Setting MDCDIV as 26  */
+	writel(0x0000009a, usb3->ccb_mii + BCMA_CCB_MII_MNG_CTL);
+
+	/* Wait for MDIO? */
+	udelay(2);
+
 	usb3->phy_write = bcm_ns_usb3_platform_phy_write;
 
 	usb3->phy = devm_phy_create(dev, NULL, &ops);
-- 
2.11.0

  parent reply	other threads:[~2017-05-11 13:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-11 13:29 [PATCH for 4.13 0/5] phy: bcm-ns-usb3: add MDIO driver Rafał Miłecki
2017-05-11 13:29 ` [PATCH 1/5] phy: bcm-ns-usb3: always wait for idle after writing to the PHY reg Rafał Miłecki
2017-05-11 13:29 ` [PATCH 2/5] phy: bcm-ns-usb3: use pointer for PHY writing function Rafał Miłecki
2017-05-11 13:29 ` Rafał Miłecki [this message]
2017-05-11 13:29 ` [PATCH 4/5] dt-bindings: phy: Modify Broadcom NS USB 3.0 PHY binding to use MDIO Rafał Miłecki
2017-05-13  0:19   ` Rob Herring
2017-05-11 13:29 ` [PATCH 5/5] phy: bcm-ns-usb3: add MDIO driver using proper bus layer Rafał Miłecki
2017-05-11 16:29   ` Florian Fainelli
2017-06-16  6:04     ` Kishon Vijay Abraham I
2017-06-16  6:11       ` Rafał Miłecki
2017-06-16  6:31         ` Kishon Vijay Abraham I
2017-06-08 20:04 ` [PATCH V2 0/5] phy: bcm-ns-usb3: add MDIO driver Rafał Miłecki
2017-06-08 20:04   ` [PATCH V2 1/5] phy: bcm-ns-usb3: always wait for idle after writing to the PHY reg Rafał Miłecki
2017-06-08 20:04   ` [PATCH V2 2/5] phy: bcm-ns-usb3: use pointer for PHY writing function Rafał Miłecki
2017-06-08 20:04   ` [PATCH V2 3/5] phy: bcm-ns-usb3: enable MDIO in the platform specific code Rafał Miłecki
2017-06-08 20:04   ` [PATCH V2 4/5] dt-bindings: phy: Modify Broadcom NS USB 3.0 PHY binding to use MDIO Rafał Miłecki
2017-06-14 15:26     ` Rob Herring
2017-06-08 20:04   ` [PATCH V2 5/5] phy: bcm-ns-usb3: add MDIO driver using proper bus layer Rafał Miłecki
2017-06-16  6:36   ` [PATCH V2 0/5] phy: bcm-ns-usb3: add MDIO driver Kishon Vijay Abraham I
2017-06-16  7:14     ` Rafał Miłecki
2017-06-16  7:52       ` Kishon Vijay Abraham I
2017-06-16  7:53   ` Kishon Vijay Abraham I

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=20170511132925.14564-4-zajec5@gmail.com \
    --to=zajec5@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 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).