mtd: nand: pxa3xx: Fix SEQIN column address set

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jan 28 00:59:02 EST 2014


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=e7f9a6a4628d0db43970fa3d2ba57be745416927
Commit:     e7f9a6a4628d0db43970fa3d2ba57be745416927
Parent:     39f83d15df36fa2d50de677e0743438df2ed4cf4
Author:     Ezequiel Garcia <ezequiel.garcia at free-electrons.com>
AuthorDate: Thu Nov 14 18:25:35 2013 -0300
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Fri Jan 3 11:22:16 2014 -0800

    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 <ezequiel.garcia at free-electrons.com>
    Tested-by: Daniel Mack <zonque at gmail.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/pxa3xx_nand.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 7a164fb..579347b 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:



More information about the linux-mtd-cvs mailing list