[U-Boot] [PATCH] Add a memory get command
Mike Frysinger
vapier at gentoo.org
Sat Aug 18 01:47:49 CEST 2012
On Friday 17 August 2012 16:58:41 Joe Hershberger wrote:
> --- a/common/cmd_mem.c
> +++ b/common/cmd_mem.c
>
> +#ifdef CONFIG_CMD_MEM_GET
not the greatest name ...
> +int do_mem_mg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
static
> + size = cmd_get_data_size(argv[0], 4);
> + if (size < 0)
> + return 1;
> +
> + var = argv[1];
> +
> + addr = simple_strtoul(argv[2], NULL, 16);
> + addr += base_address;
> +
> + if (size == 4) {
> + uint32_t value = readl(addr);
why use io.h commands ? we don't use it with any of the other mem commands.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120817/3ed5d089/attachment.pgp>
More information about the U-Boot
mailing list