From: "Alexandros Kostopoulos" <akostop@inaccessnetworks.com>
To: linuxppc-dev@ozlabs.org
Subject: About mdio_bus for 82xx based board
Date: Wed, 25 Jul 2007 17:22:40 +0300 [thread overview]
Message-ID: <op.tv0x7yvmnhx3hy@phoenix> (raw)
Hi all,
I'm trying to make FCC ethernet work with my board, based on an MPC8275
processor. I'm using kernel 2.6.22.1
I have the following problems:
1) When mdiobus_register() called from mii-bitbang.c (fs_enet_mdio_probe()
function) attemps to do a device_register for the mdio bus, it actually
registers the device with a bus_id in the form [0|1|...]:<phy_addr>, that
is the first part a simple integer. This, of course, happens because
fs_enet_of_init() (fsl_soc.c) does a
platform_device_register_simple("fsl-bb-mdio", i, NULL, 0); with i being
the first part of the bus, starting from 0. Unfortunately, when
fs_init_phy() (fs_enet_main.c) calls phy_connect() and therefore
phy_attach() (phy_device.c), the latter attempts to find the device in the
mdio bus, but it searches using the bus_id registered in the net_device
struct, which is in the form of <resource address>:<phy_addr>, eg.
f0000000:0, and therefore it fails... I don't know if I am doing something
wrong here, so any hint would be greatly appreciated.
2) Since there are two ethernet@<address> nodes in my device tree,
fs_of_enet_init() calls platform_device_register_simple("fsl-bb-mdio",...)
twice, therefore creating two mdio busses, 0 and 1, each having the same
two devices. For example, if I have two PHYs with addresses 1 and 5, I
will get two mdio busses and 4 devices, 0:1, 0:5, 1:1 and 1:5. Well, this
doesn't sound right to me, although I am not sure if this is a fatal
issue. Any comments?
3) Also, if I don't want to enter the phy interrupt in the device tree
(there is not one or I want to use PHY_POLL), what should I do? dtc seems
to not allow -1 as a value in the reg property.
thank you in advance for your responses
Alex
next reply other threads:[~2007-07-25 14:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-25 14:22 Alexandros Kostopoulos [this message]
2007-07-25 16:23 ` About mdio_bus for 82xx based board Scott Wood
2007-07-26 10:42 ` Alexandros Kostopoulos
2007-07-26 11:24 ` Alexandros Kostopoulos
2007-07-26 12:22 ` Alexandros Kostopoulos
2007-07-26 15:29 ` Scott Wood
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=op.tv0x7yvmnhx3hy@phoenix \
--to=akostop@inaccessnetworks.com \
--cc=linuxppc-dev@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).