linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: tango: Fix incorrect use of SEQIN command
@ 2017-05-15 22:10 Boris Brezillon
  2017-05-15 22:30 ` Boris Brezillon
  0 siblings, 1 reply; 4+ messages in thread
From: Boris Brezillon @ 2017-05-15 22:10 UTC (permalink / raw)
  To: Marc Gonzalez, Boris Brezillon, Richard Weinberger, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Cyrille Pitchen

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(-)

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;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mtd: nand: tango: Fix incorrect use of SEQIN command
  2017-05-15 22:10 [PATCH] mtd: nand: tango: Fix incorrect use of SEQIN command Boris Brezillon
@ 2017-05-15 22:30 ` Boris Brezillon
  2017-05-17  8:38   ` Marc Gonzalez
  0 siblings, 1 reply; 4+ messages in thread
From: Boris Brezillon @ 2017-05-15 22:30 UTC (permalink / raw)
  To: Marc Gonzalez, Boris Brezillon, Richard Weinberger, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Cyrille Pitchen

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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mtd: nand: tango: Fix incorrect use of SEQIN command
  2017-05-15 22:30 ` Boris Brezillon
@ 2017-05-17  8:38   ` Marc Gonzalez
  2017-05-29 18:53     ` Boris Brezillon
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Gonzalez @ 2017-05-17  8:38 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Cyrille Pitchen

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mtd: nand: tango: Fix incorrect use of SEQIN command
  2017-05-17  8:38   ` Marc Gonzalez
@ 2017-05-29 18:53     ` Boris Brezillon
  0 siblings, 0 replies; 4+ messages in thread
From: Boris Brezillon @ 2017-05-29 18:53 UTC (permalink / raw)
  To: Marc Gonzalez
  Cc: Richard Weinberger, linux-mtd, Marek Vasut, Cyrille Pitchen,
	Brian Norris, David Woodhouse

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-29 18:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-15 22:10 [PATCH] mtd: nand: tango: Fix incorrect use of SEQIN command Boris Brezillon
2017-05-15 22:30 ` Boris Brezillon
2017-05-17  8:38   ` Marc Gonzalez
2017-05-29 18:53     ` Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).