From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Nelson Date: Mon, 09 Apr 2012 06:35:34 -0700 Subject: [U-Boot] [PATCH] FAT: Properly align buffers to allow cache operations In-Reply-To: <201204091026.54110.marex@denx.de> References: <1333953903-26335-1-git-send-email-marex@denx.de> <4F829BC8.8090705@googlemail.com> <201204091026.54110.marex@denx.de> Message-ID: <4F82E5A6.4060809@boundarydevices.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/09/2012 01:26 AM, Marek Vasut wrote: > Dear Dirk Behme, > >> On 09.04.2012 08:45, Marek Vasut wrote: >>> Align the FAT FS buffers so DMA on various systems can directly pick >>> them. >> >> Just fyi: >> >> http://lists.denx.de/pipermail/u-boot/2012-March/119311.html >> >> http://lists.denx.de/pipermail/u-boot/2012-March/119309.html > > Heh, nice! :-) > > I've been so dug up in debugging the USB cache issues I didn't bother to look > around the list for previous efforts. So obviously, apply Eric's patch! :-) > Hi guys, It looks like I missed this bit though: diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 1f95eb4..d709e59 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -709,7 +711,7 @@ read_bootsectandvi (boot_sector *bs, volume_info *volinfo, int *fatsize) return -1; } - block = malloc(cur_dev->blksz); + block = memalign(ARCH_DMA_MINALIGN, cur_dev->blksz); if (block == NULL) { debug("Error: allocating block\n"); return -1; Perhaps I got lucky in my testing! Regards, Eric