Messages in this thread | | | Date | Thu, 21 Sep 2023 15:35:51 +0100 | Subject | Re: [PATCH v2] mtd: micron-st: enable lock/unlock for mt25qu512a | From | Tudor Ambarus <> |
| |
On 9/21/23 15:31, Tudor Ambarus wrote: cut > > So the first commit will look like: > diff --git a/drivers/mtd/spi-nor/micron-st.c > b/drivers/mtd/spi-nor/micron-st.c > index 4afcfc57c896..a8da1f18e335 100644 > --- a/drivers/mtd/spi-nor/micron-st.c > +++ b/drivers/mtd/spi-nor/micron-st.c > @@ -405,9 +405,6 @@ static const struct flash_info st_nor_parts[] = { > }, { > .id = SNOR_ID(0x20, 0xbb, 0x20, 0x10, 0x44, 0x00), > .name = "mt25qu512a", > - .size = SZ_64M, > - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | > SPI_NOR_QUAD_READ, > - .fixup_flags = SPI_NOR_4B_OPCODES,
since we removed the 4b-opcodes flag here, > .mfr_flags = USE_FSR, > }, { > .id = SNOR_ID(0x20, 0xbb, 0x20), > > and the second one will add just the BP support, something like: > diff --git a/drivers/mtd/spi-nor/micron-st.c > b/drivers/mtd/spi-nor/micron-st.c > index a8da1f18e335..fdafbfa0f936 100644 > --- a/drivers/mtd/spi-nor/micron-st.c > +++ b/drivers/mtd/spi-nor/micron-st.c > @@ -405,6 +405,8 @@ static const struct flash_info st_nor_parts[] = { > }, { > .id = SNOR_ID(0x20, 0xbb, 0x20, 0x10, 0x44, 0x00), > .name = "mt25qu512a", > + .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | > SPI_NOR_4BIT_BP | > + SPI_NOR_BP3_SR_BIT6, > .mfr_flags = USE_FSR, > }, { > .id = SNOR_ID(0x20, 0xbb, 0x20), > > Of course, I expect you to run again the mtd_debug tests and also verify > the locking. Thanks!
would also be good if you can also verify that 4BAIT SFDP table is present and you still use the 4B opcodes after the change.
> > Cheers, > ta >
| |