[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <68f8c1224b5f5298ed423503f3580186@kernel.org>
Date: Fri, 01 Sep 2023 13:03:51 +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 v2 06/41] mtd: spi-nor: default page_size to 256 bytes
Am 2023-08-24 10:36, schrieb Tudor Ambarus:
> On 8/22/23 08:09, Michael Walle wrote:
>> The INFO() macro always set the page_size to 256 bytes. Make that an
>> optional parameter. This default is a sane one for all older flashes,
>> newer ones will set the page size by its SFDP tables anyway.
>>
>> Signed-off-by: Michael Walle <mwalle@...nel.org>
>> Reviewed-by: Miquel Raynal <miquel.raynal@...tlin.com>
>> ---
>> drivers/mtd/spi-nor/core.c | 7 +------
>> drivers/mtd/spi-nor/core.h | 8 ++++++--
>> 2 files changed, 7 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
>> index f4cc2eafcc5e..d27ad1295ee0 100644
>> --- a/drivers/mtd/spi-nor/core.c
>> +++ b/drivers/mtd/spi-nor/core.c
>> @@ -2018,11 +2018,6 @@ static const struct spi_nor_manufacturer
>> *manufacturers[] = {
>> static const struct flash_info spi_nor_generic_flash = {
>> .name = "spi-nor-generic",
>> .n_banks = 1,
>> - /*
>> - * JESD216 rev A doesn't specify the page size, therefore we need a
>> - * sane default.
>> - */
>> - .page_size = 256,
>> .parse_sfdp = true,
>> };
>>
>> @@ -3001,7 +2996,7 @@ static void spi_nor_init_default_params(struct
>> spi_nor *nor)
>> params->writesize = 1;
>> params->size = info->size;
>> params->bank_size = params->size;
>> - params->page_size = info->page_size;
>> + params->page_size = info->page_size ?: SPI_NOR_DEFAULT_PAGE_SIZE;
>
> how about to get rid of info->page_size entirely and directly use the
> default?
We'd first have to get rid of the Xilinx S3AN and the everspin stuff.
They are still using a different page size. That being said, that's
on my todo list.
-michael
Powered by blists - more mailing lists