X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=common%2Fcmd_sf.c;h=d69ae6a1ba90a2247446b1096b1f39618622d588;hb=2a49bf3149e34e6f910e70bbc0a26e81cfdbdf70;hp=8c0a7514dfa210436f066ba81300ba6a409f071d;hpb=b6368467e6a97f225e0a5fd7bfc5c7598ef5ddc4;p=platform%2Fkernel%2Fu-boot.git diff --git a/common/cmd_sf.c b/common/cmd_sf.c index 8c0a751..d69ae6a 100644 --- a/common/cmd_sf.c +++ b/common/cmd_sf.c @@ -2,7 +2,9 @@ * Command for accessing SPI flash. * * Copyright (C) 2008 Atmel Corporation + * Licensed under the GPL-2 or later. */ + #include #include @@ -48,7 +50,7 @@ static int do_spi_flash_probe(int argc, char *argv[]) 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; } @@ -175,17 +177,18 @@ static int do_spi_flash(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return do_spi_flash_erase(argc - 1, argv + 1); usage: - printf("Usage:\n%s\n", cmdtp->usage); + cmd_usage(cmdtp); return 1; } 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'" +);