linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: denali: pass col argument to READID operation
@ 2015-09-18  8:02 Enrico Jorns
  2015-09-29 18:32 ` Brian Norris
  0 siblings, 1 reply; 2+ messages in thread
From: Enrico Jorns @ 2015-09-18  8:02 UTC (permalink / raw)
  To: linux-mtd; +Cc: kernel, Enrico Jorns

A read id operation followed by 0x00 reads the device ID while
a read id operation followed by 0x20 reads the possible ONFI identifier.

As the READID function did not propagate the second id parameter but had
a hard-coded call for 0x90 0x00, reading the ONFI identifier was not
possible and thus chips werde not detected (tested with
MT29F8G08ABABAWP)

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
---
 drivers/mtd/nand/denali.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index 870c7fc..7b6186f 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -1304,7 +1304,7 @@ static void denali_cmdfunc(struct mtd_info *mtd, unsigned int cmd, int col,
 		 */
 		addr = MODE_11 | BANK(denali->flash_bank);
 		index_addr(denali, addr | 0, 0x90);
-		index_addr(denali, addr | 1, 0);
+		index_addr(denali, addr | 1, col);
 		for (i = 0; i < 8; i++) {
 			index_addr_read_data(denali, addr | 2, &id);
 			write_byte_to_buf(denali, id);
-- 
2.5.1

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

* Re: [PATCH] mtd: nand: denali: pass col argument to READID operation
  2015-09-18  8:02 [PATCH] mtd: nand: denali: pass col argument to READID operation Enrico Jorns
@ 2015-09-29 18:32 ` Brian Norris
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2015-09-29 18:32 UTC (permalink / raw)
  To: Enrico Jorns; +Cc: linux-mtd, kernel, Graham Moore

On Fri, Sep 18, 2015 at 10:02:41AM +0200, Enrico Jorns wrote:
> A read id operation followed by 0x00 reads the device ID while
> a read id operation followed by 0x20 reads the possible ONFI identifier.
> 
> As the READID function did not propagate the second id parameter but had
> a hard-coded call for 0x90 0x00, reading the ONFI identifier was not
> possible and thus chips werde not detected (tested with
> MT29F8G08ABABAWP)
> 
> Signed-off-by: Enrico Jorns <ejo@pengutronix.de>

Looks OK to me. Pushed to l2-mtd.git.

> ---
>  drivers/mtd/nand/denali.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
> index 870c7fc..7b6186f 100644
> --- a/drivers/mtd/nand/denali.c
> +++ b/drivers/mtd/nand/denali.c
> @@ -1304,7 +1304,7 @@ static void denali_cmdfunc(struct mtd_info *mtd, unsigned int cmd, int col,
>  		 */
>  		addr = MODE_11 | BANK(denali->flash_bank);
>  		index_addr(denali, addr | 0, 0x90);
> -		index_addr(denali, addr | 1, 0);
> +		index_addr(denali, addr | 1, col);
>  		for (i = 0; i < 8; i++) {
>  			index_addr_read_data(denali, addr | 2, &id);
>  			write_byte_to_buf(denali, id);
> -- 
> 2.5.1
> 
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, other threads:[~2015-09-29 18:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-18  8:02 [PATCH] mtd: nand: denali: pass col argument to READID operation Enrico Jorns
2015-09-29 18:32 ` Brian Norris

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