* [U-Boot] [PATCH] drivers/net/designware - respect "bus mode" register contents on SW reset
@ 2013-09-25 13:33 Alexey Brodkin
2013-09-26 3:57 ` Vipin Kumar
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Brodkin @ 2013-09-25 13:33 UTC (permalink / raw)
To: u-boot
"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.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
---
drivers/net/designware.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 46f6601..f11cb0b 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -112,7 +112,7 @@ static int mac_reset(struct eth_device *dev)
ulong start;
int timeout = CONFIG_MACRESET_TIMEOUT;
- 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);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] drivers/net/designware - respect "bus mode" register contents on SW reset
2013-09-25 13:33 [U-Boot] [PATCH] drivers/net/designware - respect "bus mode" register contents on SW reset Alexey Brodkin
@ 2013-09-26 3:57 ` Vipin Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Vipin Kumar @ 2013-09-26 3:57 UTC (permalink / raw)
To: u-boot
On 9/25/2013 7:03 PM, Alexey Brodkin wrote:
> "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.
>
> Signed-off-by: Alexey Brodkin<abrodkin@synopsys.com>
> ---
> drivers/net/designware.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/designware.c b/drivers/net/designware.c
> index 46f6601..f11cb0b 100644
> --- a/drivers/net/designware.c
> +++ b/drivers/net/designware.c
> @@ -112,7 +112,7 @@ static int mac_reset(struct eth_device *dev)
> ulong start;
> int timeout = CONFIG_MACRESET_TIMEOUT;
>
> - writel(DMAMAC_SRST,&dma_p->busmode);
> + writel(readl(&dma_p->busmode) | DMAMAC_SRST,&dma_p->busmode);
>
Acked-by: Vipin Kumar <vipin.kumar@st.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-26 3:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-25 13:33 [U-Boot] [PATCH] drivers/net/designware - respect "bus mode" register contents on SW reset Alexey Brodkin
2013-09-26 3:57 ` Vipin Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox