]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/mtd/nand/nand_base.c
mtd: nand: force NAND_CMD_READID onto 8-bit bus
[karo-tx-uboot.git] / drivers / mtd / nand / nand_base.c
index 5d3232c634c60c16fa81c91c22a3ea4db1634fce..376976d5795bbdb95e5e680dbe7a8e8f818fa0ef 100644 (file)
@@ -575,7 +575,8 @@ static void nand_command(struct mtd_info *mtd, unsigned int command,
        /* Serially input address */
        if (column != -1) {
                /* Adjust columns for 16 bit buswidth */
-               if (chip->options & NAND_BUSWIDTH_16)
+               if ((chip->options & NAND_BUSWIDTH_16) &&
+                               !nand_opcode_8bits(command))
                        column >>= 1;
                chip->cmd_ctrl(mtd, column, ctrl);
                ctrl &= ~NAND_CTRL_CHANGE;
@@ -668,7 +669,8 @@ static void nand_command_lp(struct mtd_info *mtd, unsigned int command,
                /* Serially input address */
                if (column != -1) {
                        /* Adjust columns for 16 bit buswidth */
-                       if (chip->options & NAND_BUSWIDTH_16)
+                       if ((chip->options & NAND_BUSWIDTH_16) &&
+                                       !nand_opcode_8bits(command))
                                column >>= 1;
                        chip->cmd_ctrl(mtd, column, ctrl);
                        ctrl &= ~NAND_CTRL_CHANGE;