[PATCH 3/3] PPC440EP IBM EMAC support

Matt Porter mporter at kernel.crashing.org
Wed Mar 16 07:43:26 EST 2005


On Tue, Mar 15, 2005 at 11:24:24AM -0800, Eugene Surovegin wrote:
> On Tue, Mar 15, 2005 at 11:22:16AM -0800, Eugene Surovegin wrote:
> > On Tue, Mar 15, 2005 at 11:58:54AM -0700, Wade Farnsworth wrote:
> > > This patch adds support to the IBM EMAC ethernet driver for the 440EP.
> > > 
> > > Regards,
> > > Wade Farnsworth
> > > 
> > > Signed-off-by: Wade Farnsworth <wfarnsworth at mvista.com>
> > > 
> > 
> > > --- linux-2.6.11-bk7/drivers/net/ibm_emac/ibm_emac_phy.c	2005-03-02 00:38:13.000000000 -0700
> > > +++ linux-2.6.11-bk7-440ep/drivers/net/ibm_emac/ibm_emac_phy.c	2005-03-11 16:32:01.000000000 -0700
> > > @@ -27,6 +27,12 @@
> > >  
> > >  #include "ibm_emac_phy.h"
> > >  
> > > +#ifdef CONFIG_BAMBOO
> > > +#define BAMBOO_REV0 (mfspr(PVR) == PVR_440EP_RA)
> > > +#else
> > > +#define BAMBOO_REV0 0
> > > +#endif
> > > +
> > 
> > I really don't like it. Chip revision doesn't imply which board 
> > this code is running on. Please, think of some other way to do this or 
> > drop this completely.
> > 
> 
> Or to phrase this differently, it's better to avoid any board specific 
> code/defines in network driver.

Indeed it's better. However, I made the suggestion that it's not
worth the effort to add in another hook to provide board specific
phy help to ibm_emac/ at this time.  I think the hack can exist
until a proper hook can be added to the phy lib stuff that should
be used in the future.

If you think that's too far off, we can go ahead and add another hook
so the hack can be moved into bamboo.c where it ideally belongs.

-Matt



More information about the Linuxppc-embedded mailing list