[U-Boot,RESEND] cmd: itest: add support for .q size specifier
diff mbox series

Message ID 20191002102446.12500-1-m.szyprowski@samsung.com
State Accepted
Delegated to: Tom Rini
Headers show
Series
  • [U-Boot,RESEND] cmd: itest: add support for .q size specifier
Related show

Commit Message

Marek Szyprowski Oct. 2, 2019, 10:24 a.m. UTC
Add support for quad (64bits) memory access specifier.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
---
Resend reason: stand alone patch, independent from the main patchset:
https://patchwork.ozlabs.org/cover/994309/
---
 cmd/itest.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Tom Rini Oct. 12, 2019, 8:28 p.m. UTC | #1
On Wed, Oct 02, 2019 at 12:24:46PM +0200, Marek Szyprowski wrote:

> Add support for quad (64bits) memory access specifier.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Acked-by: Lukasz Majewski <lukma@denx.de>

Applied to u-boot/master, thanks!

Patch
diff mbox series

diff --git a/cmd/itest.c b/cmd/itest.c
index 8b630d71e6..e21e1f1b1b 100644
--- a/cmd/itest.c
+++ b/cmd/itest.c
@@ -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
 );