From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Thu, 4 Aug 2011 15:28:57 -0500 Subject: [U-Boot] [U-Boot, 3/9] nand: add a hw specific subcommand to the nand command. In-Reply-To: <20110804201406.25EFD177A7AE@gemini.denx.de> References: <1310810810-5322-4-git-send-email-hs@denx.de> <20110802201932.GA8861@schlenkerla.am.freescale.net> <4E38D94B.7020100@denx.de> <20110803105627.25ea58a7@schlenkerla.am.freescale.net> <4E3A30D7.3020104@denx.de> <4E3AF62B.8080605@freescale.com> <20110804201406.25EFD177A7AE@gemini.denx.de> Message-ID: <4E3B0109.5070201@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 08/04/2011 03:14 PM, Wolfgang Denk wrote: > Dear Scott Wood, > > In message<4E3AF62B.8080605@freescale.com> you wrote: >> >> Again, I think "nand hwfunc" conveys little information about what it's >> actually going to do, versus something like: >> >> => nandrbl >> off > > I agree with Heiko that NAND related commands should be implemented as > subcommands of the "nand" command. > > Havong "nand" and "nandrbl" at the same time is not > acceptable to me - that should be changed into "nand rbl". > >> At least "nand hwfunc type" or "nand hwfunc rbl" would be more >> informative, but I question the benefit that the verbosity buys us. > > I agree that "hwfunc" is an unlucky name. > >> So now it's "nand hwfunc ctrl type rbl"? Just to avoid grepping for >> U_BOOT_CMD? > > No. I would not like this either. How about some way of board/controller/etc. code plugging in commands to "nand" without "hwfunc"? Could be a chained handler, or copying entries into a command table, or some way of generalizing the stuff in common/command.c to operate on multiple command lists. Though without some change to how linker scripts are managed, to be practical that last option would need to avoid introducing a new section per subtable (maybe just filter out others when iterating). Would be nice to get tab completion on subcommands. -Scott