[U-Boot-Users] Manufacturer specific code in a bothersome place

Marc Singer elf at buici.com
Mon Jul 7 02:26:40 CEST 2003


I'm porting u-boot to the Sharp KEV7A400 development board.  The CPU
has an ARM9 core with some Sharp and some ARM cells.  The existing
ARM920T cpu code has quite a bit of Samsung specific code in it.  So,
the question is this: how do we best handle development like this?
For time time being, I'm creating a new CPU directory to eliminate a
ridiculous set of ifdefs.  However, this may not be a good long-term
solution.

I've been musing about solving the problem and have come up with some
ideas, though nothing yet comprehensivve.  

  1) It seems to be a mistake to put manufacturer specific code in the
     CPU directory unless we equate CPU not to the *core* but to the
     implementation of the core.  For example, not x86, but AMD Elan.
     Not ARM920T but Sharp LH7a400.  In the embedded market, this
     makes more sense than it does for x86 PCs. 
  2) There are some board-specific driver choices, e.g. serial driver,
     that sometimes appear in the CPU directory.  Perhaps these
     choices are best made in the board directory instead.
  3) Drivers, such as serial, could be made to export a function
     table.  This would allow driver selection by choosing which file
     to compile and link.

At this point, I'm looking to start a discussion about this.  I've
seen the same kinds of problems twice, now.  I'd like to find out how
best to fix them.

Cheers.




More information about the U-Boot mailing list