Dear Stefano Babic,

> If the range passed to flush_cache is not multiple
> of ARCH_DMA_MINALIGN, a warning due to mislaignment
> is printed.
> Detected with fec_mxc, mx35 boards:
> 
> CACHE: Misaligned operation at range [80800000, 8083c310]
> 
> Signed-off-by: Stefano Babic <sba...@denx.de>
> CC: Marek Vasut <ma...@denx.de>
> CC: Joe Hershberger <joe.hershber...@gmail.com>
> Cc: Wolfgang Denk <w...@denx.de>
> ---
>  common/cmd_net.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/common/cmd_net.c b/common/cmd_net.c
> index 65f32bc..a500919 100644
> --- a/common/cmd_net.c
> +++ b/common/cmd_net.c
> @@ -256,7 +256,7 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t
> *cmdtp, int argc, }
> 
>       /* flush cache */
> -     flush_cache(load_addr, size);
> +     flush_cache(load_addr, roundup(size, ARCH_DMA_MINALIGN));

This ain't gonna slide. You might overwrite something, even though this is just 
loading into memory, right? I'm not quite sure how to handle this kind of 
unaligned access.

But adding at least if (unaligned) debug(...); to aid people easily finding 
these trouble would be nice ;-)

>       bootstage_mark(BOOTSTAGE_ID_NET_LOADED);

Best regards,
Marek Vasut
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to