All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-next 1/4] stmmac: use custom init/exit functions in pm ops
@ 2012-04-19  5:48 Giuseppe CAVALLARO
  2012-04-19  5:48 ` [net-next 2/4 (v2)] stmmac: Move the mdio_register/_unregister in probe/remove Giuseppe CAVALLARO
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Giuseppe CAVALLARO @ 2012-04-19  5:48 UTC (permalink / raw)
  To: netdev; +Cc: Francesco Virlinzi, Giuseppe Cavallaro

From: Francesco Virlinzi <francesco.virlinzi@st.com>

Freeze and restore can call the custom init/exit functions.
Also the patch adds a custom data field that can be used
for storing platform data useful on restore the embedded
setup (e.g. GPIO, SYSCFG).

Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 .../net/ethernet/stmicro/stmmac/stmmac_platform.c  |   17 +++++++++++++----
 include/linux/stmmac.h                             |    1 +
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 12bd221..ba30d38 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -189,9 +189,6 @@ static int stmmac_pltfr_remove(struct platform_device *pdev)
 	if (priv->plat->exit)
 		priv->plat->exit(pdev);
 
-	if (priv->plat->exit)
-		priv->plat->exit(pdev);
-
 	platform_set_drvdata(pdev, NULL);
 
 	iounmap((void *)priv->ioaddr);
@@ -218,14 +215,26 @@ static int stmmac_pltfr_resume(struct device *dev)
 
 int stmmac_pltfr_freeze(struct device *dev)
 {
+	int ret;
+	struct plat_stmmacenet_data *plat_dat = dev_get_platdata(dev);
 	struct net_device *ndev = dev_get_drvdata(dev);
+	struct platform_device *pdev = to_platform_device(dev);
 
-	return stmmac_freeze(ndev);
+	ret = stmmac_freeze(ndev);
+	if (plat_dat->exit)
+		plat_dat->exit(pdev);
+
+	return ret;
 }
 
 int stmmac_pltfr_restore(struct device *dev)
 {
+	struct plat_stmmacenet_data *plat_dat = dev_get_platdata(dev);
 	struct net_device *ndev = dev_get_drvdata(dev);
+	struct platform_device *pdev = to_platform_device(dev);
+
+	if (plat_dat->init)
+		plat_dat->init(pdev);
 
 	return stmmac_restore(ndev);
 }
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index cf64031..f85c93d 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -109,6 +109,7 @@ struct plat_stmmacenet_data {
 	int (*init)(struct platform_device *pdev);
 	void (*exit)(struct platform_device *pdev);
 	void *custom_cfg;
+	void *custom_data;
 	void *bsp_priv;
 };
 #endif
-- 
1.7.4.4

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

* [net-next 2/4 (v2)] stmmac: Move the mdio_register/_unregister in probe/remove
  2012-04-19  5:48 [net-next 1/4] stmmac: use custom init/exit functions in pm ops Giuseppe CAVALLARO
@ 2012-04-19  5:48 ` Giuseppe CAVALLARO
  2012-04-20  0:09   ` David Miller
  2012-04-19  5:48 ` [net-next 3/4] stmmac: verify the dma_cfg platform fields Giuseppe CAVALLARO
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Giuseppe CAVALLARO @ 2012-04-19  5:48 UTC (permalink / raw)
  To: netdev; +Cc: Francesco Virlinzi

From: Francesco Virlinzi <francesco.virlinzi@st.com>

This patch moves the mdio_register/_unregister in probe/remove
functions and this also is required when hibernation on disk
is done.

---

v2: remove useless open_clk_dis label and do a simple tidy-up
in the open function.

Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st,com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st,com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |   34 ++++++++++-----------
 1 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index a64f0d4..9ecd6cf 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -933,24 +933,10 @@ static int stmmac_open(struct net_device *dev)
 	struct stmmac_priv *priv = netdev_priv(dev);
 	int ret;
 
-	stmmac_clk_enable(priv);
-
-	stmmac_check_ether_addr(priv);
-
-	/* MDIO bus Registration */
-	ret = stmmac_mdio_register(dev);
-	if (ret < 0) {
-		pr_debug("%s: MDIO bus (id: %d) registration failed",
-			 __func__, priv->plat->bus_id);
-		goto open_clk_dis;
-	}
-
 #ifdef CONFIG_STMMAC_TIMER
 	priv->tm = kzalloc(sizeof(struct stmmac_timer *), GFP_KERNEL);
-	if (unlikely(priv->tm == NULL)) {
-		ret = -ENOMEM;
-		goto open_clk_dis;
-	}
+	if (unlikely(priv->tm == NULL))
+		return -ENOMEM;
 
 	priv->tm->freq = tmrate;
 
@@ -964,6 +950,10 @@ static int stmmac_open(struct net_device *dev)
 	} else
 		priv->tm->enable = 1;
 #endif
+	stmmac_clk_enable(priv);
+
+	stmmac_check_ether_addr(priv);
+
 	ret = stmmac_init_phy(dev);
 	if (unlikely(ret)) {
 		pr_err("%s: Cannot attach to PHY (error: %d)\n", __func__, ret);
@@ -1067,8 +1057,8 @@ open_error:
 	if (priv->phydev)
 		phy_disconnect(priv->phydev);
 
-open_clk_dis:
 	stmmac_clk_disable(priv);
+
 	return ret;
 }
 
@@ -1120,7 +1110,6 @@ static int stmmac_release(struct net_device *dev)
 #ifdef CONFIG_STMMAC_DEBUG_FS
 	stmmac_exit_fs();
 #endif
-	stmmac_mdio_unregister(dev);
 	stmmac_clk_disable(priv);
 
 	return 0;
@@ -1932,6 +1921,14 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device,
 	else
 		priv->clk_csr = priv->plat->clk_csr;
 
+	/* MDIO bus Registration */
+	ret = stmmac_mdio_register(ndev);
+	if (ret < 0) {
+		pr_debug("%s: MDIO bus (id: %d) registration failed",
+			 __func__, priv->plat->bus_id);
+		goto error;
+	}
+
 	return priv;
 
 error:
@@ -1959,6 +1956,7 @@ int stmmac_dvr_remove(struct net_device *ndev)
 	priv->hw->dma->stop_tx(priv->ioaddr);
 
 	stmmac_set_mac(priv->ioaddr, false);
+	stmmac_mdio_unregister(ndev);
 	netif_carrier_off(ndev);
 	unregister_netdev(ndev);
 	free_netdev(ndev);
-- 
1.7.4.4

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

* [net-next 3/4] stmmac: verify the dma_cfg platform fields
  2012-04-19  5:48 [net-next 1/4] stmmac: use custom init/exit functions in pm ops Giuseppe CAVALLARO
  2012-04-19  5:48 ` [net-next 2/4 (v2)] stmmac: Move the mdio_register/_unregister in probe/remove Giuseppe CAVALLARO
@ 2012-04-19  5:48 ` Giuseppe CAVALLARO
  2012-04-19  6:05   ` Viresh Kumar
  2012-04-20  0:09   ` David Miller
  2012-04-19  5:48 ` [net-next 4/4] stmmac: do not fail when probe and there is no csr clk defined Giuseppe CAVALLARO
  2012-04-20  0:06 ` [net-next 1/4] stmmac: use custom init/exit functions in pm ops David Miller
  3 siblings, 2 replies; 10+ messages in thread
From: Giuseppe CAVALLARO @ 2012-04-19  5:48 UTC (permalink / raw)
  To: netdev; +Cc: Giuseppe Cavallaro, Viresh Kumar

Recently the dma parameters that can be passed from the platform
have been moved from the plat_stmmacenet_data to the stmmac_dma_cfg.

In case of this new structure is not well allocated the driver can
fails. This is an example how this field is managed in ST platforms

static struct stmmac_dma_cfg gmac_dma_setting = {
        .pbl = 32,
};

static struct plat_stmmacenet_data stih415_ethernet_platform_data[] = {
	{
		.dma_cfg = &gmac_dma_setting,
		.has_gmac = 1,
[snip]

This patch so verifies that the dma_cfg passed from the platform.
In case of it is NULL there is no reason that the driver has to fail
and some default values can be passed. These are ok for all the
Synopsys chips and could impact on performances, only.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
cc: Viresh Kumar <viresh.kumar@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/common.h       |    1 +
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  |   23 ++++++++++++++++---
 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c   |    7 ++++-
 .../net/ethernet/stmicro/stmmac/stmmac_platform.c  |    1 -
 4 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h
index 9e42b5d..f5dedcb 100644
--- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/drivers/net/ethernet/stmicro/stmmac/common.h
@@ -147,6 +147,7 @@ struct stmmac_extra_stats {
 #define DMA_HW_FEAT_FLEXIPPSEN	0x04000000 /* Flexible PPS Output */
 #define DMA_HW_FEAT_SAVLANINS	0x08000000 /* Source Addr or VLAN Insertion */
 #define DMA_HW_FEAT_ACTPHYIF	0x70000000 /* Active/selected PHY interface */
+#define DEFAULT_DMA_PBL		8
 
 enum rx_frame_status { /* IPC status */
 	good_frame = 0,
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 9ecd6cf..efc42e1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -919,6 +919,24 @@ static void stmmac_check_ether_addr(struct stmmac_priv *priv)
 						   priv->dev->dev_addr);
 }
 
+static int stmmac_init_dma_engine(struct stmmac_priv *priv)
+{
+	int pbl = DEFAULT_DMA_PBL, fixed_burst = 0, burst_len = 0;
+
+	/* Some DMA parameters can be passed from the platform;
+	 * in case of these are not passed we keep a default
+	 * (good for all the chips) and init the DMA! */
+	if (priv->plat->dma_cfg) {
+		pbl = priv->plat->dma_cfg->pbl;
+		fixed_burst = priv->plat->dma_cfg->fixed_burst;
+		burst_len = priv->plat->dma_cfg->burst_len;
+	}
+
+	return priv->hw->dma->init(priv->ioaddr, pbl, fixed_burst,
+				   burst_len, priv->dma_tx_phy,
+				   priv->dma_rx_phy);
+}
+
 /**
  *  stmmac_open - open entry point of the driver
  *  @dev : pointer to the device structure.
@@ -967,10 +985,7 @@ static int stmmac_open(struct net_device *dev)
 	init_dma_desc_rings(dev);
 
 	/* DMA initialization and SW reset */
-	ret = priv->hw->dma->init(priv->ioaddr, priv->plat->dma_cfg->pbl,
-				  priv->plat->dma_cfg->fixed_burst,
-				  priv->plat->dma_cfg->burst_len,
-				  priv->dma_tx_phy, priv->dma_rx_phy);
+	ret = stmmac_init_dma_engine(priv);
 	if (ret < 0) {
 		pr_err("%s: DMA initialization failed\n", __func__);
 		goto open_error;
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
index 65e0f98..58fab53 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
@@ -28,6 +28,7 @@
 
 struct plat_stmmacenet_data plat_dat;
 struct stmmac_mdio_bus_data mdio_data;
+struct stmmac_dma_cfg dma_cfg;
 
 static void stmmac_default_data(void)
 {
@@ -35,8 +36,6 @@ static void stmmac_default_data(void)
 	plat_dat.bus_id = 1;
 	plat_dat.phy_addr = 0;
 	plat_dat.interface = PHY_INTERFACE_MODE_GMII;
-	plat_dat.dma_cfg->pbl = 32;
-	plat_dat.dma_cfg->burst_len = DMA_AXI_BLEN_256;
 	plat_dat.clk_csr = 2;	/* clk_csr_i = 20-35MHz & MDC = clk_csr_i/16 */
 	plat_dat.has_gmac = 1;
 	plat_dat.force_sf_dma_mode = 1;
@@ -45,6 +44,10 @@ static void stmmac_default_data(void)
 	mdio_data.phy_reset = NULL;
 	mdio_data.phy_mask = 0;
 	plat_dat.mdio_bus_data = &mdio_data;
+
+	dma_cfg.pbl = 32;
+	dma_cfg.burst_len = DMA_AXI_BLEN_256;
+	plat_dat.dma_cfg = &dma_cfg;
 }
 
 /**
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index ba30d38..3dd8f08 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -50,7 +50,6 @@ static int __devinit stmmac_probe_config_dt(struct platform_device *pdev,
 	 * once needed on other platforms.
 	 */
 	if (of_device_is_compatible(np, "st,spear600-gmac")) {
-		plat->dma_cfg->pbl = 8;
 		plat->has_gmac = 1;
 		plat->pmt = 1;
 	}
-- 
1.7.4.4

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

* [net-next 4/4] stmmac: do not fail when probe and there is no csr clk defined
  2012-04-19  5:48 [net-next 1/4] stmmac: use custom init/exit functions in pm ops Giuseppe CAVALLARO
  2012-04-19  5:48 ` [net-next 2/4 (v2)] stmmac: Move the mdio_register/_unregister in probe/remove Giuseppe CAVALLARO
  2012-04-19  5:48 ` [net-next 3/4] stmmac: verify the dma_cfg platform fields Giuseppe CAVALLARO
@ 2012-04-19  5:48 ` Giuseppe CAVALLARO
  2012-04-20  0:09   ` David Miller
  2012-04-20  0:06 ` [net-next 1/4] stmmac: use custom init/exit functions in pm ops David Miller
  3 siblings, 1 reply; 10+ messages in thread
From: Giuseppe CAVALLARO @ 2012-04-19  5:48 UTC (permalink / raw)
  To: netdev; +Cc: Giuseppe Cavallaro

On some platforms, for example where we are doing the bring-up,
the csr clock is not passed from the framework and the Ethernet
device driver is failing when it can work w/o any issues and
using the default values. So this patch just warnings the case
of the csr clock cannot be acquired but w/o failing the probe
step. I have just tested it on ST STiH415 SoC (ARM).

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac.h      |   13 +++++++------
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |    5 ++++-
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index 9f2435c..db2de9a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -107,7 +107,7 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device,
 #ifdef CONFIG_HAVE_CLK
 static inline int stmmac_clk_enable(struct stmmac_priv *priv)
 {
-	if (priv->stmmac_clk)
+	if (!IS_ERR(priv->stmmac_clk))
 		return clk_enable(priv->stmmac_clk);
 
 	return 0;
@@ -115,17 +115,18 @@ static inline int stmmac_clk_enable(struct stmmac_priv *priv)
 
 static inline void stmmac_clk_disable(struct stmmac_priv *priv)
 {
-	if (priv->stmmac_clk)
-		clk_disable(priv->stmmac_clk);
+	if (IS_ERR(priv->stmmac_clk))
+		return;
+
+	clk_disable(priv->stmmac_clk);
 }
 static inline int stmmac_clk_get(struct stmmac_priv *priv)
 {
 	priv->stmmac_clk = clk_get(priv->device, NULL);
 
-	if (IS_ERR(priv->stmmac_clk)) {
-		pr_err("%s: ERROR clk_get failed\n", __func__);
+	if (IS_ERR(priv->stmmac_clk))
 		return PTR_ERR(priv->stmmac_clk);
-	}
+
 	return 0;
 }
 #else
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index efc42e1..1a4cf81 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -168,6 +168,9 @@ static void stmmac_clk_csr_set(struct stmmac_priv *priv)
 #ifdef CONFIG_HAVE_CLK
 	u32 clk_rate;
 
+	if (IS_ERR(priv->stmmac_clk))
+		return;
+
 	clk_rate = clk_get_rate(priv->stmmac_clk);
 
 	/* Platform provided default clk_csr would be assumed valid
@@ -1923,7 +1926,7 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device,
 	}
 
 	if (stmmac_clk_get(priv))
-		goto error;
+		pr_warning("%s: warning: cannot get CSR clock\n", __func__);
 
 	/* If a specific clk_csr value is passed from the platform
 	 * this means that the CSR Clock Range selection cannot be
-- 
1.7.4.4

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

* Re: [net-next 3/4] stmmac: verify the dma_cfg platform fields
  2012-04-19  5:48 ` [net-next 3/4] stmmac: verify the dma_cfg platform fields Giuseppe CAVALLARO
@ 2012-04-19  6:05   ` Viresh Kumar
  2012-04-19  6:29     ` Giuseppe CAVALLARO
  2012-04-20  0:09   ` David Miller
  1 sibling, 1 reply; 10+ messages in thread
From: Viresh Kumar @ 2012-04-19  6:05 UTC (permalink / raw)
  To: Giuseppe CAVALLARO; +Cc: netdev, spear-devel

On 4/19/2012 11:18 AM, Giuseppe CAVALLARO wrote:
> Recently the dma parameters that can be passed from the platform
> have been moved from the plat_stmmacenet_data to the stmmac_dma_cfg.
> 
> In case of this new structure is not well allocated the driver can
> fails. This is an example how this field is managed in ST platforms
> 
> static struct stmmac_dma_cfg gmac_dma_setting = {
>         .pbl = 32,
> };
> 
> static struct plat_stmmacenet_data stih415_ethernet_platform_data[] = {
> 	{
> 		.dma_cfg = &gmac_dma_setting,
> 		.has_gmac = 1,
> [snip]
> 
> This patch so verifies that the dma_cfg passed from the platform.
> In case of it is NULL there is no reason that the driver has to fail
> and some default values can be passed. These are ok for all the
> Synopsys chips and could impact on performances, only.
> 
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> cc: Viresh Kumar <viresh.kumar@st.com>

I really can't review it, as i am not stmmac expert. But, i am sure
the problem i highlighted will be resolved by this patch.

Another thing, as SPEAr is using stmmac, can you always cc spear-devel@list.st.com
for all stmmac patches.

-- 
viresh

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

* Re: [net-next 3/4] stmmac: verify the dma_cfg platform fields
  2012-04-19  6:05   ` Viresh Kumar
@ 2012-04-19  6:29     ` Giuseppe CAVALLARO
  0 siblings, 0 replies; 10+ messages in thread
From: Giuseppe CAVALLARO @ 2012-04-19  6:29 UTC (permalink / raw)
  To: Viresh KUMAR; +Cc: netdev, spear-devel

On 4/19/2012 8:05 AM, Viresh KUMAR wrote:
> On 4/19/2012 11:18 AM, Giuseppe CAVALLARO wrote:
>> Recently the dma parameters that can be passed from the platform
>> have been moved from the plat_stmmacenet_data to the stmmac_dma_cfg.
>>
>> In case of this new structure is not well allocated the driver can
>> fails. This is an example how this field is managed in ST platforms
>>
>> static struct stmmac_dma_cfg gmac_dma_setting = {
>>         .pbl = 32,
>> };
>>
>> static struct plat_stmmacenet_data stih415_ethernet_platform_data[] = {
>> 	{
>> 		.dma_cfg = &gmac_dma_setting,
>> 		.has_gmac = 1,
>> [snip]
>>
>> This patch so verifies that the dma_cfg passed from the platform.
>> In case of it is NULL there is no reason that the driver has to fail
>> and some default values can be passed. These are ok for all the
>> Synopsys chips and could impact on performances, only.
>>
>> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
>> cc: Viresh Kumar <viresh.kumar@st.com>
> 
> I really can't review it, as i am not stmmac expert. But, i am sure
> the problem i highlighted will be resolved by this patch.
> 
> Another thing, as SPEAr is using stmmac, can you always cc spear-devel@list.st.com
> for all stmmac patches.

Yes! I have forgotten to add spear guys ;-)

Thanks for your feedbak

Peppe

> 

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

* Re: [net-next 1/4] stmmac: use custom init/exit functions in pm ops
  2012-04-19  5:48 [net-next 1/4] stmmac: use custom init/exit functions in pm ops Giuseppe CAVALLARO
                   ` (2 preceding siblings ...)
  2012-04-19  5:48 ` [net-next 4/4] stmmac: do not fail when probe and there is no csr clk defined Giuseppe CAVALLARO
@ 2012-04-20  0:06 ` David Miller
  3 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2012-04-20  0:06 UTC (permalink / raw)
  To: peppe.cavallaro; +Cc: netdev, francesco.virlinzi

From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Thu, 19 Apr 2012 07:48:19 +0200

> From: Francesco Virlinzi <francesco.virlinzi@st.com>
> 
> Freeze and restore can call the custom init/exit functions.
> Also the patch adds a custom data field that can be used
> for storing platform data useful on restore the embedded
> setup (e.g. GPIO, SYSCFG).
> 
> Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

Applied.

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

* Re: [net-next 2/4 (v2)] stmmac: Move the mdio_register/_unregister in probe/remove
  2012-04-19  5:48 ` [net-next 2/4 (v2)] stmmac: Move the mdio_register/_unregister in probe/remove Giuseppe CAVALLARO
@ 2012-04-20  0:09   ` David Miller
  0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2012-04-20  0:09 UTC (permalink / raw)
  To: peppe.cavallaro; +Cc: netdev, francesco.virlinzi

From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Thu, 19 Apr 2012 07:48:20 +0200

> From: Francesco Virlinzi <francesco.virlinzi@st.com>
> 
> This patch moves the mdio_register/_unregister in probe/remove
> functions and this also is required when hibernation on disk
> is done.
> 
> ---

Because you put the "---" delimiter here, the signoffs would have
been deleted from the commit log message when I apply this with GIT
tools.

I caught it this time, but you need to be more careful about things
like this, and I still contend that you are very sloppy in your
patch submissions and exhibit a low attention to detail.

Anyways, applied.

> v2: remove useless open_clk_dis label and do a simple tidy-up
> in the open function.
> 
> Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st,com>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st,com>

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

* Re: [net-next 3/4] stmmac: verify the dma_cfg platform fields
  2012-04-19  5:48 ` [net-next 3/4] stmmac: verify the dma_cfg platform fields Giuseppe CAVALLARO
  2012-04-19  6:05   ` Viresh Kumar
@ 2012-04-20  0:09   ` David Miller
  1 sibling, 0 replies; 10+ messages in thread
From: David Miller @ 2012-04-20  0:09 UTC (permalink / raw)
  To: peppe.cavallaro; +Cc: netdev, viresh.kumar

From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Thu, 19 Apr 2012 07:48:21 +0200

> Recently the dma parameters that can be passed from the platform
> have been moved from the plat_stmmacenet_data to the stmmac_dma_cfg.
> 
> In case of this new structure is not well allocated the driver can
> fails. This is an example how this field is managed in ST platforms
> 
> static struct stmmac_dma_cfg gmac_dma_setting = {
>         .pbl = 32,
> };
> 
> static struct plat_stmmacenet_data stih415_ethernet_platform_data[] = {
> 	{
> 		.dma_cfg = &gmac_dma_setting,
> 		.has_gmac = 1,
> [snip]
> 
> This patch so verifies that the dma_cfg passed from the platform.
> In case of it is NULL there is no reason that the driver has to fail
> and some default values can be passed. These are ok for all the
> Synopsys chips and could impact on performances, only.
> 
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> cc: Viresh Kumar <viresh.kumar@st.com>

Applied.

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

* Re: [net-next 4/4] stmmac: do not fail when probe and there is no csr clk defined
  2012-04-19  5:48 ` [net-next 4/4] stmmac: do not fail when probe and there is no csr clk defined Giuseppe CAVALLARO
@ 2012-04-20  0:09   ` David Miller
  0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2012-04-20  0:09 UTC (permalink / raw)
  To: peppe.cavallaro; +Cc: netdev

From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Thu, 19 Apr 2012 07:48:22 +0200

> On some platforms, for example where we are doing the bring-up,
> the csr clock is not passed from the framework and the Ethernet
> device driver is failing when it can work w/o any issues and
> using the default values. So this patch just warnings the case
> of the csr clock cannot be acquired but w/o failing the probe
> step. I have just tested it on ST STiH415 SoC (ARM).
> 
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

Applied.

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

end of thread, other threads:[~2012-04-20  0:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-19  5:48 [net-next 1/4] stmmac: use custom init/exit functions in pm ops Giuseppe CAVALLARO
2012-04-19  5:48 ` [net-next 2/4 (v2)] stmmac: Move the mdio_register/_unregister in probe/remove Giuseppe CAVALLARO
2012-04-20  0:09   ` David Miller
2012-04-19  5:48 ` [net-next 3/4] stmmac: verify the dma_cfg platform fields Giuseppe CAVALLARO
2012-04-19  6:05   ` Viresh Kumar
2012-04-19  6:29     ` Giuseppe CAVALLARO
2012-04-20  0:09   ` David Miller
2012-04-19  5:48 ` [net-next 4/4] stmmac: do not fail when probe and there is no csr clk defined Giuseppe CAVALLARO
2012-04-20  0:09   ` David Miller
2012-04-20  0:06 ` [net-next 1/4] stmmac: use custom init/exit functions in pm ops David Miller

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.