[U-Boot] [PATCH] drivers/net/designware - respect "bus mode" register contents on SW reset

Vipin Kumar vipin.kumar at st.com
Thu Sep 26 05:57:42 CEST 2013


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 at 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 at st.com>



More information about the U-Boot mailing list