9
0
Fork 0

net: designware: Respect "bus mode" register contents on SW reset

"bus mode" register contains lots of fields and some of them don't
expect to be written with 0 (zero). So since we're only interested in
resetting MAC (which is done with setting the least significant bit of
this register with "0") I believe it's better to modify only 1 bit of
the register.

[Original U-Boot patch by Alexey Brodkin <abrodkin@synopsys.com>]

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Ian Abbott 2016-11-07 18:16:23 +00:00 committed by Sascha Hauer
parent b0fabc5297
commit 184ef5a1ff
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ static int mac_reset(struct eth_device *dev)
struct eth_dma_regs *dma_p = priv->dma_regs_p;
u64 start;
writel(DMAMAC_SRST, &dma_p->busmode);
writel(readl(&dma_p->busmode) | DMAMAC_SRST, &dma_p->busmode);
if (priv->interface != PHY_INTERFACE_MODE_RGMII)
writel(MII_PORTSELECT, &mac_p->conf);