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>
Wed, 18 May 2016 06:32:11 +0000 (15:32 +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 fb4d797e43d78b56b4a466a7d086bfcdb20cdf14..07b4c48e9fed90f80afb42b595a8baff2ad6a14e 100644 (file)
@@ -71,6 +71,9 @@ static long evalexp(char *s, int w)
                        l = (long)(*(unsigned short *)buf);
                        break;
                case 4:
+                       l = (long)(*(unsigned int *)buf);
+                       break;
+               case 8:
                        l = (long)(*(unsigned long *)buf);
                        break;
                }
@@ -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"
 );