linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* flash_lock issue for n25q 128mb spi nor part
@ 2019-12-02 17:28 John Garry
  2019-12-03  9:45 ` Tudor.Ambarus
  0 siblings, 1 reply; 27+ messages in thread
From: John Garry @ 2019-12-02 17:28 UTC (permalink / raw)
  To: tudor.ambarus, linux-mtd; +Cc: Mark Brown, chenxiang

Hi guys,

I am testing the following driver on top of Linus' master branch with a 
n25q128a11 part:

https://lore.kernel.org/linux-mtd/1572886297-45400-3-git-send-email-john.garry@huawei.com/

I am finding flash lock is not working. Even after a “successful” lock, 
flash_lock is reporting flash is unlocked. And I can still write to the 
flash.

I find that since 39d1e3340c73 ("mtd: spi-nor: Fix clearing of QE bit on 
lock()/unlock()"), we're using a 16b SR for this part in the driver, but 
this part only has a 8b SR.

This hack fixes the problem for me:

@ -4691,7 +4691,7 @@ static void spi_nor_info_init_params(struct spi_nor 
*nor)
params->set_4byte = spansion_set_4byte;
params->setup = spi_nor_default_setup;
/* Default to 16-bit Write Status (01h) Command */
- nor->flags |= SNOR_F_HAS_16BIT_SR;
+// nor->flags |= SNOR_F_HAS_16BIT_SR;

Any idea what's going wrong?

Thanks,
John

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

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

end of thread, other threads:[~2020-03-23 17:58 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-02 17:28 flash_lock issue for n25q 128mb spi nor part John Garry
2019-12-03  9:45 ` Tudor.Ambarus
2019-12-03 10:31   ` John Garry
2019-12-03 11:07     ` Tudor.Ambarus
2019-12-03 11:44       ` John Garry
2019-12-03 12:05         ` Tudor.Ambarus
2019-12-03 12:27           ` Tudor.Ambarus
2019-12-03 12:35             ` John Garry
2019-12-03 13:57               ` John Garry
2019-12-03 14:44                 ` Tudor.Ambarus
2019-12-03 15:29                   ` John Garry
2019-12-04 11:10                     ` John Garry
2019-12-16 18:09                       ` Tudor.Ambarus
2019-12-17  8:57                         ` Vignesh Raghavendra
2019-12-17 10:09                           ` John Garry
2020-01-09 10:36                           ` John Garry
2020-01-10 11:51                             ` Tudor.Ambarus
2020-01-10 11:56                               ` John Garry
2020-01-15  9:28                                 ` John Garry
2020-03-09 10:15                               ` [RESEND PATCH 1/2] mtd: spi-nor: Clear WEL bit when erase or program errors occur Tudor.Ambarus
2020-03-09 10:15                                 ` [RESEND PATCH 2/2] mtd: spi-nor: Fix description of the sr_ready() return value Tudor.Ambarus
2020-03-09 15:04                                 ` [RESEND PATCH 1/2] mtd: spi-nor: Clear WEL bit when erase or program errors occur John Garry
2020-03-23 17:58                                   ` Tudor.Ambarus
2019-12-03 14:16               ` [PATCH] mtd: spi-nor: Fix the write Status Register on micron flashes Tudor.Ambarus
2019-12-03 14:50                 ` [PATCH v2] mtd: spi-nor: Fix the writing of the " Tudor.Ambarus
2019-12-04 10:18                   ` John Garry
2020-01-09 19:14                   ` Miquel Raynal

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