[U-Boot,1/9] cmd: itest: add support for .q size specifier

Message ID 20181107150105.23165-2-m.szyprowski@samsung.com
State Changes Requested
Delegated to: Minkyu Kang
Headers show
Series
  • ARM: Exynos: Add TM2 board support
Related show

Commit Message

Marek Szyprowski Nov. 7, 2018, 3 p.m.
Add support for quad (64bits) memory access.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 cmd/itest.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Lukasz Majewski Nov. 21, 2018, 12:48 a.m. | #1
On Wed, 07 Nov 2018 16:00:57 +0100
Marek Szyprowski <m.szyprowski@samsung.com> wrote:

> Add support for quad (64bits) memory access.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  cmd/itest.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/cmd/itest.c b/cmd/itest.c
> index fd6f4166f1..1813a131d1 100644
> --- a/cmd/itest.c
> +++ b/cmd/itest.c
> @@ -72,6 +72,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;
> @@ -185,6 +190,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:
> @@ -203,5 +211,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
>  );

Acked-by: Lukasz Majewski <lukma@denx.de>


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

Patch

diff --git a/cmd/itest.c b/cmd/itest.c
index fd6f4166f1..1813a131d1 100644
--- a/cmd/itest.c
+++ b/cmd/itest.c
@@ -72,6 +72,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;
@@ -185,6 +190,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:
@@ -203,5 +211,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
 );