[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <647d3775-a71d-a880-6d4d-3eb5a89ec9d6@linaro.org>
Date: Tue, 19 Sep 2023 12:24:45 +0300
From: Tudor Ambarus <tudor.ambarus@...aro.org>
To: Michael Walle <mwalle@...nel.org>,
Pratyush Yadav <pratyush@...nel.org>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>
Cc: 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
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?
> + .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,
> + .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