From: Stelian Pop <stelian@popies.net>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 5/5] [ARM] AT91CAP9 support - MACB driver changes
Date: Mon, 28 Jan 2008 11:58:00 +0100 [thread overview]
Message-ID: <1201517880.5985.37.camel@galileo> (raw)
In-Reply-To: <1201517484.5985.26.camel@galileo>
AT91CAP9 support - MACB driver changes
Signed-off-by: Stelian Pop <stelian@popies.net>
---
drivers/net/macb.c | 8 ++++++++
drivers/net/macb.h | 6 ++++++
2 files changed, 14 insertions(+), 0 deletions(-)
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..f92a20c 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
--
1.5.3.3
--
Stelian Pop <stelian@popies.net>
next prev parent reply other threads:[~2008-01-28 10:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-28 10:51 [U-Boot-Users] [PATCH 0/5] [ARM] AT91CAP9 support Stelian Pop
2008-01-28 10:53 ` [U-Boot-Users] [PATCH 1/5] [ARM] AT91CAP9 support - build files Stelian Pop
2008-01-28 10:54 ` [U-Boot-Users] [PATCH 2/5] [ARM] AT91CAP9 support - cpu/ files Stelian Pop
2008-01-28 10:59 ` Stelian Pop
2008-01-28 21:15 ` Jean-Christophe PLAGNIOL-VILLARD
2008-01-29 8:55 ` Stelian Pop
2008-01-28 10:56 ` [U-Boot-Users] [PATCH 3/5] " Stelian Pop
2008-01-28 10:57 ` [U-Boot-Users] [PATCH 4/5] [ARM] AT91CAP9 support - board/ files Stelian Pop
2008-01-28 21:26 ` Jean-Christophe PLAGNIOL-VILLARD
2008-01-29 9:03 ` Stelian Pop
2008-01-28 10:58 ` Stelian Pop [this message]
2008-01-28 12:56 ` [U-Boot-Users] [PATCH 5/5] [ARM] AT91CAP9 support - MACB driver changes Haavard Skinnemoen
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=1201517880.5985.37.camel@galileo \
--to=stelian@popies.net \
--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