From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Chou Date: Wed, 14 Oct 2015 09:48:21 +0800 Subject: [U-Boot] [PATCH v4] nios2: convert dma_alloc_coherent to use malloc_cache_aligned In-Reply-To: <561C4DB1.9090502@wytron.com.tw> References: <1444013823-11909-1-git-send-email-thomas@wytron.com.tw> <201510121232.56484.marex@denx.de> <561BADA7.1050008@wytron.com.tw> <201510121546.14072.marex@denx.de> <561C4DB1.9090502@wytron.com.tw> Message-ID: <561DB465.6090902@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Marek, >>> On 10/12/2015 06:32 PM, Marek Vasut wrote: >>>> Wouldn't invalidate_dcache_range() be enough here ? You don't care >>>> about >>>> the data in the newly allocated area at this point I guess -- either >>>> you >>>> fill them in and then flush, for DMA from CPU to device OR you receive >>>> data from device to CPU and then you invalidate this buffer again. Thanks a lot for your suggestion. I added invalidate_dcache_range() which will check if the initda instruction is supported by the nios2 cpu. Best regards, Thomas