[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <966de7ad5f563f9a29db91c5309a71c6@walle.cc>
Date: Tue, 10 May 2022 16:03:46 +0200
From: Michael Walle <michael@...le.cc>
To: Tudor Ambarus <tudor.ambarus@...rochip.com>,
Pratyush Yadav <p.yadav@...com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Shaik Sajida Bhanu <quic_c_sbhanu@...cinc.com>
Cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] mtd: spi-nor: introduce SNOR_ID3()
[proper subject]
Am 2022-05-10 16:02, schrieb Michael Walle:
> For support which rely solely on the SFDP data, all we need to know is
> its
> JEDEC ID. All further information should be fetched from SFDP. For
> this,
> introduce a SNOR_ID3() macro which should be used for all new flashes
> with
> SFDP.
>
> The dropped information are page size, number of sectors and sector
> size.
> The number of sectors (together with sector size) is only used to
> calculate
> the total flash size. In case of SFDP, this is read from there. The
> sector
> size is also used to select a proper erase opcode. We can just keep
> that
> one zero and the selection algorithm will select the same erase opcode;
> that is the opcode for the largest erase size (which is btw rather
> odd..).
> The page size is also taken from SFDP. There is one exception: older
> SFDP
> tables. These doesn't contain this data. So if there will be flashes
> with
> that, we should assume some sane value.
>
> Shaik, could you please re-test your w25q512nwm support with this
> patch. I
> read through the SFDP data and it should behave exactly the same as
> before.
>
> Michael Walle (2):
> mtd: spi-nor: introduce SNOR_ID3()
> mtd: spi-nor: winbond: use SNOR_ID3() for w25q512nwm
>
> drivers/mtd/spi-nor/core.c | 7 +++++--
> drivers/mtd/spi-nor/core.h | 9 +++++++++
> drivers/mtd/spi-nor/winbond.c | 3 +--
> 3 files changed, 15 insertions(+), 4 deletions(-)
Powered by blists - more mailing lists