All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vipin Kumar <vipin.kumar@st.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] drivers/net/designware - respect "bus mode" register contents on SW reset
Date: Thu, 26 Sep 2013 09:27:42 +0530	[thread overview]
Message-ID: <5243B0B6.5000308@st.com> (raw)
In-Reply-To: <1380115990-24683-1-git-send-email-abrodkin@synopsys.com>

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>

      reply	other threads:[~2013-09-26  3:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5243B0B6.5000308@st.com \
    --to=vipin.kumar@st.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.