On Tue, Oct 25, 2011 at 08:59, Simon Glass wrote:
> --- a/common/cmd_mem.c
> +++ b/common/cmd_mem.c
>
> +               int bytes = size * length;

unsigned long

> +               char *buf = map_physmem(addr, bytes, MAP_WRBACK);

probably want void *

> +               /* TODO: create a utility function to map and print error */
> +               if (!buf) {
> +                       puts("Failed to map physical memory\n");
> +                       return 1;
> +               }

unfortunately, this breaks some arches.  address 0 is valid on some
targets.  maybe change the logic to:
    if (addr && !buf)

the rest makes sense to me
-mike
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to