X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cmd%2Fitest.c;h=e21e1f1b1bff2abfa3103b1ff3e5c5e2148cfed9;hb=0bffb8c46b109dcd8766e78c357147c07333f6b6;hp=e1896d9f9728df3f8195d6d4a11321c5f67723b1;hpb=2c79fd401982c7d6c5e77c09bc7035f8a3766c88;p=oweals%2Fu-boot.git diff --git a/cmd/itest.c b/cmd/itest.c index e1896d9f97..e21e1f1b1b 100644 --- a/cmd/itest.c +++ b/cmd/itest.c @@ -1,8 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2003 * Tait Electronics Limited, Christchurch, New Zealand - * - * SPDX-License-Identifier: GPL-2.0+ */ /* @@ -15,6 +14,7 @@ #include #include #include +#include #include #include @@ -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; @@ -101,7 +106,7 @@ static char * evalstr(char *s) i++; } s[i] = 0; - return getenv((const char *)&s[2]); + return env_get((const char *)&s[2]); } else { return s; } @@ -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 [*]value2" +#else "[.b, .w, .l, .s] [*]value1 [*]value2" +#endif );