]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
nand: arasan_nfc: Clear the command and program registers
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Fri, 13 Mar 2015 07:29:41 +0000 (12:59 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 13 Mar 2015 07:52:16 +0000 (08:52 +0100)
Clear the command and program registers as they might be
held up in the state setup by earlier bootloaders.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/mtd/nand/arasan_nfc.c

index ae8e99401f0d62df5810d4fd844d4ad27412ca31..1cd0076f86d095c64a49d081ec7a138095d2c6da 100644 (file)
@@ -1074,6 +1074,9 @@ static int arasan_nand_init(struct nand_chip *nand_chip, int devnum)
        nand_chip->write_buf = arasan_nand_write_buf;
        nand_chip->bbt_options = NAND_BBT_USE_FLASH;
 
+       writel(0x0, &arasan_nand_base->cmd_reg);
+       writel(0x0, &arasan_nand_base->pgm_reg);
+
        /* first scan to find the device and get the page size */
        if (nand_scan_ident(mtd, 1, NULL)) {
                printf("%s: nand_scan_ident failed\n", __func__);