From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shinya Kuribayashi Date: Sat, 17 May 2008 01:26:27 +0900 Subject: [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board initialization when CONFIG_CMD_NAND is set In-Reply-To: <1210861819-28024-1-git-send-email-mcmullan@netapp.com> References: <> <1210861819-28024-1-git-send-email-mcmullan@netapp.com> Message-ID: <482DB5B3.7030800@ruby.dti.ne.jp> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Jason, Jason McMullan wrote: > diff --git a/lib_mips/board.c b/lib_mips/board.c > index 1645f2c..e33070d 100644 > --- a/lib_mips/board.c > +++ b/lib_mips/board.c > @@ -28,6 +28,7 @@ > #include > #include > #include > +#include This will break build. According to the blackfin, we can't even include if it's not configured. http://git.denx.de/?p=u-boot.git;a=blob;f=lib_blackfin/board.c;h=43d8be8e21f25e37e7ade0eea86549b125775152;hb=a38dc3ea8614f8b0c41e432b445a9959b9711295#l25 # by the way, all ARCHs which need nand_init() should include in the same way as blackfin, shouldn't they? > > DECLARE_GLOBAL_DATA_PTR; > > @@ -416,6 +417,11 @@ void board_init_r (gd_t *id, ulong dest_addr) > } > #endif > > +#ifdef CONFIG_CMD_NAND > + puts("NAND: "); > + nand_init(); /* go init the NAND */ > +#endif > + > #if defined(CONFIG_MISC_INIT_R) > /* miscellaneous platform dependent initialisations */ > misc_init_r (); I'm not familiar with NAND, so don't know that above is a good timing to call nand_init(). If this works for you, I'm fine ATM. Thanks! Shinya