All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 04/14] net: gem: Change mdio_wait prototype to pass regs
Date: Thu,  3 Dec 2015 15:47:52 +0100	[thread overview]
Message-ID: <890a854ff67f682512236d8ceea692e8595a4848.1449154075.git.michal.simek@xilinx.com> (raw)
In-Reply-To: <3846048879467c3510abb54b930cdc05772d469e.1449154075.git.michal.simek@xilinx.com>

Pass regs instead of dev because this will be chagned by
driver model.

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

Changes in v3: None
Changes in v2: None

 drivers/net/zynq_gem.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 1a5a366c9444..7f801d5c4c03 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -172,9 +172,8 @@ struct zynq_gem_priv {
 	struct mii_dev *bus;
 };
 
-static inline int mdio_wait(struct eth_device *dev)
+static inline int mdio_wait(struct zynq_gem_regs *regs)
 {
-	struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
 	u32 timeout = 20000;
 
 	/* Wait till MDIO interface is ready to accept a new transaction. */
@@ -198,7 +197,7 @@ static u32 phy_setup_op(struct eth_device *dev, u32 phy_addr, u32 regnum,
 	u32 mgtcr;
 	struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
 
-	if (mdio_wait(dev))
+	if (mdio_wait(regs))
 		return 1;
 
 	/* Construct mgtcr mask for the operation */
@@ -209,7 +208,7 @@ static u32 phy_setup_op(struct eth_device *dev, u32 phy_addr, u32 regnum,
 	/* Write mgtcr and wait for completion */
 	writel(mgtcr, &regs->phymntnc);
 
-	if (mdio_wait(dev))
+	if (mdio_wait(regs))
 		return 1;
 
 	if (op == ZYNQ_GEM_PHYMNTNC_OP_R_MASK)
-- 
1.9.1

  parent reply	other threads:[~2015-12-03 14:47 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03 14:47 [U-Boot] [PATCH v3 01/14] ARM: zynq: Remove PHYLIB from config to defconfig Michal Simek
2015-12-03 14:47 ` [U-Boot] [PATCH v3 02/14] ARM: zynq: Remove CONFIG_API Michal Simek
2015-12-03 16:09   ` Jagan Teki
2015-12-03 17:57     ` Jeroen Hofstee
2015-12-04  8:20       ` Michal Simek
2015-12-04  8:33         ` Jagan Teki
2015-12-04  7:47     ` Michal Simek
2015-12-03 14:47 ` [U-Boot] [PATCH v3 03/14] net: gem: Do not continue if phy is not found Michal Simek
2015-12-03 16:23   ` Jagan Teki
2015-12-03 14:47 ` Michal Simek [this message]
2015-12-03 14:47 ` [U-Boot] [PATCH v3 05/14] net: gem: Change mii function not to use eth_device structure Michal Simek
2015-12-03 14:47 ` [U-Boot] [PATCH v3 06/14] net: gem: Remove phydev variable Michal Simek
2015-12-03 14:47 ` [U-Boot] [PATCH v3 07/14] net: gem: Extract phy init code Michal Simek
2015-12-03 14:47 ` [U-Boot] [PATCH v3 08/14] net: gem: Check if priv->phydev is valid Michal Simek
2015-12-03 16:24   ` Jagan Teki
2015-12-03 14:47 ` [U-Boot] [PATCH v3 09/14] net: gem: Enable MDIO bus earlier Michal Simek
2015-12-03 14:47 ` [U-Boot] [PATCH v3 10/14] net: gem: Remove zynq_gem_of_init() Michal Simek
2015-12-03 16:24   ` Jagan Teki
2015-12-03 14:47 ` [U-Boot] [PATCH v3 11/14] net: gem: Fix miiphy_read name Michal Simek
2015-12-03 16:25   ` Jagan Teki
2015-12-03 14:48 ` [U-Boot] [PATCH v3 12/14] net: gem: Move driver to DM Michal Simek
2015-12-03 16:16   ` Jagan Teki
2015-12-03 18:57   ` Simon Glass
2015-12-03 19:00     ` Joe Hershberger
2015-12-03 19:04       ` Simon Glass
2015-12-04  6:24   ` Bin Meng
2015-12-03 14:48 ` [U-Boot] [PATCH v3 13/14] net: gem: Read information about interface from DT Michal Simek
2015-12-03 16:21   ` Jagan Teki
2015-12-03 14:48 ` [U-Boot] [PATCH v3 14/14] net: gem: Move gem to Kconfig Michal Simek
2015-12-03 16:19   ` Jagan Teki
2015-12-03 16:11 ` [U-Boot] [PATCH v3 01/14] ARM: zynq: Remove PHYLIB from config to defconfig Jagan Teki

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=890a854ff67f682512236d8ceea692e8595a4848.1449154075.git.michal.simek@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=u-boot@lists.denx.de \
    /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.