From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Fri, 17 Aug 2012 19:47:49 -0400 Subject: [U-Boot] [PATCH] Add a memory get command In-Reply-To: <1345237121-20594-1-git-send-email-joe.hershberger@ni.com> References: <1345237121-20594-1-git-send-email-joe.hershberger@ni.com> Message-ID: <201208171947.50854.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: