From: Andreas Pretzsch Date: Fri, 22 Jul 2011 20:02:06 +0200 Subject: [U-Boot] [PATCH] command "sspi": add write-only flag '.w' (discard read data) In-Reply-To: References: <1310837526-3394-1-git-send-email-apr@cn-eng.de> <1311181487.27155.33.camel@ws-apr.office.loc> <201107202127.22405.vapier@gentoo.org> Message-ID: <1311357726.1358.25.camel@ws-apr.office.loc> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am Donnerstag, den 21.07.2011, 11:01 +0200 schrieb Detlev Zundel: > Hi Mike, > > [...] > > >> Following the common U-Boot way to do this, I'd suggest > >> sspi [:][.] [din_env_var] > >> and either never print the read result to the console (my favorite) or > >> only if no env variable to store is passed. To be defined, comments > >> welcome. > > > > is this the common u-boot approach ? seems like extending every random func > > to take a supplementary env var is the wrong way. if the hush shell simply > > supported syntax like: > > foo="`sspi ......`" > > then every command would get this for free > > Indeed - this would be the best solution and I would greatly appreciate > such a feature as it would be a big step in what we can script > (elegantly) in U-Boot. Full ACK that. I'd love to have a (nearly) full-scale hush shell in U-Boot. Esp. as IMHO we left the "small scale bootloader" area for quite some time now. And adjusting to different hardware variants purely by script instead of special code is a valuable target IMHO. A bit inconvenient with U-Boot hush shell, but doable. But I doubt that this will be there in the immediate future (sorry, currently no time on my side for this). And it won't help with the old parser. So how to proceed with the sspi command ? - keep it as it is, ignoring the "read not scriptable" status - strip down the printf output to only the value (required for ``) - add the additional parameter Personally, I don't care that much, as I don't need a SPI read in any of my devices here and could live with the noisy SPI write. But as I opened up this issue, I'd like to finalize it. Wolfgang, Detlev, Mike, please decide. In this context, I suppose the original "spi.w" patch is NAK ? Also, given any rework of the sspi command, cmd_spi.c should probably be checkpatch-massaged (9 errors, 11 warnings, incl. kernel-stuff) before. The usual whitespace and line length issues. I suppose this would go in despite merge window closure, but any other change won't, so submit it as separate patch instead of a series ? -- carpe noctem engineering Ingenieurbuero fuer Hard- & Software-Entwicklung Andreas Pretzsch Dipl.-Ing. (FH) Andreas Pretzsch Tel. +49-(0)731-5521572 Hahnengasse 3 Fax: +49-(0)731-5521573 89073 Ulm, Germany email: apr at cn-eng.de