Re: [PATCH v4 2/3] spi-nor: s25fl512s supports region locking

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

 



Hi Tudor,

On Tue, May 7, 2019 at 12:42 PM <Tudor.Ambarus@xxxxxxxxxxxxx> wrote:
> On 05/07/2019 12:53 PM, Geert Uytterhoeven wrote:
> > On Wed, Mar 20, 2019 at 8:16 AM Jonas Bonn <jonas@xxxxxxxxxxx> wrote:
> >> Both the BP[0-2] bits and the TBPROT bit are supported on this chip.
> >> Tested and verified on a Cypress s25fl512s.
> >>
> >> Signed-off-by: Jonas Bonn <jonas@xxxxxxxxxxx>
> >
> > This is now commit dcb4b22eeaf44f91 ("spi-nor: s25fl512s supports region
> > locking") in mtd/next.
> >
> >> --- a/drivers/mtd/spi-nor/spi-nor.c
> >> +++ b/drivers/mtd/spi-nor/spi-nor.c
> >> @@ -1898,7 +1898,9 @@ static const struct flash_info spi_nor_ids[] = {
> >>                         SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
> >>         { "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, USE_CLSR) },
> >>         { "s25fl256s1", INFO(0x010219, 0x4d01,  64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
> >> -       { "s25fl512s",  INFO6(0x010220, 0x4d0080, 256 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
> >> +       { "s25fl512s",  INFO6(0x010220, 0x4d0080, 256 * 1024, 256,
> >> +                       SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
> >> +                       SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | USE_CLSR) },
> >
> > Setting SPI_NOR_HAS_LOCK causes the QSPI FLASH on r8a7791/koelsch to fail
> > probing.
> >
> > Before/after:
> >
> >     -m25p80 spi0.0: s25fl512s (65536 Kbytes)
> >     -3 fixed-partitions partitions found on MTD device spi0.0
> >     -Creating 3 MTD partitions on "spi0.0":
> >     -0x000000000000-0x000000080000 : "loader"
> >     -0x000000080000-0x000000600000 : "user"
> >     -0x000000600000-0x000004000000 : "flash"
> >     +m25p80 spi0.0: Erase Error occurred
> >     +m25p80 spi0.0: Erase Error occurred
> >     +m25p80 spi0.0: timeout while writing configuration register
> >     +m25p80 spi0.0: quad mode not supported
> >     +m25p80: probe of spi0.0 failed with error -5
> >
> > FLASH chip is SPANSION FL512SAIFG1 311QQ063 A ©11 SPANSION
> > JEDEC id bytes: 01 02 20 4d 00 80
>
> That's curious. Did you revert this patch and probe was ok? Are you sure it is

Yes, a revert fixes the the probe.
I had tried all combinations of the 2 newly set flags, and only
SPI_NOR_HAS_LOCK is a problem.

> not related to the recent changes on spi-rspi.c?

These changes affect QSPI transfers only.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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




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

  Powered by Linux