Since commit
f8c55dc6e828 ("MIPS: use generic dma noncoherent ops for
simple noncoherent platforms") changed MIPS dma handling, the eth
driver fails because the dma mask is set on the wrong 'struct device'.
Move the setting to the correct struct device.
Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
struct mtk_mac *mac = netdev_priv(dev);
struct mtk_eth *eth = mac->hw;
+ dma_coerce_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32));
+
if (!atomic_read(ð->dma_refcnt)) {
int err = mtk_start_dma(eth);
struct clk *sysclk;
int err;
- pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
- pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
-
device_reset(&pdev->dev);
match = of_match_device(of_mtk_match, &pdev->dev);