* Command for accessing SPI flash.
*
* Copyright (C) 2008 Atmel Corporation
+ * Licensed under the GPL-2 or later.
*/
+
#include <common.h>
#include <spi_flash.h>
goto usage;
}
if (argc >= 4) {
- mode = simple_strtoul(argv[3], &endp, 0);
+ mode = simple_strtoul(argv[3], &endp, 16);
if (*argv[3] == 0 || *endp != 0)
goto usage;
}
U_BOOT_CMD(
sf, 5, 1, do_spi_flash,
- "sf - SPI flash sub-system\n",
+ "SPI flash sub-system",
"probe [bus:]cs [hz] [mode] - init flash device on given SPI bus\n"
" and chip select\n"
"sf read addr offset len - read `len' bytes starting at\n"
" `offset' to memory at `addr'\n"
"sf write addr offset len - write `len' bytes from memory\n"
" at `addr' to flash at `offset'\n"
- "sf erase offset len - erase `len' bytes from `offset'\n");
+ "sf erase offset len - erase `len' bytes from `offset'"
+);