From: joravec@drewtech.com (Joey Oravec)
To: linux-arm-kernel@lists.infradead.org
Subject: plat-orion problems with mv643xx_eth.c for mv78xx0
Date: Wed, 17 Aug 2011 17:21:49 -0400 [thread overview]
Message-ID: <4E4C30ED.9030902@drewtech.com> (raw)
Orion maintainers,
config MV643XX_ETH can be selected for Discovery series chips (mv78xx0),
but it has some problems.
1. Register PSC1 (0x44C) bit 4 is named port_reset. It defaults to 1
"port is reset". The documentation does not explain this bit, but the
example code clears the bit to "port is not in reset". I needed to do
the same thing and clear this bit on each port to get ethernet working:
===================================================================
--- mv643xx_eth.c
+++ mv643xx_eth.c
@@ -2597,6 +2597,9 @@
if (msp->base == NULL)
goto out_free;
+ // Take the part out of reset?
+ writel(readl(msp->base + 0x44C) & (~(1 << 4)), msp->base + 0x44C);
+
/*
* Set up and register SMI bus.
*/
2. This is confusing, but not an error. There's a variable port_number
in mv643xx_eth_platform_data that MUST be zero for each port on a
Discovery (MV78xx0) series processor. The printk will say "port 0" for
all 4 ports, but it must be zero so the driver calculates a valid
offset. This probably deserves a comment or a change in the printk.
3. This is confusing, but not an error. File mach/mv78xx0.h defines each
ethernet port's base address like GE00_PHYS_BASE at the wrong address.
Then orion_ge00_init() in plat-orion/common.c adds a magic 0x2000
constant which results in the correct address. This probably deserves a
comment because the header defines incorrect addresses.
4. Each processor varies in support for MII, GMII, and RGMII interfaces.
Function phy_init() calls phy_attach() which is hardcoded for
PHY_INTERFACE_MODE_GMII. This depends on the board and can be different
for each port, so it should probably be specified in the platform data
instead of hardcoded.
-joey
next reply other threads:[~2011-08-17 21:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-17 21:21 Joey Oravec [this message]
2011-08-22 14:19 ` plat-orion problems with mv643xx_eth.c for mv78xx0 Lennert Buytenhek
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=4E4C30ED.9030902@drewtech.com \
--to=joravec@drewtech.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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.