]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
nand: fix buffer alignment in new verification feature
authorStephen Warren <swarren@nvidia.com>
Tue, 14 Apr 2015 14:59:00 +0000 (08:59 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:43:28 +0000 (22:43 +0200)
commit23b516394989826e3cd794ca76bcb3199ab83314
tree1c161aa2172d056a6205ed8ca0512a08260a5e9c
parentc2e44134d2a2549e96fcf1fbb05c2965bd3ffecf
nand: fix buffer alignment in new verification feature

On systems with caches enabled, NAND I/O may need to flush/invalidate
the cache during read/write operations. For this to work correctly, all
buffers must be cache-aligned. Fix nand_verify*() to allocate aligned
buffers.

This prevents cache alignment warnings from being spewed when using
U-Boot to write an updated version of itself to flash on NVIDIA Tegra
Seaboard (after perturbation of stack/data layout in current
u-boot-dm/next branch).

I have validatd (executed) nand_verify(), but I don't think I've executed
nand_verify_page_oob(); testing of that would be useful.

Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Fixes: 59b5a2ad83df ("nand: Add verification functions")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Scott Wood <scottwood@freescale.com>
drivers/mtd/nand/nand_util.c