flash_lock issue for n25q 128mb spi nor part

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx/

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/




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux