diff options
author | Jonas Gorski <jonas.gorski@gmail.com> | 2017-12-17 17:02:53 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-19 11:07:16 -0500 |
commit | 1942e482258d8cfec9606156cafc6fd1a871f4d5 (patch) | |
tree | 0b0823bc4ee56ecab2a14beca064a716785000fc /drivers/net/ethernet/broadcom | |
parent | 7555001546bac9247e893d84236365a205f2bad2 (diff) | |
download | linux-1942e482258d8cfec9606156cafc6fd1a871f4d5.tar.bz2 |
bcm63xx_enet: use platform data for dma channel numbers
To reduce the reliance on device ids, pass the dma channel numbers to
the enet devices as platform data.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bcm63xx_enet.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index 5a5886345da2..e603a6fe6349 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c @@ -1752,15 +1752,6 @@ static int bcm_enet_probe(struct platform_device *pdev) priv->irq_tx = res_irq_tx->start; priv->mac_id = pdev->id; - /* get rx & tx dma channel id for this mac */ - if (priv->mac_id == 0) { - priv->rx_chan = 0; - priv->tx_chan = 1; - } else { - priv->rx_chan = 2; - priv->tx_chan = 3; - } - priv->mac_clk = devm_clk_get(&pdev->dev, "enet"); if (IS_ERR(priv->mac_clk)) { ret = PTR_ERR(priv->mac_clk); @@ -1792,6 +1783,8 @@ static int bcm_enet_probe(struct platform_device *pdev) priv->dma_chan_width = pd->dma_chan_width; priv->dma_has_sram = pd->dma_has_sram; priv->dma_desc_shift = pd->dma_desc_shift; + priv->rx_chan = pd->rx_chan; + priv->tx_chan = pd->tx_chan; } if (priv->mac_id == 0 && priv->has_phy && !priv->use_external_mii) { |