mtd: nand: pxa3xx: Fix SEQIN column address set
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Thu, 14 Nov 2013 21:25:35 +0000 (18:25 -0300)
committerBrian Norris <computersforpeace@gmail.com>
Fri, 3 Jan 2014 19:22:16 +0000 (11:22 -0800)
This commit adds support page programming with a non-zero "column"
address setting. This is important to support OOB writing, through
command sequences such as:

  cmdfunc(mtd, NAND_CMD_SEQIN, mtd->writesize, ofs);
  write_buf(mtd, oob_buf, 6);
  cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1);

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 7a164fbd7a1877d2f71a45398dc89c30a86fb783..579347bc254d37da3251c8040ebb9cce8cb3bd61 100644 (file)
@@ -690,7 +690,8 @@ static int prepare_set_command(struct pxa3xx_nand_info *info, int command,
 
        case NAND_CMD_SEQIN:
 
-               set_command_address(info, mtd->writesize, column, page_addr);
+               info->buf_start = column;
+               set_command_address(info, mtd->writesize, 0, page_addr);
                break;
 
        case NAND_CMD_PAGEPROG: