* [net PATCH 0/2] Fixes for davinci MDIO on suspend/resume
@ 2013-06-11 10:02 Mugunthan V N
2013-06-11 10:02 ` [net PATCH 1/2] drivers: net: davinci_mdio: moving mdio resume earlier than cpsw ethernet driver Mugunthan V N
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Mugunthan V N @ 2013-06-11 10:02 UTC (permalink / raw)
To: netdev; +Cc: davem, linux-omap, Mugunthan V N
This patch series fixes the following issues with Davinci MDIO
* Bring up MDIO driver earlier than Ethernet driver so that ethernet driver
can communicate with the phy as soon as it is resumed.
* On suspend/resume cycle the MDIO divider will be set to reset value so
this has to be programmed after resume.
Mugunthan V N (2):
drivers: net: davinci_mdio: moving mdio resume earlier than cpsw
ethernet driver
drivers: net: davinci_mdio: restore mdio clk divider in mdio resume
drivers/net/ethernet/ti/davinci_mdio.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [net PATCH 1/2] drivers: net: davinci_mdio: moving mdio resume earlier than cpsw ethernet driver
2013-06-11 10:02 [net PATCH 0/2] Fixes for davinci MDIO on suspend/resume Mugunthan V N
@ 2013-06-11 10:02 ` Mugunthan V N
2013-06-11 10:02 ` [net PATCH 2/2] drivers: net: davinci_mdio: restore mdio clk divider in mdio resume Mugunthan V N
2013-06-13 9:57 ` [net PATCH 0/2] Fixes for davinci MDIO on suspend/resume David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Mugunthan V N @ 2013-06-11 10:02 UTC (permalink / raw)
To: netdev; +Cc: davem, linux-omap, Mugunthan V N
MDIO driver should resume before CPSW ethernet driver so that CPSW connect
to the phy and start tx/rx ethernet packets, changing the suspend/resume
apis with suspend_late/resume_early.
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
drivers/net/ethernet/ti/davinci_mdio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index b2275d1..74e56b3 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -476,8 +476,8 @@ static int davinci_mdio_resume(struct device *dev)
}
static const struct dev_pm_ops davinci_mdio_pm_ops = {
- .suspend = davinci_mdio_suspend,
- .resume = davinci_mdio_resume,
+ .suspend_late = davinci_mdio_suspend,
+ .resume_early = davinci_mdio_resume,
};
static const struct of_device_id davinci_mdio_of_mtable[] = {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [net PATCH 2/2] drivers: net: davinci_mdio: restore mdio clk divider in mdio resume
2013-06-11 10:02 [net PATCH 0/2] Fixes for davinci MDIO on suspend/resume Mugunthan V N
2013-06-11 10:02 ` [net PATCH 1/2] drivers: net: davinci_mdio: moving mdio resume earlier than cpsw ethernet driver Mugunthan V N
@ 2013-06-11 10:02 ` Mugunthan V N
2013-06-13 9:57 ` [net PATCH 0/2] Fixes for davinci MDIO on suspend/resume David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Mugunthan V N @ 2013-06-11 10:02 UTC (permalink / raw)
To: netdev; +Cc: davem, linux-omap, Mugunthan V N
During suspend resume cycle all the register data is lost, so MDIO
clock divier value gets reset. This patch restores the clock divider
value.
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
drivers/net/ethernet/ti/davinci_mdio.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index 74e56b3..c47f0db 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -459,15 +459,12 @@ static int davinci_mdio_suspend(struct device *dev)
static int davinci_mdio_resume(struct device *dev)
{
struct davinci_mdio_data *data = dev_get_drvdata(dev);
- u32 ctrl;
pm_runtime_get_sync(data->dev);
spin_lock(&data->lock);
/* restart the scan state machine */
- ctrl = __raw_readl(&data->regs->control);
- ctrl |= CONTROL_ENABLE;
- __raw_writel(ctrl, &data->regs->control);
+ __davinci_mdio_reset(data);
data->suspended = false;
spin_unlock(&data->lock);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [net PATCH 0/2] Fixes for davinci MDIO on suspend/resume
2013-06-11 10:02 [net PATCH 0/2] Fixes for davinci MDIO on suspend/resume Mugunthan V N
2013-06-11 10:02 ` [net PATCH 1/2] drivers: net: davinci_mdio: moving mdio resume earlier than cpsw ethernet driver Mugunthan V N
2013-06-11 10:02 ` [net PATCH 2/2] drivers: net: davinci_mdio: restore mdio clk divider in mdio resume Mugunthan V N
@ 2013-06-13 9:57 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-06-13 9:57 UTC (permalink / raw)
To: mugunthanvnm; +Cc: netdev, linux-omap
From: Mugunthan V N <mugunthanvnm@ti.com>
Date: Tue, 11 Jun 2013 15:32:03 +0530
> This patch series fixes the following issues with Davinci MDIO
> * Bring up MDIO driver earlier than Ethernet driver so that ethernet driver
> can communicate with the phy as soon as it is resumed.
> * On suspend/resume cycle the MDIO divider will be set to reset value so
> this has to be programmed after resume.
Series applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-13 9:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-11 10:02 [net PATCH 0/2] Fixes for davinci MDIO on suspend/resume Mugunthan V N
2013-06-11 10:02 ` [net PATCH 1/2] drivers: net: davinci_mdio: moving mdio resume earlier than cpsw ethernet driver Mugunthan V N
2013-06-11 10:02 ` [net PATCH 2/2] drivers: net: davinci_mdio: restore mdio clk divider in mdio resume Mugunthan V N
2013-06-13 9:57 ` [net PATCH 0/2] Fixes for davinci MDIO on suspend/resume David Miller
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).