[PATCH 2/2] Re-added support for FEC on MPC5121 from Freescale LTIB

Grant Likely grant.likely at secretlab.ca
Thu Jun 12 23:57:12 EST 2008


On Thu, Jun 12, 2008 at 7:29 AM, Scott Wood <scottwood at freescale.com> wrote:
> On Thu, Jun 12, 2008 at 12:33:12PM +0200, David Jander wrote:
>> > > +#ifndef CONFIG_FS_ENET_MPC5121_FEC
>> > >   /*
>> > >    * Enable big endian and don't care about SDMA FC.
>> > >    */
>> > >   FW(fecp, fun_code, 0x78000000);
>> > > +#else
>> > > + /*
>> > > +  * Set DATA_BO and DESC_BO and leave the rest unchanged
>> > > +  */
>> > > + FS(fecp, dma_control, 0xc0000000);
>> > > +#endif
>>
>> I have tried, but it is almost impossible, since both FEC types use a struct
>> named "fec_t" which very different betwen both types. That means that the code
>> would have enormous amounts of "if" statements all over.
>> Any suggestion?
>
> OK, I missed that this was FEC-specific code and not general fs-enet.
>
> 8xx/512x multiplatform is already unsupported due to core differences,
> but make sure that 82xx/512x multiplatform doesn't get broken.

Yeah, but the amount of #ifdefs required in this drivers adds a
maintenance burden.  I think I'd rather see it either refactored or
cloned.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.


More information about the Linuxppc-embedded mailing list