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>
This commit is contained in:

committed by
David S. Miller

parent
7555001546
commit
1942e48225
@@ -265,6 +265,14 @@ int __init bcm63xx_enet_register(int unit,
|
||||
dpd->dma_chan_width = ENETDMA_CHAN_WIDTH;
|
||||
}
|
||||
|
||||
if (unit == 0) {
|
||||
dpd->rx_chan = 0;
|
||||
dpd->tx_chan = 1;
|
||||
} else {
|
||||
dpd->rx_chan = 2;
|
||||
dpd->tx_chan = 3;
|
||||
}
|
||||
|
||||
ret = platform_device_register(pdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user