From: Leonard Crestez <leonard.crestez@nxp.com>
To: Shawn Guo <shawnguo@kernel.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Andrew Lunn <andrew@lunn.ch>, Andy Duan <fugang.duan@nxp.com>
Cc: Johan Hovold <johan@kernel.org>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Fabio Estevam <fabio.estevam@nxp.com>, <netdev@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] net: phy: micrel: Restore led_mode and clk_sel on resume
Date: Tue, 30 May 2017 20:34:04 +0300 [thread overview]
Message-ID: <a8d0393c977b0d6fdab5d48ad13ca4d1ca893a07.1496164448.git.leonard.crestez@nxp.com> (raw)
In-Reply-To: <cover.1496164448.git.leonard.crestez@nxp.com>
These bits seem to be lost after a suspend/resume cycle so just set them
again.
This patch fixes ethernet suspend/resume on imx6ul-14x14-evk boards.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
---
drivers/net/phy/micrel.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 6a5fd18..c53ee17 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -700,6 +700,9 @@ static int kszphy_suspend(struct phy_device *phydev)
static int kszphy_resume(struct phy_device *phydev)
{
+ struct kszphy_priv *priv = phydev->priv;
+ int ret;
+
genphy_resume(phydev);
/* Enable PHY Interrupts */
@@ -709,6 +712,18 @@ static int kszphy_resume(struct phy_device *phydev)
phydev->drv->config_intr(phydev);
}
+ if (priv->rmii_ref_clk_sel) {
+ ret = kszphy_rmii_clk_sel(phydev, priv->rmii_ref_clk_sel_val);
+ if (ret) {
+ phydev_err(phydev,
+ "failed to set rmii reference clock\n");
+ return ret;
+ }
+ }
+
+ if (priv->led_mode >= 0)
+ kszphy_setup_led(phydev, priv->type->led_mode_reg, priv->led_mode);
+
return 0;
}
--
2.7.4
next prev parent reply other threads:[~2017-05-30 17:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 17:34 [PATCH 0/2] ARM: imx6ul-14x14-evk: Fix suspend over nfs by phy cleanup Leonard Crestez
2017-05-30 17:34 ` [PATCH 1/2] ARM: dts: imx6ul-14x14-evk: Add ksz8081 phy properties Leonard Crestez
2017-05-30 18:10 ` Florian Fainelli
2017-05-30 22:20 ` Leonard Crestez
2017-05-31 4:08 ` Fabio Estevam
2017-05-30 17:34 ` Leonard Crestez [this message]
2017-05-30 18:05 ` [PATCH 2/2] net: phy: micrel: Restore led_mode and clk_sel on resume Florian Fainelli
2017-05-30 22:08 ` Leonard Crestez
2017-05-30 22:19 ` Florian Fainelli
2017-05-30 23:14 ` Leonard Crestez
2017-05-30 18:12 ` Fabio Estevam
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=a8d0393c977b0d6fdab5d48ad13ca4d1ca893a07.1496164448.git.leonard.crestez@nxp.com \
--to=leonard.crestez@nxp.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=fabio.estevam@nxp.com \
--cc=fugang.duan@nxp.com \
--cc=johan@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=shawnguo@kernel.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).