diff options
author | Simon Glass <sjg@chromium.org> | 2013-02-24 17:33:22 +0000 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2013-02-28 19:09:23 -0800 |
commit | 41ef372c1a2d344621c74aa4bce5cdb0970ba5f1 (patch) | |
tree | 9abdeda0b3b87a70e4f3929e83ddd15f4704377f /common/cmd_nand.c | |
parent | bfc59966431e6335fd5be0589eec073902cc7bb3 (diff) | |
download | u-boot-imx-41ef372c1a2d344621c74aa4bce5cdb0970ba5f1.zip u-boot-imx-41ef372c1a2d344621c74aa4bce5cdb0970ba5f1.tar.gz u-boot-imx-41ef372c1a2d344621c74aa4bce5cdb0970ba5f1.tar.bz2 |
common: Use new numeric setenv functions
Use setenv_ulong(), setenv_hex() and setenv_addr() in common/
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/cmd_nand.c')
-rw-r--r-- | common/cmd_nand.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/common/cmd_nand.c b/common/cmd_nand.c index 495610c..32348f3 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -373,7 +373,6 @@ static void nand_print_and_set_info(int idx) { nand_info_t *nand = &nand_info[idx]; struct nand_chip *chip = nand->priv; - char buf[32]; printf("Device %d: ", idx); if (chip->numchips > 1) @@ -385,14 +384,9 @@ static void nand_print_and_set_info(int idx) printf(" Erase size %8d b\n", nand->erasesize); /* Set geometry info */ - sprintf(buf, "%x", nand->writesize); - setenv("nand_writesize", buf); - - sprintf(buf, "%x", nand->oobsize); - setenv("nand_oobsize", buf); - - sprintf(buf, "%x", nand->erasesize); - setenv("nand_erasesize", buf); + setenv_hex("nand_writesize", nand->writesize); + setenv_hex("nand_oobsize", nand->oobsize); + setenv_hex("nand_erasesize", nand->erasesize); } static int raw_access(nand_info_t *nand, ulong addr, loff_t off, ulong count, |