[U-Boot-Users] [PATCH 5/5] OneNAND support

Wolfgang Denk wd at denx.de
Mon Sep 10 09:13:20 CEST 2007


In message <002701c7f34d$110ffbc0$e1ac580a at swcenter.sec.samsung.co.kr> you wrote:
>
> > CONFIG_CMD_ONENAND is definitely NOT a candiate for config_cmd_all.h
> 
> No problem.
> I just add it as comments in "config_cmd_all" file.
> "Alphabetical list of all possible commands."

Sorry. Iwas totally wrong here - I confused this with
include/config_cmd_default.h where it really doe snot belong, but you
did not try adding it there.

Of course you were right - it should be added to
include/config_cmd_all.h

Please leave this part as is, and excuse my confusion.

> > This should probably be 0 for production code?
> > 
> > > +#ifdef ONENAND_DEBUG
> > > +#define DEBUG(level, args...)						\
> > > +do {									\
> > > +	if (level <= DEBUG_LEVEL) {					\
> > > +		printf(args);						\
> > > +	}								\
> > > +} while (0)
> > > +#else
> > > +#define DEBUG(level, args...)		do { } while (0)
> > > +#endif
> > 
> > Please do not reinvent yoru own debug macros, please use the existing
> > ones instead.
> > 
> 
> After new NAND implementation, there are required macro and filed.
> I added <linux/mtd/compat.h> and <linux/mtd/mtd.h> headers at required files
> 
> Others such as spinlock, wait_queue_head_t are typedef-ed.
> In NAND case, it disabled it by "if 0".
> And kvec also will be removed at next code update.

I still think you should NOT redefine DEBUG but instead use the
existing definitions for debug() resp. debugX(); please see
include/common.h

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Man is the best computer we can put aboard a spacecraft ...  and  the
only one that can be mass produced with unskilled labor.
                                                  - Wernher von Braun




More information about the U-Boot mailing list