From: Joachim Eastwood <manabian@gmail.com>
To: davem@davemloft.net
Cc: Joachim Eastwood <manabian@gmail.com>,
marex@denx.de, dinguyen@opensource.altera.com,
peppe.cavallaro@st.com, alexandre.torgue@st.com,
netdev@vger.kernel.org
Subject: [net-next PATCH v2 0/5] stmmac: dwmac-socfpga refactor+cleanup
Date: Sun, 1 May 2016 22:58:18 +0200 [thread overview]
Message-ID: <1462136303-16825-1-git-send-email-manabian@gmail.com> (raw)
This patch aims to remove the init/exit callbacks from the dwmac-
socfpga driver and instead use standard PM callbacks. Doing this
will also allow us to cleanup the driver.
Eventually the init/exit callbacks will be deprecated and removed
from all drivers dwmac-* except for dwmac-generic. Drivers will be
refactored to use standard PM and remove callbacks.
This patch set should not change the behavior of the driver itself,
it only moves code around. The only exception to this is patch
number 4 which restores the resume callback behavior which was
changed in the "net: stmmac: socfpga: Remove re-registration of
reset controller" patch. I belive calling phy_resume() only
from the resume callback and not probe is the right thing to do.
Changes from v1:
- Rebase on net-next
One heads-up here:
The first patch changes the prototype of a couple of
functions used in Alexandre's "add Ethernet glue logic for
stm32 chip" patch [1] and will cause build failures for
dwmac-stm32.c if not fixed up!
If Alexandre's patch set is applied first I will gladly
rebase my patch set to account for his driver as well.
[1] https://patchwork.ozlabs.org/patch/614405/
Dave: To avoid the build failure mentioned above you can
apply the changes below to the stm32 driver or
Alexandre can use it if he creates a new version
of his patch set.
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
@@ -133,7 +133,7 @@ static int stm32_dwmac_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct stmmac_priv *priv = netdev_priv(ndev);
- int ret = stmmac_dvr_remove(ndev);
+ int ret = stmmac_dvr_remove(&pdev->dev);
stm32_dwmac_clk_disable(priv->plat->bsp_priv);
@@ -147,7 +147,7 @@ static int stm32_dwmac_suspend(struct device *dev)
struct stmmac_priv *priv = netdev_priv(ndev);
int ret;
- ret = stmmac_suspend(ndev);
+ ret = stmmac_suspend(dev);
stm32_dwmac_clk_disable(priv->plat->bsp_priv);
return ret;
@@ -163,7 +163,7 @@ static int stm32_dwmac_resume(struct device *dev)
if (ret)
return ret;
- ret = stmmac_resume(ndev);
+ ret = stmmac_resume(dev);
return ret;
}
Joachim Eastwood (5):
stmmac: let remove/resume/suspend functions take device pointer
stmmac: dwmac-socfpga: add PM ops and resume function
stmmac: dwmac-socfpga: keep a copy of stmmac_rst in driver priv data
stmmac: dwmac-socfpga: call phy_resume() only in resume callback
stmmac: dwmac-socfpga: kill init() and rename setup() to set_phy_mode()
.../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 106 +++++++++++----------
drivers/net/ethernet/stmicro/stmmac/stmmac.h | 6 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 15 +--
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 24 +----
.../net/ethernet/stmicro/stmmac/stmmac_platform.c | 6 +-
5 files changed, 71 insertions(+), 86 deletions(-)
--
2.8.0
next reply other threads:[~2016-05-01 20:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-01 20:58 Joachim Eastwood [this message]
2016-05-01 20:58 ` [net-next PATCH v2 1/5] stmmac: let remove/resume/suspend functions take device pointer Joachim Eastwood
2016-05-01 20:58 ` [net-next PATCH v2 2/5] stmmac: dwmac-socfpga: add PM ops and resume function Joachim Eastwood
2016-05-01 20:58 ` [net-next PATCH v2 3/5] stmmac: dwmac-socfpga: keep a copy of stmmac_rst in driver priv data Joachim Eastwood
2016-05-01 20:58 ` [net-next PATCH v2 4/5] stmmac: dwmac-socfpga: call phy_resume() only in resume callback Joachim Eastwood
2016-05-01 20:58 ` [net-next PATCH v2 5/5] stmmac: dwmac-socfpga: kill init() and rename setup() to set_phy_mode() Joachim Eastwood
2016-05-03 19:22 ` [net-next PATCH v2 0/5] stmmac: dwmac-socfpga refactor+cleanup David Miller
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=1462136303-16825-1-git-send-email-manabian@gmail.com \
--to=manabian@gmail.com \
--cc=alexandre.torgue@st.com \
--cc=davem@davemloft.net \
--cc=dinguyen@opensource.altera.com \
--cc=marex@denx.de \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.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 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).