From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sat, 10 Oct 2015 20:10:01 +0200 Subject: [U-Boot] [PATCH] nios2: zap cache status enable and disable functions In-Reply-To: <5618C086.4000706@wytron.com.tw> References: <1444361567-27328-1-git-send-email-thomas@wytron.com.tw> <201510091457.00490.marex@denx.de> <5618C086.4000706@wytron.com.tw> Message-ID: <201510102010.01110.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Saturday, October 10, 2015 at 09:38:46 AM, Thomas Chou wrote: > Hi Marek, > > On 10/09/2015 08:57 PM, Marek Vasut wrote: > > On Friday, October 09, 2015 at 05:32:47 AM, Thomas Chou wrote: > >> As the icache and dcache of nios2 are always enabled, the > >> cmd_cache is no of use and the cache status, enable and > >> disable functions can be removed. > > > > This is no good, I want to be able to enable/disable caches to look > > for DMA-related issues. That is, if I disable cache, the suspicious > > driver works and if I enable cache, the driver does not work, I can > > conclude that it's a DMA/cache-related issue. > > I understand. But the hardware always enables the cache if it is > configured in nios2 cpu. > > We can bypass (partially disable) the cache using ioremap() or > dma_alloc_coherent(). If the DMA buffer address is mangled with > ioremap(), then it is uncached. You may use this to debug. OK, now it's clearer to me what you mean, thanks. Best regards, Marek Vasut