lkml.org 
[lkml]   [2023]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@kernel.org>
>> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.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

\
 
 \ /
  Last update: 2023-09-01 13:04    [W:0.090 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site