From: Haavard Skinnemoen <hskinnemoen@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 3/3] Add support for AT91CAP9 cpu and AT91CAP9A-DK board
Date: Fri, 18 Jan 2008 09:45:29 +0100 [thread overview]
Message-ID: <20080118094529.4ba6942f@siona> (raw)
In-Reply-To: <1200479897.6251.26.camel@galileo>
On Wed, 16 Jan 2008 11:38:17 +0100
Stelian Pop <stelian@popies.net> wrote:
> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> index 6657d22..9c98338 100644
> --- a/drivers/net/macb.c
> +++ b/drivers/net/macb.c
> @@ -417,10 +417,18 @@ static int macb_init(struct eth_device *netdev,
> bd_t *bd)
> /* choose RMII or MII mode. This depends on the board */
> #ifdef CONFIG_RMII
> +#ifdef CONFIG_AT91CAP9ADK
> + macb_writel(macb, USRIO, MACB_BIT(RMII) | MACB_BIT(CLKEN));
> +#else
> macb_writel(macb, USRIO, 0);
> +#endif
> +#else
> +#ifdef CONFIG_AT91CAP9ADK
> + macb_writel(macb, USRIO, MACB_BIT(CLKEN));
> #else
> macb_writel(macb, USRIO, MACB_BIT(MII));
> #endif
> +#endif /* CONFIG_RMII */
>
> if (!macb_phy_init(macb))
> return -1;
> diff --git a/drivers/net/macb.h b/drivers/net/macb.h
> index c778e4e..83207e8 100644
> --- a/drivers/net/macb.h
> +++ b/drivers/net/macb.h
> @@ -222,6 +222,12 @@
> #define MACB_TX_PAUSE_ZERO_OFFSET 3
> #define MACB_TX_PAUSE_ZERO_SIZE 1
>
> +/* Bitfields in USRIO (AT91) */
> +#define MACB_RMII_OFFSET 0
> +#define MACB_RMII_SIZE 1
> +#define MACB_CLKEN_OFFSET 1
> +#define MACB_CLKEN_SIZE 1
> +
> /* Bitfields in WOL */
> #define MACB_IP_OFFSET 0
> #define MACB_IP_SIZE 16
Cool, I always was curious about whether post-rm9200 AT91 chips could
use this driver too. The changes you've done nicely match the Linux
driver, so ACK on this part from me. If you had submitted one patch per
driver (aka per logical change ;-) I could have acked a whole patch,
not only part of it. If you need to resend, I recommend that you do
that, and send them before the actual cpu- and board support; that way
they can be applied independently as soon as each one is ready.
We should probably get rid of the CONFIG_RMII symbol at some point, but
that might as well go on top of this patch.
Haavard
next prev parent reply other threads:[~2008-01-18 8:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-16 10:36 [U-Boot-Users] [PATCH 0/3] Add support for AT91CAP9 cpu and AT91CAP9A-DK board Stelian Pop
2008-01-16 10:37 ` [U-Boot-Users] [PATCH 1/3] " Stelian Pop
2008-01-16 10:37 ` [U-Boot-Users] [PATCH 2/3] " Stelian Pop
2008-01-16 10:38 ` [U-Boot-Users] [PATCH 3/3] " Stelian Pop
2008-01-18 8:45 ` Haavard Skinnemoen [this message]
2008-01-18 9:28 ` Stelian Pop
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=20080118094529.4ba6942f@siona \
--to=hskinnemoen@atmel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox