From: Ezequiel Garcia Date: Thu, 14 Nov 2013 21:25:35 +0000 (-0300) Subject: mtd: nand: pxa3xx: Fix SEQIN column address set X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e7f9a6a4628d0db43970fa3d2ba57be745416927;p=openwrt%2Fstaging%2Fblogic.git mtd: nand: pxa3xx: Fix SEQIN column address set 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 Tested-by: Daniel Mack Signed-off-by: Brian Norris --- diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 7a164fbd7a18..579347bc254d 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -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: