[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e7a48b040541f783773d9d0039816633@kernel.org>
Date: Tue, 19 Sep 2023 13:33:30 +0200
From: Michael Walle <mwalle@...nel.org>
To: Tudor Ambarus <tudor.ambarus@...aro.org>
Cc: Pratyush Yadav <pratyush@...nel.org>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org
Subject: Re: [PATCH v3 20/41] mtd: spi-nor: everspin: convert flash_info to
new format
Am 2023-09-19 11:24, schrieb Tudor Ambarus:
> On 08.09.2023 13:16, Michael Walle wrote:
>> The INFOx() macros are going away. Convert the flash_info database to
>> the new format.
>>
>> Signed-off-by: Michael Walle <mwalle@...nel.org>
>> ---
>> drivers/mtd/spi-nor/everspin.c | 33 +++++++++++++++++++++++++++++----
>> 1 file changed, 29 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/mtd/spi-nor/everspin.c
>> b/drivers/mtd/spi-nor/everspin.c
>> index d02c32f2f7ad..46776bc10b27 100644
>> --- a/drivers/mtd/spi-nor/everspin.c
>> +++ b/drivers/mtd/spi-nor/everspin.c
>> @@ -9,10 +9,35 @@
>> #include "core.h"
>>
>> static const struct flash_info everspin_nor_parts[] = {
>> - { "mr25h128", CAT25_INFO(16 * 1024, 1, 256, 2) },
>> - { "mr25h256", CAT25_INFO(32 * 1024, 1, 256, 2) },
>> - { "mr25h10", CAT25_INFO(128 * 1024, 1, 256, 3) },
>> - { "mr25h40", CAT25_INFO(512 * 1024, 1, 256, 3) },
>> + {
>> + .name = "mr25h128",
>> + .size = SZ_16K,
>> + .sector_size = SZ_16K,
>> + .page_size = 256,
>
> page size defaults to 256, isn't it? Can we get rid of the page_size
> assignments?
Yes!
>
>> + .addr_nbytes = 2,
>> + .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
>> + }, {
>> + .name = "mr25h256",
>> + .size = SZ_32K,
>> + .sector_size = SZ_32K,
>> + .page_size = 256,
>> + .addr_nbytes = 2,
>> + .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
>> + }, {
>> + .name = "mr25h10",
>> + .size = SZ_128K,
>> + .sector_size = SZ_128K,
>> + .page_size = 256,
>> + .addr_nbytes = 3,
also "addr_nbytes = 3" is the default.
-michael
>> + .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
>> + }, {
>> + .name = "mr25h40",
>> + .size = SZ_512K,
>> + .sector_size = SZ_512K,
>> + .page_size = 256,
>> + .addr_nbytes = 3,
>> + .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
>> + }
>> };
>>
>> const struct spi_nor_manufacturer spi_nor_everspin = {
>>
Powered by blists - more mailing lists