[kernel/f20] Update am33xx (BeagleBone) cpsw patch to upstream version

Peter Robinson pbrobinson at fedoraproject.org
Sat Dec 28 12:58:14 UTC 2013


commit 2966e224b50dd9a0280b2197a570f3dd6defd59b
Author: Peter Robinson <pbrobinson at gmail.com>
Date:   Sat Dec 28 12:48:54 2013 +0000

    Update am33xx (BeagleBone) cpsw patch to upstream version

 arm-am33xx-cpsw.patch |   60 +++++++++++++++++++++++++++++++++++++-----------
 config-armv7          |    2 +-
 kernel.spec           |    3 ++
 3 files changed, 50 insertions(+), 15 deletions(-)
---
diff --git a/arm-am33xx-cpsw.patch b/arm-am33xx-cpsw.patch
index 1a38cdd..fa354cb 100644
--- a/arm-am33xx-cpsw.patch
+++ b/arm-am33xx-cpsw.patch
@@ -1,23 +1,55 @@
-Bugzilla: 1012025
-Upstream-status: An initial work around for the cpsw driver issue trying to access HW registers
-with clock disabled. Upstream is working on a proper fix with the hope to land it in 3.13.
+Bugzilla: 1012025 1043271
+Upstream-status: The following upstream commits in 3.13 fix issues with the ti_cpsw driver.
+The upstream hash is:
 
---- linux-3.12.4-1.fc20.x86_64/drivers/net/ethernet/ti/cpsw.c.orig	2013-12-11 20:52:41.576478796 +0000
-+++ linux-3.12.4-1.fc20.x86_64/drivers/net/ethernet/ti/cpsw.c	2013-12-11 20:55:14.418692261 +0000
-@@ -2001,6 +2001,8 @@
+f280e89ad6a29d9969cb6b216123c798e1689bc4
+
+--- a/drivers/net/ethernet/ti/cpsw.c.orig	2013-11-03 23:41:51.000000000 +0000
++++ b/drivers/net/ethernet/ti/cpsw.c	2013-12-15 22:55:00.842417685 +0000
+@@ -1144,6 +1149,12 @@
+ 		 * receive descs
+ 		 */
+ 		cpsw_info(priv, ifup, "submitted %d rx descriptors\n", i);
++
++		if (cpts_register(&priv->pdev->dev, priv->cpts,
++				  priv->data.cpts_clock_mult,
++				  priv->data.cpts_clock_shift))
++			dev_err(priv->dev, "error registering cpts device\n");
++
+ 	}
+ 
+ 	/* Enable Interrupt pacing if configured */
+@@ -1190,6 +1201,7 @@
+ 	netif_carrier_off(priv->ndev);
+ 
+ 	if (cpsw_common_res_usage_state(priv) <= 1) {
++		cpts_unregister(priv->cpts);
+ 		cpsw_intr_disable(priv);
+ 		cpdma_ctlr_int_ctrl(priv->dma, false);
+ 		cpdma_ctlr_stop(priv->dma);
+@@ -2001,9 +2013,16 @@
  		goto clean_cpsw_iores_ret;
  	}
  	priv->regs = ss_regs;
-+
-+	pm_runtime_get_sync(&pdev->dev);
- 	priv->version = __raw_readl(&priv->regs->id_ver);
+-	priv->version = __raw_readl(&priv->regs->id_ver);
  	priv->host_port = HOST_PORT_NUM;
  
-@@ -2161,6 +2163,7 @@
- 			goto clean_irq_ret;
- 		}
- 	}
++	/* Need to enable clocks with runtime PM api to access module
++	 *  13 +        * registers
++	 *   12 +        */
++	pm_runtime_get_sync(&pdev->dev);
++	priv->version = readl(&priv->regs->id_ver);
 +	pm_runtime_put_sync(&pdev->dev);
++
++
+ 	priv->cpsw_wr_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+ 	if (!priv->cpsw_wr_res) {
+ 		dev_err(priv->dev, "error getting i/o resource\n");
+@@ -2204,7 +2223,6 @@
+ 		unregister_netdev(cpsw_get_slave_ndev(priv, 1));
+ 	unregister_netdev(ndev);
  
- 	return 0;
+-	cpts_unregister(priv->cpts);
+ 	for (i = 0; i < priv->num_irqs; i++)
+ 		free_irq(priv->irqs_table[i], priv);
  
diff --git a/config-armv7 b/config-armv7
index 5df800c..b6f239b 100644
--- a/config-armv7
+++ b/config-armv7
@@ -309,7 +309,7 @@ CONFIG_TI_DAVINCI_EMAC=m
 CONFIG_TI_DAVINCI_MDIO=m
 CONFIG_TI_DAVINCI_CPDMA=m
 CONFIG_TI_CPSW=m
-CONFIG_TI_CPTS=y
+# CONFIG_TI_CPTS is not set
 CONFIG_TI_EMIF=m
 CONFIG_DRM_TILCDC=m
 CONFIG_SPI_DAVINCI=m
diff --git a/kernel.spec b/kernel.spec
index f38efb5..48d9770 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -2259,6 +2259,9 @@ fi
 #                 ||----w |
 #                 ||     ||
 %changelog
+* Sat Dec 28 2013 Peter Robinson <pbrobinson at fedoraproject.org>
+- Update am33xx (BeagleBone) cpsw patch to upstream version
+
 * Mon Dec 23 2013 Justin M. Forbes <jforbes at fedoraproject.org - 3.12.6-300
 - Linux v3.12.6
 


More information about the scm-commits mailing list