diff mbox

mtd: nand: tango: Fix incorrect use of SEQIN command

Message ID 1494886224-20393-1-git-send-email-boris.brezillon@free-electrons.com
State Accepted
Commit a186493237a9d8559997c2f97c33c4716d602fd2
Delegated to: Boris Brezillon
Headers show

Commit Message

Boris Brezillon May 15, 2017, 10:10 p.m. UTC
SEQIN is supposed to be used one wants to start programming a page.
What we want here is just changing the column within the page, which is
done with the RNDIN command.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 drivers/mtd/nand/tango_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Boris Brezillon May 15, 2017, 10:30 p.m. UTC | #1
On Tue, 16 May 2017 00:10:24 +0200
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> SEQIN is supposed to be used one wants to start programming a page.

			      ^ when one ...

> What we want here is just changing the column within the page, which is
> done with the RNDIN command.
> 

Forgot the following tags.

Fixes: 6956e2385a16 ("mtd: nand: add tango NAND flash controller support")
Cc: state@vger.kernel.org

> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
>  drivers/mtd/nand/tango_nand.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/tango_nand.c b/drivers/mtd/nand/tango_nand.c
> index 05b6e1065203..a2150b15d4c1 100644
> --- a/drivers/mtd/nand/tango_nand.c
> +++ b/drivers/mtd/nand/tango_nand.c
> @@ -332,7 +332,7 @@ static void aux_write(struct nand_chip *chip, const u8 **buf, int len, int *pos)
>  
>  	if (!*buf) {
>  		/* skip over "len" bytes */
> -		chip->cmdfunc(mtd, NAND_CMD_SEQIN, *pos, -1);
> +		chip->cmdfunc(mtd, NAND_CMD_RNDIN, *pos, -1);
>  	} else {
>  		tango_write_buf(mtd, *buf, len);
>  		*buf += len;
Marc Gonzalez May 17, 2017, 8:38 a.m. UTC | #2
On 16/05/2017 00:30, Boris Brezillon wrote:

> Boris Brezillon wrote:
> 
>> SEQIN is supposed to be used one wants to start programming a page.
> 
> 			      ^ when one ...
> 
>> What we want here is just changing the column within the page, which is
                             
I would write "is just to change".

>> done with the RNDIN command.
>>
> 
> Forgot the following tags.
> 
> Fixes: 6956e2385a16 ("mtd: nand: add tango NAND flash controller support")
> Cc: state@vger.kernel.org

stable, I assume.

>> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
>> ---
>>  drivers/mtd/nand/tango_nand.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/nand/tango_nand.c b/drivers/mtd/nand/tango_nand.c
>> index 05b6e1065203..a2150b15d4c1 100644
>> --- a/drivers/mtd/nand/tango_nand.c
>> +++ b/drivers/mtd/nand/tango_nand.c
>> @@ -332,7 +332,7 @@ static void aux_write(struct nand_chip *chip, const u8 **buf, int len, int *pos)
>>  
>>  	if (!*buf) {
>>  		/* skip over "len" bytes */
>> -		chip->cmdfunc(mtd, NAND_CMD_SEQIN, *pos, -1);
>> +		chip->cmdfunc(mtd, NAND_CMD_RNDIN, *pos, -1);
>>  	} else {
>>  		tango_write_buf(mtd, *buf, len);
>>  		*buf += len;

Looks correct, but I have no knowledge of NAND protocols :-)

Acked-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>

Regards.
Boris Brezillon May 29, 2017, 6:53 p.m. UTC | #3
On Wed, 17 May 2017 10:38:21 +0200
Marc Gonzalez <marc_gonzalez@sigmadesigns.com> wrote:

> On 16/05/2017 00:30, Boris Brezillon wrote:
> 
> > Boris Brezillon wrote:
> >   
> >> SEQIN is supposed to be used one wants to start programming a page.  
> > 
> > 			      ^ when one ...
> >   
> >> What we want here is just changing the column within the page, which is  
>                              
> I would write "is just to change".
> 
> >> done with the RNDIN command.
> >>  
> > 
> > Forgot the following tags.
> > 
> > Fixes: 6956e2385a16 ("mtd: nand: add tango NAND flash controller support")
> > Cc: state@vger.kernel.org  
> 
> stable, I assume.
> 
> >> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> >> ---
> >>  drivers/mtd/nand/tango_nand.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/mtd/nand/tango_nand.c b/drivers/mtd/nand/tango_nand.c
> >> index 05b6e1065203..a2150b15d4c1 100644
> >> --- a/drivers/mtd/nand/tango_nand.c
> >> +++ b/drivers/mtd/nand/tango_nand.c
> >> @@ -332,7 +332,7 @@ static void aux_write(struct nand_chip *chip, const u8 **buf, int len, int *pos)
> >>  
> >>  	if (!*buf) {
> >>  		/* skip over "len" bytes */
> >> -		chip->cmdfunc(mtd, NAND_CMD_SEQIN, *pos, -1);
> >> +		chip->cmdfunc(mtd, NAND_CMD_RNDIN, *pos, -1);
> >>  	} else {
> >>  		tango_write_buf(mtd, *buf, len);
> >>  		*buf += len;  
> 
> Looks correct, but I have no knowledge of NAND protocols :-)
> 
> Acked-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>

Applied to nand/next after fixing commit message + stable address.

> 
> Regards.
> 
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
diff mbox

Patch

diff --git a/drivers/mtd/nand/tango_nand.c b/drivers/mtd/nand/tango_nand.c
index 05b6e1065203..a2150b15d4c1 100644
--- a/drivers/mtd/nand/tango_nand.c
+++ b/drivers/mtd/nand/tango_nand.c
@@ -332,7 +332,7 @@  static void aux_write(struct nand_chip *chip, const u8 **buf, int len, int *pos)
 
 	if (!*buf) {
 		/* skip over "len" bytes */
-		chip->cmdfunc(mtd, NAND_CMD_SEQIN, *pos, -1);
+		chip->cmdfunc(mtd, NAND_CMD_RNDIN, *pos, -1);
 	} else {
 		tango_write_buf(mtd, *buf, len);
 		*buf += len;