]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mtd: nand: pxa3xx: Clear cmd buffer #3 (NDCB3) on command start
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Thu, 14 Nov 2013 21:25:30 +0000 (18:25 -0300)
committerBrian Norris <computersforpeace@gmail.com>
Fri, 22 Nov 2013 22:12:57 +0000 (14:12 -0800)
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>
drivers/mtd/nand/pxa3xx_nand.c

index 40eff6d3a498d6f9d7ec23a2b1989522be215510..5b5243f94afa92ee655e218e81ed5524585a9f88 100644 (file)
@@ -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;
        }