netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next v2 0/7] stmmac: dwmac-sti refactor+cleanup
@ 2016-11-04 17:54 Joachim Eastwood
  2016-11-04 17:54 ` [net-next v2 1/7] stmmac: dwmac-sti: remove useless of_node check Joachim Eastwood
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Joachim Eastwood @ 2016-11-04 17:54 UTC (permalink / raw)
  To: davem; +Cc: Joachim Eastwood, peppe.cavallaro, alexandre.torgue, netdev

This patch set aims to remove the init/exit callbacks from the 
dwmac-sti 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.

Changes since v2:
 - add missing static to sti_dwmac_pm_ops
 - s/sti_dwmac_set_phy_mode/sti_dwmac_set_mode
 - acked/tested by Giuseppe

Joachim Eastwood (7):
  stmmac: dwmac-sti: remove useless of_node check
  stmmac: dwmac-sti: remove clk NULL checks
  stmmac: dwmac-sti: add PM ops and resume function
  stmmac: dwmac-sti: move st,gmac_en parsing to sti_dwmac_parse_data
  stmmac: dwmac-sti: move clk_prepare_enable out of init and add error handling
  stmmac: dwmac-sti: clean up and rename sti_dwmac_init
  stmmac: dwmac-sti: remove unused priv dev member

 drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 87 ++++++++++++++++---------
 1 file changed, 58 insertions(+), 29 deletions(-)

-- 
2.10.2

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [net-next v2 1/7] stmmac: dwmac-sti: remove useless of_node check
  2016-11-04 17:54 [net-next v2 0/7] stmmac: dwmac-sti refactor+cleanup Joachim Eastwood
@ 2016-11-04 17:54 ` Joachim Eastwood
  2016-11-04 17:54 ` [net-next v2 2/7] stmmac: dwmac-sti: remove clk NULL checks Joachim Eastwood
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Joachim Eastwood @ 2016-11-04 17:54 UTC (permalink / raw)
  To: davem; +Cc: Joachim Eastwood, peppe.cavallaro, alexandre.torgue, netdev

Since dwmac-sti is a DT only driver checking for OF node is not necessary.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
index 58c05ac..075ed42 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
@@ -270,9 +270,6 @@ static int sti_dwmac_parse_data(struct sti_dwmac *dwmac,
 	struct regmap *regmap;
 	int err;
 
-	if (!np)
-		return -EINVAL;
-
 	/* clk selection from extra syscfg register */
 	dwmac->clk_sel_reg = -ENXIO;
 	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "sti-clkconf");
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [net-next v2 2/7] stmmac: dwmac-sti: remove clk NULL checks
  2016-11-04 17:54 [net-next v2 0/7] stmmac: dwmac-sti refactor+cleanup Joachim Eastwood
  2016-11-04 17:54 ` [net-next v2 1/7] stmmac: dwmac-sti: remove useless of_node check Joachim Eastwood
@ 2016-11-04 17:54 ` Joachim Eastwood
  2016-11-04 17:54 ` [net-next v2 3/7] stmmac: dwmac-sti: add PM ops and resume function Joachim Eastwood
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Joachim Eastwood @ 2016-11-04 17:54 UTC (permalink / raw)
  To: davem; +Cc: Joachim Eastwood, peppe.cavallaro, alexandre.torgue, netdev

Since sti_dwmac_parse_data() sets dwmac->clk to NULL if not clock was
provided in DT and NULL is a valid clock there is no need to check for
NULL before using this clock.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
index 075ed42..f009bf4 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
@@ -191,7 +191,7 @@ static void stih4xx_fix_retime_src(void *priv, u32 spd)
 		}
 	}
 
-	if (src == TX_RETIME_SRC_CLKGEN && dwmac->clk && freq)
+	if (src == TX_RETIME_SRC_CLKGEN && freq)
 		clk_set_rate(dwmac->clk, freq);
 
 	regmap_update_bits(dwmac->regmap, reg, STIH4XX_RETIME_SRC_MASK,
@@ -222,7 +222,7 @@ static void stid127_fix_retime_src(void *priv, u32 spd)
 			freq = DWMAC_2_5MHZ;
 	}
 
-	if (dwmac->clk && freq)
+	if (freq)
 		clk_set_rate(dwmac->clk, freq);
 
 	regmap_update_bits(dwmac->regmap, reg, STID127_RETIME_SRC_MASK, val);
@@ -238,8 +238,7 @@ static int sti_dwmac_init(struct platform_device *pdev, void *priv)
 	u32 reg = dwmac->ctrl_reg;
 	u32 val;
 
-	if (dwmac->clk)
-		clk_prepare_enable(dwmac->clk);
+	clk_prepare_enable(dwmac->clk);
 
 	if (of_property_read_bool(np, "st,gmac_en"))
 		regmap_update_bits(regmap, reg, EN_MASK, EN);
@@ -258,8 +257,7 @@ static void sti_dwmac_exit(struct platform_device *pdev, void *priv)
 {
 	struct sti_dwmac *dwmac = priv;
 
-	if (dwmac->clk)
-		clk_disable_unprepare(dwmac->clk);
+	clk_disable_unprepare(dwmac->clk);
 }
 static int sti_dwmac_parse_data(struct sti_dwmac *dwmac,
 				struct platform_device *pdev)
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [net-next v2 3/7] stmmac: dwmac-sti: add PM ops and resume function
  2016-11-04 17:54 [net-next v2 0/7] stmmac: dwmac-sti refactor+cleanup Joachim Eastwood
  2016-11-04 17:54 ` [net-next v2 1/7] stmmac: dwmac-sti: remove useless of_node check Joachim Eastwood
  2016-11-04 17:54 ` [net-next v2 2/7] stmmac: dwmac-sti: remove clk NULL checks Joachim Eastwood
@ 2016-11-04 17:54 ` Joachim Eastwood
  2016-11-04 17:54 ` [net-next v2 4/7] stmmac: dwmac-sti: move st,gmac_en parsing to sti_dwmac_parse_data Joachim Eastwood
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Joachim Eastwood @ 2016-11-04 17:54 UTC (permalink / raw)
  To: davem; +Cc: Joachim Eastwood, peppe.cavallaro, alexandre.torgue, netdev

Implement PM callbacks and driver remove in the driver instead
of relying on the init/exit hooks in stmmac_platform. This gives
the driver more flexibility in how the code is organized.

Eventually the init/exit callbacks will be deprecated in favor
of the standard PM callbacks and driver remove function.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 47 +++++++++++++++++++------
 1 file changed, 37 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
index f009bf4..bd6db22 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
@@ -253,12 +253,6 @@ static int sti_dwmac_init(struct platform_device *pdev, void *priv)
 	return 0;
 }
 
-static void sti_dwmac_exit(struct platform_device *pdev, void *priv)
-{
-	struct sti_dwmac *dwmac = priv;
-
-	clk_disable_unprepare(dwmac->clk);
-}
 static int sti_dwmac_parse_data(struct sti_dwmac *dwmac,
 				struct platform_device *pdev)
 {
@@ -352,8 +346,6 @@ static int sti_dwmac_probe(struct platform_device *pdev)
 	dwmac->fix_retime_src = data->fix_retime_src;
 
 	plat_dat->bsp_priv = dwmac;
-	plat_dat->init = sti_dwmac_init;
-	plat_dat->exit = sti_dwmac_exit;
 	plat_dat->fix_mac_speed = data->fix_retime_src;
 
 	ret = sti_dwmac_init(pdev, plat_dat->bsp_priv);
@@ -363,6 +355,41 @@ static int sti_dwmac_probe(struct platform_device *pdev)
 	return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
 }
 
+static int sti_dwmac_remove(struct platform_device *pdev)
+{
+	struct sti_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev);
+	int ret = stmmac_dvr_remove(&pdev->dev);
+
+	clk_disable_unprepare(dwmac->clk);
+
+	return ret;
+}
+
+#ifdef CONFIG_PM_SLEEP
+static int sti_dwmac_suspend(struct device *dev)
+{
+	struct sti_dwmac *dwmac = get_stmmac_bsp_priv(dev);
+	int ret = stmmac_suspend(dev);
+
+	clk_disable_unprepare(dwmac->clk);
+
+	return ret;
+}
+
+static int sti_dwmac_resume(struct device *dev)
+{
+	struct sti_dwmac *dwmac = get_stmmac_bsp_priv(dev);
+	struct platform_device *pdev = to_platform_device(dev);
+
+	sti_dwmac_init(pdev, dwmac);
+
+	return stmmac_resume(dev);
+}
+#endif /* CONFIG_PM_SLEEP */
+
+static SIMPLE_DEV_PM_OPS(sti_dwmac_pm_ops, sti_dwmac_suspend,
+					   sti_dwmac_resume);
+
 static const struct sti_dwmac_of_data stih4xx_dwmac_data = {
 	.fix_retime_src = stih4xx_fix_retime_src,
 };
@@ -382,10 +409,10 @@ MODULE_DEVICE_TABLE(of, sti_dwmac_match);
 
 static struct platform_driver sti_dwmac_driver = {
 	.probe  = sti_dwmac_probe,
-	.remove = stmmac_pltfr_remove,
+	.remove = sti_dwmac_remove,
 	.driver = {
 		.name           = "sti-dwmac",
-		.pm		= &stmmac_pltfr_pm_ops,
+		.pm		= &sti_dwmac_pm_ops,
 		.of_match_table = sti_dwmac_match,
 	},
 };
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [net-next v2 4/7] stmmac: dwmac-sti: move st,gmac_en parsing to sti_dwmac_parse_data
  2016-11-04 17:54 [net-next v2 0/7] stmmac: dwmac-sti refactor+cleanup Joachim Eastwood
                   ` (2 preceding siblings ...)
  2016-11-04 17:54 ` [net-next v2 3/7] stmmac: dwmac-sti: add PM ops and resume function Joachim Eastwood
@ 2016-11-04 17:54 ` Joachim Eastwood
  2016-11-04 17:54 ` [net-next v2 5/7] stmmac: dwmac-sti: move clk_prepare_enable out of init and add error handling Joachim Eastwood
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Joachim Eastwood @ 2016-11-04 17:54 UTC (permalink / raw)
  To: davem; +Cc: Joachim Eastwood, peppe.cavallaro, alexandre.torgue, netdev

The sti_dwmac_init() function is called both from probe and resume.
Since DT properties doesn't change between suspend/resume cycles move
parsing of this parameter into sti_dwmac_parse_data() where it belongs.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
index bd6db22..269c7a5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
@@ -128,6 +128,7 @@ struct sti_dwmac {
 	int clk_sel_reg;	/* GMAC ext clk selection register */
 	struct device *dev;
 	struct regmap *regmap;
+	bool gmac_en;
 	u32 speed;
 	void (*fix_retime_src)(void *priv, unsigned int speed);
 };
@@ -233,14 +234,12 @@ static int sti_dwmac_init(struct platform_device *pdev, void *priv)
 	struct sti_dwmac *dwmac = priv;
 	struct regmap *regmap = dwmac->regmap;
 	int iface = dwmac->interface;
-	struct device *dev = dwmac->dev;
-	struct device_node *np = dev->of_node;
 	u32 reg = dwmac->ctrl_reg;
 	u32 val;
 
 	clk_prepare_enable(dwmac->clk);
 
-	if (of_property_read_bool(np, "st,gmac_en"))
+	if (dwmac->gmac_en)
 		regmap_update_bits(regmap, reg, EN_MASK, EN);
 
 	regmap_update_bits(regmap, reg, MII_PHY_SEL_MASK, phy_intf_sels[iface]);
@@ -281,6 +280,7 @@ static int sti_dwmac_parse_data(struct sti_dwmac *dwmac,
 	dwmac->dev = dev;
 	dwmac->interface = of_get_phy_mode(np);
 	dwmac->regmap = regmap;
+	dwmac->gmac_en = of_property_read_bool(np, "st,gmac_en");
 	dwmac->ext_phyclk = of_property_read_bool(np, "st,ext-phyclk");
 	dwmac->tx_retime_src = TX_RETIME_SRC_NA;
 	dwmac->speed = SPEED_100;
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [net-next v2 5/7] stmmac: dwmac-sti: move clk_prepare_enable out of init and add error handling
  2016-11-04 17:54 [net-next v2 0/7] stmmac: dwmac-sti refactor+cleanup Joachim Eastwood
                   ` (3 preceding siblings ...)
  2016-11-04 17:54 ` [net-next v2 4/7] stmmac: dwmac-sti: move st,gmac_en parsing to sti_dwmac_parse_data Joachim Eastwood
@ 2016-11-04 17:54 ` Joachim Eastwood
  2016-11-04 17:54 ` [net-next v2 6/7] stmmac: dwmac-sti: clean up and rename sti_dwmac_init Joachim Eastwood
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Joachim Eastwood @ 2016-11-04 17:54 UTC (permalink / raw)
  To: davem; +Cc: Joachim Eastwood, peppe.cavallaro, alexandre.torgue, netdev

Add clock error handling to probe and in the process move clock enabling
out of sti_dwmac_init() to make this easier.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
index 269c7a5..b71888a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
@@ -237,8 +237,6 @@ static int sti_dwmac_init(struct platform_device *pdev, void *priv)
 	u32 reg = dwmac->ctrl_reg;
 	u32 val;
 
-	clk_prepare_enable(dwmac->clk);
-
 	if (dwmac->gmac_en)
 		regmap_update_bits(regmap, reg, EN_MASK, EN);
 
@@ -348,11 +346,23 @@ static int sti_dwmac_probe(struct platform_device *pdev)
 	plat_dat->bsp_priv = dwmac;
 	plat_dat->fix_mac_speed = data->fix_retime_src;
 
-	ret = sti_dwmac_init(pdev, plat_dat->bsp_priv);
+	ret = clk_prepare_enable(dwmac->clk);
 	if (ret)
 		return ret;
 
-	return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
+	ret = sti_dwmac_init(pdev, plat_dat->bsp_priv);
+	if (ret)
+		goto disable_clk;
+
+	ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
+	if (ret)
+		goto disable_clk;
+
+	return 0;
+
+disable_clk:
+	clk_disable_unprepare(dwmac->clk);
+	return ret;
 }
 
 static int sti_dwmac_remove(struct platform_device *pdev)
@@ -381,6 +391,7 @@ static int sti_dwmac_resume(struct device *dev)
 	struct sti_dwmac *dwmac = get_stmmac_bsp_priv(dev);
 	struct platform_device *pdev = to_platform_device(dev);
 
+	clk_prepare_enable(dwmac->clk);
 	sti_dwmac_init(pdev, dwmac);
 
 	return stmmac_resume(dev);
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [net-next v2 6/7] stmmac: dwmac-sti: clean up and rename sti_dwmac_init
  2016-11-04 17:54 [net-next v2 0/7] stmmac: dwmac-sti refactor+cleanup Joachim Eastwood
                   ` (4 preceding siblings ...)
  2016-11-04 17:54 ` [net-next v2 5/7] stmmac: dwmac-sti: move clk_prepare_enable out of init and add error handling Joachim Eastwood
@ 2016-11-04 17:54 ` Joachim Eastwood
  2016-11-04 17:54 ` [net-next v2 7/7] stmmac: dwmac-sti: remove unused priv dev member Joachim Eastwood
  2016-11-07  3:00 ` [net-next v2 0/7] stmmac: dwmac-sti refactor+cleanup David Miller
  7 siblings, 0 replies; 9+ messages in thread
From: Joachim Eastwood @ 2016-11-04 17:54 UTC (permalink / raw)
  To: davem; +Cc: Joachim Eastwood, peppe.cavallaro, alexandre.torgue, netdev

Rename sti_dwmac_init to sti_dwmac_set_mode which is a better
description for what it really does.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
index b71888a..ac17bff 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
@@ -229,9 +229,8 @@ static void stid127_fix_retime_src(void *priv, u32 spd)
 	regmap_update_bits(dwmac->regmap, reg, STID127_RETIME_SRC_MASK, val);
 }
 
-static int sti_dwmac_init(struct platform_device *pdev, void *priv)
+static int sti_dwmac_set_mode(struct sti_dwmac *dwmac)
 {
-	struct sti_dwmac *dwmac = priv;
 	struct regmap *regmap = dwmac->regmap;
 	int iface = dwmac->interface;
 	u32 reg = dwmac->ctrl_reg;
@@ -245,7 +244,7 @@ static int sti_dwmac_init(struct platform_device *pdev, void *priv)
 	val = (iface == PHY_INTERFACE_MODE_REVMII) ? 0 : ENMII;
 	regmap_update_bits(regmap, reg, ENMII_MASK, val);
 
-	dwmac->fix_retime_src(priv, dwmac->speed);
+	dwmac->fix_retime_src(dwmac, dwmac->speed);
 
 	return 0;
 }
@@ -350,7 +349,7 @@ static int sti_dwmac_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	ret = sti_dwmac_init(pdev, plat_dat->bsp_priv);
+	ret = sti_dwmac_set_mode(dwmac);
 	if (ret)
 		goto disable_clk;
 
@@ -389,10 +388,9 @@ static int sti_dwmac_suspend(struct device *dev)
 static int sti_dwmac_resume(struct device *dev)
 {
 	struct sti_dwmac *dwmac = get_stmmac_bsp_priv(dev);
-	struct platform_device *pdev = to_platform_device(dev);
 
 	clk_prepare_enable(dwmac->clk);
-	sti_dwmac_init(pdev, dwmac);
+	sti_dwmac_set_mode(dwmac);
 
 	return stmmac_resume(dev);
 }
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [net-next v2 7/7] stmmac: dwmac-sti: remove unused priv dev member
  2016-11-04 17:54 [net-next v2 0/7] stmmac: dwmac-sti refactor+cleanup Joachim Eastwood
                   ` (5 preceding siblings ...)
  2016-11-04 17:54 ` [net-next v2 6/7] stmmac: dwmac-sti: clean up and rename sti_dwmac_init Joachim Eastwood
@ 2016-11-04 17:54 ` Joachim Eastwood
  2016-11-07  3:00 ` [net-next v2 0/7] stmmac: dwmac-sti refactor+cleanup David Miller
  7 siblings, 0 replies; 9+ messages in thread
From: Joachim Eastwood @ 2016-11-04 17:54 UTC (permalink / raw)
  To: davem; +Cc: Joachim Eastwood, peppe.cavallaro, alexandre.torgue, netdev

The dev member of struct sti_dwmac is not used anywhere in the driver
so lets just remove it.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
index ac17bff..c9006ab 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
@@ -126,7 +126,6 @@ struct sti_dwmac {
 	struct clk *clk;	/* PHY clock */
 	u32 ctrl_reg;		/* GMAC glue-logic control register */
 	int clk_sel_reg;	/* GMAC ext clk selection register */
-	struct device *dev;
 	struct regmap *regmap;
 	bool gmac_en;
 	u32 speed;
@@ -274,7 +273,6 @@ static int sti_dwmac_parse_data(struct sti_dwmac *dwmac,
 		return err;
 	}
 
-	dwmac->dev = dev;
 	dwmac->interface = of_get_phy_mode(np);
 	dwmac->regmap = regmap;
 	dwmac->gmac_en = of_property_read_bool(np, "st,gmac_en");
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [net-next v2 0/7] stmmac: dwmac-sti refactor+cleanup
  2016-11-04 17:54 [net-next v2 0/7] stmmac: dwmac-sti refactor+cleanup Joachim Eastwood
                   ` (6 preceding siblings ...)
  2016-11-04 17:54 ` [net-next v2 7/7] stmmac: dwmac-sti: remove unused priv dev member Joachim Eastwood
@ 2016-11-07  3:00 ` David Miller
  7 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2016-11-07  3:00 UTC (permalink / raw)
  To: manabian; +Cc: peppe.cavallaro, alexandre.torgue, netdev

From: Joachim Eastwood <manabian@gmail.com>
Date: Fri,  4 Nov 2016 18:54:04 +0100

> This patch set aims to remove the init/exit callbacks from the 
> dwmac-sti 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.
> 
> Changes since v2:
>  - add missing static to sti_dwmac_pm_ops
>  - s/sti_dwmac_set_phy_mode/sti_dwmac_set_mode
>  - acked/tested by Giuseppe

Series applied, thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-11-07  3:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-04 17:54 [net-next v2 0/7] stmmac: dwmac-sti refactor+cleanup Joachim Eastwood
2016-11-04 17:54 ` [net-next v2 1/7] stmmac: dwmac-sti: remove useless of_node check Joachim Eastwood
2016-11-04 17:54 ` [net-next v2 2/7] stmmac: dwmac-sti: remove clk NULL checks Joachim Eastwood
2016-11-04 17:54 ` [net-next v2 3/7] stmmac: dwmac-sti: add PM ops and resume function Joachim Eastwood
2016-11-04 17:54 ` [net-next v2 4/7] stmmac: dwmac-sti: move st,gmac_en parsing to sti_dwmac_parse_data Joachim Eastwood
2016-11-04 17:54 ` [net-next v2 5/7] stmmac: dwmac-sti: move clk_prepare_enable out of init and add error handling Joachim Eastwood
2016-11-04 17:54 ` [net-next v2 6/7] stmmac: dwmac-sti: clean up and rename sti_dwmac_init Joachim Eastwood
2016-11-04 17:54 ` [net-next v2 7/7] stmmac: dwmac-sti: remove unused priv dev member Joachim Eastwood
2016-11-07  3:00 ` [net-next v2 0/7] stmmac: dwmac-sti refactor+cleanup 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).