[U-Boot-Users] [PATCH 05/08]: mpc7448hpc2 board flash support

Wolfgang Denk wd at denx.de
Mon Jul 31 11:48:02 CEST 2006


In message <7EA18FDD2DC2154AA3BD6D2F22A62A0E0D2CDE at zch01exm23.fsl.freescale.net> you wrote:
>
> > I will not accept such code duplication.
> 
> There are some differences. Another reason I keep the driver in my board

Differences are  small  compared  to  the  toal  size  of  the  file.
Duplication  is always bad, as it will cause a maintenance nightmare.
It may slip though occasionally, but when I get aware of  it  I  will
not accept such duplicated code.

> directory 
> is that I do not want to affect other board behavior. At lease, I am not
> sure.

Submit a patch on the list for testing?

> Is it right that I add some "ifdef BOARD_BYPE" in the general driver
> code?

There must be no board dependent code in the CFI driver. If you  want
to  add  support for a special feature, use some CFG_HAVE_FEATURE_FOO
or the like, but only when *really* necessary.

Normally, the need for such  a  feature  in  the  CFI  driver  is  an
indication of some design error on your side.

> Should I move the tsi108 feature to the general directory or just keep
> it in my board 
> directory?

Please move to the drivers directory.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The day-to-day travails of the IBM programmer are so amusing to  most
of us who are fortunate enough never to have been one - like watching
Charlie Chaplin trying to cook a shoe.




More information about the U-Boot mailing list