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 <ezequiel.garcia@free-electrons.com>
Tested-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
Ezequiel Garcia 2013-11-14 18:25:30 -03:00 committed by Brian Norris
parent 43bcfd2bb2
commit f0e6a32e9a

View file

@ -602,6 +602,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
@ -623,7 +624,6 @@ static int prepare_command_pool(struct pxa3xx_nand_info *info, int command,
default:
info->ndcb1 = 0;
info->ndcb2 = 0;
info->ndcb3 = 0;
break;
}