Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Stephen Warren's avatar
    5e856fa8
    nand: fix buffer alignment in new verification feature · 5e856fa8
    Stephen Warren authored
    
    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: 59b5a2ad ("nand: Add verification functions")
    Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
    Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
    Acked-by: default avatarScott Wood <scottwood@freescale.com>
    5e856fa8
    History
    nand: fix buffer alignment in new verification feature
    Stephen Warren authored
    
    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: 59b5a2ad ("nand: Add verification functions")
    Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
    Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
    Acked-by: default avatarScott Wood <scottwood@freescale.com>