From: Ezequiel Garcia Date: Thu, 14 Nov 2013 21:25:30 +0000 (-0300) Subject: mtd: nand: pxa3xx: Clear cmd buffer #3 (NDCB3) on command start X-Git-Tag: next-20131128~37^2~22 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6ace6a894b15e7229e7d685bbde637a7c3cdfd82;p=karo-tx-linux.git mtd: nand: pxa3xx: Clear cmd buffer #3 (NDCB3) on command start Command buffer #3 is not properly cleared and it keeps the last set value. Fix this by clearing when a command is setup. Signed-off-by: Ezequiel Garcia Tested-by: Daniel Mack Signed-off-by: Brian Norris --- diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 40eff6d3a498..5b5243f94afa 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -606,6 +606,7 @@ static int prepare_command_pool(struct pxa3xx_nand_info *info, int command, info->use_ecc = 0; info->use_spare = 1; info->retcode = ERR_NONE; + info->ndcb3 = 0; if (info->cs != 0) info->ndcb0 = NDCB0_CSEL; else @@ -627,7 +628,6 @@ static int prepare_command_pool(struct pxa3xx_nand_info *info, int command, default: info->ndcb1 = 0; info->ndcb2 = 0; - info->ndcb3 = 0; break; }