
27 Sep
2011
27 Sep
'11
11:14 p.m.
On Thu, Sep 22, 2011 at 03:57:26AM +0200, Marek Vasut wrote:
The "nand info" and "nand device" now set shell/environment variables: nand_writesize ... nand page size nand_oobsize ..... nand oob area size nand_erasesize ... nand erase block size
Also, the "nand info" command now displays this info.
Signed-off-by: Marek Vasut marek.vasut@gmail.com Cc: Scott Wood scottwood@freescale.com Cc: Stefano Babic sbabic@denx.de Cc: Wolfgang Denk wd@denx.de Cc: Detlev Zundel dzu@denx.de
common/cmd_nand.c | 25 ++++++++++++++++++++++--- 1 files changed, 22 insertions(+), 3 deletions(-)
Applied to u-boot-nand-flash next
- /* Set geometry info */
- memset(buf, 0, bufsz);
- sprintf(buf, "%x", nand->writesize);
- setenv("nand_writesize", buf);
- memset(buf, 0, bufsz);
- sprintf(buf, "%x", nand->oobsize);
- setenv("nand_oobsize", buf);
- memset(buf, 0, bufsz);
- sprintf(buf, "%x", nand->erasesize);
- setenv("nand_erasesize", buf);
...with memsets removed.
-Scott