From: Mirco Fuchs <mircofuchs@web.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Configuration of the PHY address
Date: Tue, 08 Aug 2006 19:28:45 +0200 [thread overview]
Message-ID: <44D8E5ED.20010.203AF05@mircofuchs.web.de> (raw)
Hi,
I'm operating on an at91rm9200-based board. The AT91RM9200 is
connected to an ethernet PHY via MII interface. The current
implementations of the MII-access functions in ether.c assume, that
the phy's address is 00000. But the address of the PHY that I use
(KS8721) is 00001 by default, so i cannot access the MII-registers
with the this implementation. Apart from that a user could configure
the address of the PHY on his board with pull-ups. I think we need to
set the PHY address explicite when accessing it.
I suggest to introduce a new macro (e. g. CFG_PHY_ADDRESS) that can
be set by the user in the board specific header file.
There are two ways to implement the usage of this macro.
The first is that we use the macro directly in the functions
at91rm9200_EmacWritePhy() and at91rm9200_EmacReadPhy() without
changing any parameters. The advantage is that we can implement it
very easy and very fast. The disadvantage is that we cannot change
the address after compilation (which shouldn't be a problem in most
cases).
The second way is to add a new parameter (e. g. phyadd) to the
EmacWrite and EmacRead function. The PHY driver would be responsible
to set the PHY address when calling these functions. The PHY address
could be taken from CFG_PHY_ADDRESS (like above) or could be set
dynamically (e. g. if we have more than one PHY connected). In
addition to the EmacRead and EmacWrite interface itself, we need to
change all drivers using this function and implement the new
interface in this case.
Which of the suggested ways would you prefer?
Best Regards
Mirco
next reply other threads:[~2006-08-08 17:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-08 17:28 Mirco Fuchs [this message]
2006-08-10 10:43 ` [U-Boot-Users] Configuration of the PHY address Mirco Fuchs
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=44D8E5ED.20010.203AF05@mircofuchs.web.de \
--to=mircofuchs@web.de \
--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