From: Karl Beldan Date: Mon, 15 Aug 2016 17:23:00 +0000 Subject: [U-Boot] [PATCH v2 1/2] net: davinci_emac: Round up top tx buffer boundaries for dcache ops In-Reply-To: <20160815172301.4490-1-karl.beldan+oss@gmail.com> References: <20160815172301.4490-1-karl.beldan+oss@gmail.com> Message-ID: <20160815172301.4490-2-karl.beldan+oss@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 remaining warnings: CACHE: Misaligned operation at range Signed-off-by: Karl Beldan --- drivers/net/davinci_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 947bfab..62b7a1d 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -632,7 +632,7 @@ static int davinci_eth_send_packet (struct eth_device *dev, EMAC_CPPI_EOP_BIT); flush_dcache_range((unsigned long)packet, - (unsigned long)packet + length); + (unsigned long)packet + ALIGN(length, PKTALIGN)); /* Send the packet */ writel(BD_TO_HW((unsigned long)emac_tx_desc), &adap_emac->TX0HDP); -- 2.9.2