diff options
author | Stefan Roese <sr@denx.de> | 2017-02-16 12:58:37 (GMT) |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2017-03-29 05:39:44 (GMT) |
commit | f811e04ad76019fccb79c8ac2c84a4e84ebef5fd (patch) | |
tree | 0859d36dd7f1fa3e02ae7073cbda34adaef809da | |
parent | e1b27d27a64d3b007c877f48a1aa106d228db7fc (diff) | |
download | u-boot-f811e04ad76019fccb79c8ac2c84a4e84ebef5fd.tar.xz |
net: mvpp2: Round up top tx buffer boundaries for dcache ops
check_cache_range() warns that the top boundaries are not properly
aligned when flushing or invalidating the buffers and make these
operations fail.
This gets rid of the warnings:
CACHE: Misaligned operation at range ...
Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r-- | drivers/net/mvpp2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index 88e88b9..93eb1f2 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -3972,7 +3972,8 @@ static int mvpp2_send(struct udevice *dev, void *packet, int length) | MVPP2_TXD_F_DESC | MVPP2_TXD_L_DESC; /* Flush tx data */ - flush_dcache_range((u32)packet, (u32)packet + length); + flush_dcache_range((unsigned long)packet, + (unsigned long)packet + ALIGN(length, PKTALIGN)); /* Enable transmit */ mb(); |