This is the mail archive of the ecos-discuss@sources.redhat.com 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]

Re: devs/eth/phy/current/src/eth_phy.c


On Wed, 2004-05-26 at 16:08, John Newlin wrote:
> > On Wed, 2004-05-26 at 15:28, John Newlin wrote:
> > > > On Wed, 2004-05-26 at 15:07, Gary Thomas wrote:
> > > > > On Wed, 2004-05-26 at 15:03, John Newlin wrote:
> > > > > > I see there looks that there was some attempt at making a generic phy
> > > > > > interface, but I don't see that it is used anywhere.  Is this a work in
> > > > > > progress, or is there an example of this in use in some other code?
> > > > >
> > > > > It *is* used - look at the rattler and MOAB packages.
> > > >
> > > > Also, look at the common ethernet drivers they use
> > > >   devs/eth/powerpc/{fec,fcc,ppc405}
> > > > to see how the actual PHY interfaces work.
> > > >
> > >
> > > Thanks Gary!
> >
> > No problem.  Of course, I'm very interested in any feedback you have on
> > these interfaces [since, so far, I'm the only one that has used them]
> 
> One comment. _eth_phy_init walks through the 32 possible PHY addresses to
> locate the PHY.  For a chip with a single MAC interface this is fine.
> The chip I am working with has more than 1 MAC, but a single MII
> Management interface is used to configure multiple external PHYS.
> 
> Maybe instead, have the driver that is supplying eth_phy_access_t, supply
> a valid PHY address, and it would just look at that PHY address for the
> PHY.  Or it could pass a special value, like -1, to signify that the code
> should scan for the PHY.
> 
> Alternatively, if the function pointers supplied in eth_phy_access_t took,
> eth_phy_access_t as the first parameters, you could stuff some extra data
> at the end of that structure, and the called functions could do the
> address check.
> 
> Do you have another suggestion, surely there are other chips that have
> multiple MAC interfaces.  I thought powerquicc had more than 1 mac.

Indeed, but multiple networks does not always imply more than one MII 
bus or vice-versa.  

I actually have already solved this by letting the device instance set 
the PHY address if it knows it (which is normally the case).  The 
changes just haven't made it into the public tree yet.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
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]