mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
mtd: nand: brcmnand: Disable prefetch by default
Brcm nand controller prefetch feature needs to be disabled
by default. Enabling affects performance on random reads as
well as dma reads.
Signed-off-by: Kamal Dasu <[email protected]>
Fixes: 27c5b17cd1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller")
Cc: <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
This commit is contained in:
parent
069f05346d
commit
f953f0f896
1 changed files with 3 additions and 10 deletions
|
|
@ -2200,16 +2200,9 @@ static int brcmnand_setup_dev(struct brcmnand_host *host)
|
|||
if (ctrl->nand_version >= 0x0702)
|
||||
tmp |= ACC_CONTROL_RD_ERASED;
|
||||
tmp &= ~ACC_CONTROL_FAST_PGM_RDIN;
|
||||
if (ctrl->features & BRCMNAND_HAS_PREFETCH) {
|
||||
/*
|
||||
* FIXME: Flash DMA + prefetch may see spurious erased-page ECC
|
||||
* errors
|
||||
*/
|
||||
if (has_flash_dma(ctrl))
|
||||
tmp &= ~ACC_CONTROL_PREFETCH;
|
||||
else
|
||||
tmp |= ACC_CONTROL_PREFETCH;
|
||||
}
|
||||
if (ctrl->features & BRCMNAND_HAS_PREFETCH)
|
||||
tmp &= ~ACC_CONTROL_PREFETCH;
|
||||
|
||||
nand_writereg(ctrl, offs, tmp);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue