All of lore.kernel.org
 help / color / mirror / Atom feed
From: RONETIX - Asen Dimov <dimov@ronetix.at>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] pm9g45_v1.3: make ethernet works
Date: Fri, 04 Feb 2011 09:46:56 +0200	[thread overview]
Message-ID: <4D4BAEF0.4010106@ronetix.at> (raw)
In-Reply-To: <1296141314-9580-1-git-send-email-dimov@ronetix.at>

Hello,

Asen Dimov with Message-Id: 
<1296141314-9580-1-git-send-email-dimov@ronetix.at> wrote:
> Signed-off-by: Asen Dimov <dimov@ronetix.at>
> ---
>  board/ronetix/pm9g45/pm9g45.c |   15 +++++++++++++++
>  include/configs/pm9g45.h      |    5 +++++
>  2 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/board/ronetix/pm9g45/pm9g45.c b/board/ronetix/pm9g45/pm9g45.c
> index 79b7c9d..0e1d6b2 100644
> --- a/board/ronetix/pm9g45/pm9g45.c
> +++ b/board/ronetix/pm9g45/pm9g45.c
> @@ -96,6 +96,8 @@ static void pm9g45_nand_hw_init(void)
>  static void pm9g45_macb_hw_init(void)
>  {
>  	at91_pmc_t	*pmc	= (at91_pmc_t *) AT91_PMC_BASE;
> +	at91_rstc_t	*rstc	= (at91_rstc_t *) AT91_RSTC_BASE;
> +	unsigned long	erstl;
>  
>  	/*
>  	 * PD2 enables the 50MHz oscillator for Ethernet PHY
> @@ -120,6 +122,19 @@ static void pm9g45_macb_hw_init(void)
>  	at91_set_pio_pullup(AT91_PIO_PORTA, 12, 0);
>  	at91_set_pio_pullup(AT91_PIO_PORTA, 13, 0);
>  
> +	erstl = readl(&rstc->mr) & AT91_RSTC_MR_ERSTL_MASK;
> +
> +	/* Need to reset PHY -> 500ms reset */
> +	writel(AT91_RSTC_KEY | AT91_RSTC_MR_ERSTL(0x0D) |
> +		AT91_RSTC_MR_URSTEN, &rstc->mr);
> +	writel(AT91_RSTC_KEY | AT91_RSTC_CR_EXTRST, &rstc->cr);
> +
> +	/* Wait for end hardware reset */
> +	while (!(readl(&rstc->sr) & AT91_RSTC_SR_NRSTL));
> +
> +	/* Restore NRST value */
> +	writel(AT91_RSTC_KEY | erstl | AT91_RSTC_MR_URSTEN, &rstc->mr);
> +
>  	/* Re-enable pull-up */
>  	at91_set_pio_pullup(AT91_PIO_PORTA, 15, 1);
>  	at91_set_pio_pullup(AT91_PIO_PORTA, 12, 1);
> diff --git a/include/configs/pm9g45.h b/include/configs/pm9g45.h
> index ec51ccf..4d8089f 100644
> --- a/include/configs/pm9g45.h
> +++ b/include/configs/pm9g45.h
> @@ -125,6 +125,11 @@
>  #define CONFIG_NET_MULTI		1
>  #define CONFIG_NET_RETRY_COUNT		20
>  #define CONFIG_RESET_PHY_R		1
> +#define CONFIG_MACB_SEARCH_PHY
> +#define CONFIG_CMD_MII
> +#define CONFIG_OVERWRITE_ETHADDR_ONCE
> +/* MAC is Organizationally Unique Identifier + 3 octects user numbers */
> +#define CONFIG_ETHADDR		"02:00:00:fe:ed:00"
>  
>  /* USB */
>  #define CONFIG_USB_ATMEL
>   
is this fix lost or there is something wrong with it?


Regards,
Asen

  reply	other threads:[~2011-02-04  7:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27 15:15 [U-Boot] [PATCH] pm9g45_v1.3: make ethernet works Asen Dimov
2011-02-04  7:46 ` RONETIX - Asen Dimov [this message]
2011-04-11 11:05 ` Reinhard Meyer

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=4D4BAEF0.4010106@ronetix.at \
    --to=dimov@ronetix.at \
    --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.