cmd: nand biterr - Add support for nand biterr command
[platform/kernel/u-boot.git] / cmd / fpgad.c
index 5370c3e..e65441b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2013
  * Dirk Eibach,  Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc
@@ -5,8 +6,6 @@
  * based on cmd_mem.c
  * (C) Copyright 2000
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -26,7 +25,7 @@ static uint   dp_last_length = 0x40;
  *     fpgad {fpga} {addr} {len}
  */
 #define DISP_LINE_LEN  16
-int do_fpga_md(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_fpga_md(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
        unsigned int k;
        unsigned int fpga;
@@ -50,19 +49,19 @@ int do_fpga_md(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                /*
                 * FPGA is specified since argc > 2
                 */
-               fpga = simple_strtoul(argv[1], NULL, 16);
+               fpga = hextoul(argv[1], NULL);
 
                /*
                 * Address is specified since argc > 2
                 */
-               addr = simple_strtoul(argv[2], NULL, 16);
+               addr = hextoul(argv[2], NULL);
 
                /*
                 * If another parameter, it is the length to display.
                 * Length is the number of objects, not number of bytes.
                 */
                if (argc > 3)
-                       length = simple_strtoul(argv[3], NULL, 16);
+                       length = hextoul(argv[3], NULL);
        }
 
        nbytes = length * sizeof(u16);