mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
net: stmmac: dwmac_lib: remove unnecessary checks in dwmac_dma_reset()
it will check the return value of dwmac_dma_reset() in the stmmac_init_dma_engine() function and report an error if the return value is not zero. so don't need check here. Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
09d65e6d63
commit
3fd177cb2b
1 changed files with 1 additions and 6 deletions
|
@ -16,19 +16,14 @@
|
|||
int dwmac_dma_reset(void __iomem *ioaddr)
|
||||
{
|
||||
u32 value = readl(ioaddr + DMA_BUS_MODE);
|
||||
int err;
|
||||
|
||||
/* DMA SW reset */
|
||||
value |= DMA_BUS_MODE_SFT_RESET;
|
||||
writel(value, ioaddr + DMA_BUS_MODE);
|
||||
|
||||
err = readl_poll_timeout(ioaddr + DMA_BUS_MODE, value,
|
||||
return readl_poll_timeout(ioaddr + DMA_BUS_MODE, value,
|
||||
!(value & DMA_BUS_MODE_SFT_RESET),
|
||||
10000, 100000);
|
||||
if (err)
|
||||
return -EBUSY;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* CSR1 enables the transmit DMA to check for new descriptor */
|
||||
|
|
Loading…
Add table
Reference in a new issue