Marc Roessler
|
MDIO/MII settings for Ethernet with io-net and io-pkt
|
Marc Roessler
01/22/2009 11:00 AM
post20617
|
MDIO/MII settings for Ethernet with io-net and io-pkt
Hi,
does anyone happen to know how I can access PHY device registers via MDIO/MII?
So far I have found out my BSP (mpc8313) includes some functions
mpc_mii_read() and mpc_mii_write()
but those are only used by the BSP internal functions mpc_init_phy() and mpc_mii_callback(). mpc_mii_read() is declared
in the driver's devctl.c, but it is never called by the handler.
We need to use it for configuring an external switch, whose registers can be written via MDIO/MII.
I have searched a bit and have found "DCMD_IO_NET_MIIPHY"... but that's all, no docu.
What is the proper way of doing this? Can I just add DCMD_IO_NET_MIIPHY to the devctl switch statement? Do I need some
locking against other threads here? Or does the io-net framework (?) already do this before calliing mpc_devctl()? Can I
"invent" my own parameter formats for DCMD_IO_NET_MIIPHY or is there any standard?
And last but not least: how is this all solved with io-pkt? Currently I only have io-net with this BSP... does it treat
all of this the same or are there any differences?
Thanks & Greetings,
Marc
|
|
|