Commit d25d52ff authored by Kamal Dasu's avatar Kamal Dasu Committed by Greg Kroah-Hartman

mtd: nand: brcmnand: Disable prefetch by default

commit f953f0f8 upstream.

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: default avatarKamal Dasu <kdasu.kdev@gmail.com>
Fixes: 27c5b17c ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller")
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cbdabc70
...@@ -2193,16 +2193,9 @@ static int brcmnand_setup_dev(struct brcmnand_host *host) ...@@ -2193,16 +2193,9 @@ static int brcmnand_setup_dev(struct brcmnand_host *host)
if (ctrl->nand_version >= 0x0702) if (ctrl->nand_version >= 0x0702)
tmp |= ACC_CONTROL_RD_ERASED; tmp |= ACC_CONTROL_RD_ERASED;
tmp &= ~ACC_CONTROL_FAST_PGM_RDIN; tmp &= ~ACC_CONTROL_FAST_PGM_RDIN;
if (ctrl->features & BRCMNAND_HAS_PREFETCH) { if (ctrl->features & BRCMNAND_HAS_PREFETCH)
/* tmp &= ~ACC_CONTROL_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;
}
nand_writereg(ctrl, offs, tmp); nand_writereg(ctrl, offs, tmp);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment