[U-Boot-Users] [PATCH 3/6] TQM8xx: use the CFI flash driver on all TQM8xx boards

Martin Krause Martin.Krause at tqs.de
Mon Aug 6 14:38:16 CEST 2007


wd at denx.de wrote on Monday, July 30, 2007 5:49 PM:
> In message <20070724091937.20545.52604.stgit at tq-sewsrv-4.tq-net.de>
> you wrote: 
> > Signed-off-by: Martin Krause <martin.krause at tqs.de> ---
> > 
> >  board/tqm8xx/Makefile      |    2 +-
> >  include/configs/FPS850L.h  |   17 ++++++++++-------
> >  include/configs/FPS860L.h  |   16 ++++++++++------
> >  include/configs/HMI10.h    |   16 ++++++++++------
> >  include/configs/NSCU.h     |   18 +++++++++++-------
> >  include/configs/SM850.h    |   16 ++++++++++------
> >  include/configs/TQM823L.h  |   16 ++++++++++------
> >  include/configs/TQM823M.h  |   18 +++++++++++-------
> >  include/configs/TQM850L.h  |   16 ++++++++++------
> >  include/configs/TQM850M.h  |   18 +++++++++++-------
> >  include/configs/TQM855L.h  |   16 ++++++++++------
> >  include/configs/TQM855M.h  |   18 +++++++++++-------
> >  include/configs/TQM860L.h  |   16 ++++++++++------
> >  include/configs/TQM860M.h  |   23 +++++++++++++----------
> >  include/configs/TQM862L.h  |   17 ++++++++++-------
> >  include/configs/TQM862M.h  |   19 +++++++++++--------
> >  include/configs/TQM866M.h  |   19 +++++++++++--------
> >  include/configs/TQM885D.h  |   12 ++++++++----
> >  include/configs/virtlab2.h |   16 ++++++++++------
> >  19 files changed, 188 insertions(+), 121 deletions(-)
> 
> NAK by Wolfgang Denk.
> 
> Please feel free to implement such a change on boards for which TQ is
> repsonsible, or which you can test. But it is definitely NOT  a  good
> idea  to  modify  boards which are NOT under your control, especially
> without even trying to talk with the board maintainers.

Ups, sorry for that! We had a discussion about the TQM885D a year ago 
(wow, time is running ...), there you suggested to switch all TQM8xx
boards to CFI driver. Now preparing the TQM885D patches, I thought this
is a nice opportunity to do that. Shortly bevor submitting the patch 
I recognized, that other boards than the TQM8xx also use the code in 
/boards/tqm8xx. So I changed their configuration too, without thinking
about it ...

Now I thought a bit about it. But didn't find a solution to only switch 
the TQM8xx boards to CFI and not the other boards using the code in
/boards/tqm8xx.

The problem is, that all of the above boards use the same Makefile
/boards/tqm8xx/Makefile. There the board specific flash driver is 
listed for compilation:

...
include $(TOPDIR)/config.mk

LIB	= $(obj)lib$(BOARD).a

COBJS	= $(BOARD).o flash.o load_sernum_ethaddr.o
                   ^^^^^^^
SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS	:= $(addprefix $(obj),$(COBJS))
SOBJS	:= $(addprefix $(obj),$(SOBJS))

$(LIB):	$(obj).depend $(OBJS)
	$(AR) $(ARFLAGS) $@ $(OBJS)
...

If I don't want this driver compiled for the TQM8xx boards (because I
want to use the CFI driver), I had to remove it from the COBJS list. 
But then it is removed on all other boards using this Makefile, too.

Is there a way to distinguish in the Makefile, for wich board the
code ist compiled? Can the CONFIG_xxx definitions be used in the
Makefile? IMHO not. Any ideas?

Best Regards,

Martin Krause

--
TQ-Systems GmbH
Muehlstrasse 2, Gut Delling, D-82229 Seefeld
Amtsgericht Muenchen, HRB 105 018, UST-IdNr. DE 811 607 913
Geschaeftsfuehrer: Dipl.-Ing. (FH) Detlef Schneider, Dipl.-Ing. (FH) Ruediger Stahl
http://www.tq-group.com




More information about the U-Boot mailing list