cmd: itest: add support for .q size specifier
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 2 Oct 2019 10:24:46 +0000 (12:24 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 11 Oct 2019 23:05:14 +0000 (19:05 -0400)
Add support for quad (64bits) memory access specifier.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
cmd/itest.c

index 8b630d71e62dad67c5297182736a994a7f1ae0d5..e21e1f1b1bff2abfa3103b1ff3e5c5e2148cfed9 100644 (file)
@@ -73,6 +73,11 @@ static long evalexp(char *s, int w)
                case 4:
                        l = (long)(*(u32 *)buf);
                        break;
+#ifdef CONFIG_PHYS_64BIT
+               case 8:
+                       l = (long)(*(unsigned long *)buf);
+                       break;
+#endif
                }
                unmap_physmem(buf, w);
                return l;
@@ -186,6 +191,9 @@ static int do_itest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        case 1:
        case 2:
        case 4:
+#ifdef CONFIG_PHYS_64BIT
+       case 8:
+#endif
                value = binary_test (argv[2], argv[1], argv[3], w);
                break;
        case -2:
@@ -204,5 +212,9 @@ 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",
+#ifdef CONFIG_PHYS_64BIT
+       "[.b, .w, .l, .q, .s] [*]value1 <op> [*]value2"
+#else
        "[.b, .w, .l, .s] [*]value1 <op> [*]value2"
+#endif
 );