This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Perhaps reset() is supposed to be used for initializing PHY itself. The ETH_PHY_REG_LEVEL_ACCESS_FUNS macro defined in eth_phy.h is used to assign the pointers to the functions. My function wasn't getting called because another function was pointed to by this macro in the MAC portion of the driver (Virtex4), which was a little bit confusing... I think it belongs to the PHY driver...
No, it belongs in the platform driver - its purpose is to set up the communication between the PHY and the proessor/MAC device.
What sort of initialization does your PHY need? Most PHY devices are quite useful/happy just being taken out of reset and talking to them...
----- Original Message ----- From: "Christophe Coutand" <ccoutand@stmi.com> To: "Mikhail Matusov" <matusov@squarepeg.ca>; <ecos-discuss@ecos.sourceware.org> Sent: Monday, July 05, 2010 3:57 PM Subject: RE: [ECOS] Ethernet PHY Device API
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 compiledandit includes the line:get
_eth_phy_dev("Vitesse VSC8244", 0x000FC6C2, VSC8244_stat)
In the MAC layer, I call _eth_phy_init() to probe for the PHY and Ithe 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
-- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |