aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti/cpsw.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-12-19 06:22:11 -0500
committerTakashi Iwai <tiwai@suse.de>2013-12-19 06:22:11 -0500
commit356f402da0f989b16e4b6849e88dba5df0e25944 (patch)
treed1d41d07abf30bdd7fe1498f6eb239eaced6d9b3 /drivers/net/ethernet/ti/cpsw.c
parent3a6c5d8ad0a9253aafb76df3577edcb68c09b939 (diff)
parent96b7fe0119b932ad25451d2b6357e727bbe6a309 (diff)
Merge tag 'asoc-v3.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.13 The fixes here are all driver specific ones, none of which particularly stand out but all of which are useful to users of those drivers.
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw.c')
-rw-r--r--drivers/net/ethernet/ti/cpsw.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 7536a4c01293..5120d9ce1dd4 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1151,6 +1151,12 @@ static int cpsw_ndo_open(struct net_device *ndev)
1151 * receive descs 1151 * receive descs
1152 */ 1152 */
1153 cpsw_info(priv, ifup, "submitted %d rx descriptors\n", i); 1153 cpsw_info(priv, ifup, "submitted %d rx descriptors\n", i);
1154
1155 if (cpts_register(&priv->pdev->dev, priv->cpts,
1156 priv->data.cpts_clock_mult,
1157 priv->data.cpts_clock_shift))
1158 dev_err(priv->dev, "error registering cpts device\n");
1159
1154 } 1160 }
1155 1161
1156 /* Enable Interrupt pacing if configured */ 1162 /* Enable Interrupt pacing if configured */
@@ -1197,6 +1203,7 @@ static int cpsw_ndo_stop(struct net_device *ndev)
1197 netif_carrier_off(priv->ndev); 1203 netif_carrier_off(priv->ndev);
1198 1204
1199 if (cpsw_common_res_usage_state(priv) <= 1) { 1205 if (cpsw_common_res_usage_state(priv) <= 1) {
1206 cpts_unregister(priv->cpts);
1200 cpsw_intr_disable(priv); 1207 cpsw_intr_disable(priv);
1201 cpdma_ctlr_int_ctrl(priv->dma, false); 1208 cpdma_ctlr_int_ctrl(priv->dma, false);
1202 cpdma_ctlr_stop(priv->dma); 1209 cpdma_ctlr_stop(priv->dma);
@@ -1816,6 +1823,8 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
1816 } 1823 }
1817 1824
1818 i++; 1825 i++;
1826 if (i == data->slaves)
1827 break;
1819 } 1828 }
1820 1829
1821 return 0; 1830 return 0;
@@ -1983,9 +1992,15 @@ static int cpsw_probe(struct platform_device *pdev)
1983 goto clean_runtime_disable_ret; 1992 goto clean_runtime_disable_ret;
1984 } 1993 }
1985 priv->regs = ss_regs; 1994 priv->regs = ss_regs;
1986 priv->version = __raw_readl(&priv->regs->id_ver);
1987 priv->host_port = HOST_PORT_NUM; 1995 priv->host_port = HOST_PORT_NUM;
1988 1996
1997 /* Need to enable clocks with runtime PM api to access module
1998 * registers
1999 */
2000 pm_runtime_get_sync(&pdev->dev);
2001 priv->version = readl(&priv->regs->id_ver);
2002 pm_runtime_put_sync(&pdev->dev);
2003
1989 res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 2004 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
1990 priv->wr_regs = devm_ioremap_resource(&pdev->dev, res); 2005 priv->wr_regs = devm_ioremap_resource(&pdev->dev, res);
1991 if (IS_ERR(priv->wr_regs)) { 2006 if (IS_ERR(priv->wr_regs)) {
@@ -2155,8 +2170,6 @@ static int cpsw_remove(struct platform_device *pdev)
2155 unregister_netdev(cpsw_get_slave_ndev(priv, 1)); 2170 unregister_netdev(cpsw_get_slave_ndev(priv, 1));
2156 unregister_netdev(ndev); 2171 unregister_netdev(ndev);
2157 2172
2158 cpts_unregister(priv->cpts);
2159
2160 cpsw_ale_destroy(priv->ale); 2173 cpsw_ale_destroy(priv->ale);
2161 cpdma_chan_destroy(priv->txch); 2174 cpdma_chan_destroy(priv->txch);
2162 cpdma_chan_destroy(priv->rxch); 2175 cpdma_chan_destroy(priv->rxch);