From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Thu, 7 Oct 2010 22:00:18 -0400 Subject: [U-Boot] [RFC PATCH 1/2 v2] nand: allow delayed initialization In-Reply-To: <201010071726.57488.vapier@gentoo.org> References: <1285112736-15121-1-git-send-email-vapier@gentoo.org> <20101007193544.33CEA153A7E@gemini.denx.de> <201010071726.57488.vapier@gentoo.org> Message-ID: <201010072200.19468.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday, October 07, 2010 17:26:55 Mike Frysinger wrote: > On Thursday, October 07, 2010 15:35:44 Wolfgang Denk wrote: > > Mike Frysinger wrote: > > > > Do you plan to post an update? > > > > > > there isnt a clear indication of where to take this. seems like we > > > want to do this, and we want it as the default moving forward, but we > > > want all existing boards to be unchanged. so only reasonable way > > > would be to invert the logic, add a define for the arch lib/board.c > > > files, and then add that define to all existing boards. > > > > I don't think we want to modify 550+ Board configurations and re-test > > on that many boards... > > it would be ~100 boards. board_init() is only called when CONFIG_CMD_NAND > is defined. so it should be as simple as: > sed -i \ > '/define[[:space:]]*CONFIG_CMD_NAND/i#define CONFIG_NAND_EARLY_INIT' \ > include/configs/* > > > I think we should rather enable the new feature by some #define, and > > recommend to enable this on new boards. > > problem with recommendations is that people dont notice them hmm, what about this scheme: - add NAND_MAYBE_EARLY_INIT to include/config_defaults.h - have nand_init() emit a #warning if NAND_MAYBE_EARLY_INIT is defined but NAND_EARLY_INIT is not - board porters add either "#define NAND_EARLY_INIT" or "#undef NAND_MAYBE_EARLY_INIT" to their board config - after a release or two, we set "#define NAND_EARLY_INIT" to any boards where their maintainers did not step up and drop "NAND_MAYBE_EARLY_INIT" totally this way, existing behavior is retained, board porters have an incentive to choose the desired behavior themselves (kill the #warning), and we have confidence that we didnt break (most) people. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20101007/1b0878a2/attachment.pgp