From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3700 invoked by alias); 26 May 2004 22:08:32 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 3681 invoked from network); 26 May 2004 22:08:28 -0000 Received: from unknown (HELO shell.rawbw.com) (198.144.192.42) by sourceware.org with SMTP; 26 May 2004 22:08:28 -0000 Received: from localhost (IDENT:jnewlin@localhost [127.0.0.1]) by shell.rawbw.com (8.11.6p2/8.11.6) with ESMTP id i4QM8OL82316; Wed, 26 May 2004 15:08:24 -0700 (PDT) Date: Wed, 26 May 2004 22:30:00 -0000 From: John Newlin To: Gary Thomas cc: ecos-discuss@sources.redhat.com In-Reply-To: <1085607010.15478.282.camel@hermes> Message-ID: <20040526145728.L37485@shell.rawbw.com> References: <20040519124843.G108@shell.rawbw.com> <1085605648.15478.262.camel@hermes> <1085605810.15478.265.camel@hermes> <20040526142711.B37485@shell.rawbw.com> <1085607010.15478.282.camel@hermes> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [ECOS] devs/eth/phy/current/src/eth_phy.c X-SW-Source: 2004-05/txt/msg00338.txt.bz2 > 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. -john -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss