TPL: TM2: FIX: cmd: itest: add support for .q size specifier
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 2 Mar 2016 10:12:29 +0000 (11:12 +0100)
committerJaehoon Chung <jh80.chung@samsung.com>
Thu, 6 Apr 2017 06:47:11 +0000 (15:47 +0900)
Workaround to add support for proper long/quad (32/64bits) memory access.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
cmd/itest.c

index 60626c7fe9c3d983d247aeee6f89b76548a189b5..a774f82f2ab42b5735640f570fe528c6a51fd753 100644 (file)
@@ -73,6 +73,9 @@ static long evalexp(char *s, int w)
                case 4:
                        l = (long)(*(u32 *)buf);
                        break;
+               case 8:
+                       l = (long)(*(unsigned long *)buf);
+                       break;
                }
                unmap_physmem(buf, w);
                return l;
@@ -185,6 +188,7 @@ static int do_itest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        case 1:
        case 2:
        case 4:
+       case 8:
                value = binary_test (argv[2], argv[1], argv[3], w);
                break;
        case -2:
@@ -203,5 +207,5 @@ static int do_itest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 U_BOOT_CMD(
        itest, 4, 0, do_itest,
        "return true/false on integer compare",
-       "[.b, .w, .l, .s] [*]value1 <op> [*]value2"
+       "[.b, .w, .l, .q, .s] [*]value1 <op> [*]value2"
 );