My understanding is the init() routine does not initialize the PHY but
the MII interface for accessing the PHY. There is no API defined in eCos
for actually setting up the PHY, please correct me if I am wrong.
Are you calling _eth_phy_init(eth_phy_access_t *f) ? This should execute
your init() code prior to probe your PHY.
Christophe
-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Mikhail
Matusov
Sent: 5. juli 2010 21:25
To: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Ethernet PHY Device API
Hello all,
Where should I put the code initializing PHY? The optional init()
function I
defined along with the required stat() doesn't seem to ever get called.
Thanks,
/Mikhail
----- Original Message -----
From: "Christophe Coutand" <ccoutand@stmi.com>
To: "Mikhail Matusov" <matusov@squarepeg.ca>;
<ecos-discuss@ecos.sourceware.org>
Sent: Friday, June 25, 2010 6:41 PM
Subject: RE: [ECOS] Ethernet PHY Device API
In my case, Vitesse VSC8244 PHY is inferred so VSC8244.c is compiled
and
it includes the line:
_eth_phy_dev("Vitesse VSC8244", 0x000FC6C2, VSC8244_stat)
In the MAC layer, I call _eth_phy_init() to probe for the PHY and I
get
the PHY status by calling _eth_phy_state() which uses the stat()
function of the PHY. I use the PHY state to configure the MAC layer
according to current link speed and duplex mode reported.
Christophe
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss