diff mbox series

mtd: spi-nor-ids: Deduplicate w25q16dw entry

Message ID 20240906210951.193142-1-marex@denx.de
State New
Delegated to: Jagannadha Sutradharudu Teki
Headers show
Series mtd: spi-nor-ids: Deduplicate w25q16dw entry | expand

Commit Message

Marek Vasut Sept. 6, 2024, 9:09 p.m. UTC
The w25q16dw entry exists twice in spi_nor_ids, remove the less
complete variant of the entry and keep only one copy of it.

Fixes: baef13ec9d59 ("mtd: spi-nor-ids: Add support for flashes tested by xilinx")
Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Cc: Dhruva Gole <d-gole@ti.com>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Jim Liu <jim.t90615@gmail.com>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Michal Simek <michal.simek@amd.com>
Cc: Neal Frager <neal.frager@amd.com>
Cc: Prasad Kummari <prasad.kummari@amd.com>
Cc: Teik Heng Chong <teik.heng.chong@intel.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Vignesh R <vigneshr@ti.com>
Cc: u-boot@lists.denx.de
---
 drivers/mtd/spi/spi-nor-ids.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Michal Simek Sept. 9, 2024, 6:51 a.m. UTC | #1
On 9/6/24 23:09, Marek Vasut wrote:
> The w25q16dw entry exists twice in spi_nor_ids, remove the less
> complete variant of the entry and keep only one copy of it.
> 
> Fixes: baef13ec9d59 ("mtd: spi-nor-ids: Add support for flashes tested by xilinx")
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
> Cc: Andre Przywara <andre.przywara@arm.com>
> Cc: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
> Cc: Dhruva Gole <d-gole@ti.com>
> Cc: Jagan Teki <jagan@amarulasolutions.com>
> Cc: Jim Liu <jim.t90615@gmail.com>
> Cc: Jonas Karlman <jonas@kwiboo.se>
> Cc: Michal Simek <michal.simek@amd.com>
> Cc: Neal Frager <neal.frager@amd.com>
> Cc: Prasad Kummari <prasad.kummari@amd.com>
> Cc: Teik Heng Chong <teik.heng.chong@intel.com>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Vignesh R <vigneshr@ti.com>
> Cc: u-boot@lists.denx.de
> ---
>   drivers/mtd/spi/spi-nor-ids.c | 8 ++------
>   1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c
> index 88709a52b3a..d1389e681d6 100644
> --- a/drivers/mtd/spi/spi-nor-ids.c
> +++ b/drivers/mtd/spi/spi-nor-ids.c
> @@ -430,11 +430,6 @@ const struct flash_info spi_nor_ids[] = {
>   	{ INFO("w25x05", 0xef3010, 0, 64 * 1024,  1,  SECT_4K) },
>   	{ INFO("w25x40", 0xef3013, 0, 64 * 1024,  8,  SECT_4K) },
>   	{ INFO("w25x16", 0xef3015, 0, 64 * 1024,  32, SECT_4K) },
> -	{
> -		INFO("w25q16dw", 0xef6015, 0, 64 * 1024,  32,
> -			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
> -			SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
> -	},
>   	{ INFO("w25x32", 0xef3016, 0, 64 * 1024,  64, SECT_4K) },
>   	{ INFO("w25q20cl", 0xef4012, 0, 64 * 1024,  4, SECT_4K) },
>   	{ INFO("w25q20bw", 0xef5012, 0, 64 * 1024,  4, SECT_4K) },
> @@ -442,7 +437,8 @@ const struct flash_info spi_nor_ids[] = {
>   	{ INFO("w25q32", 0xef4016, 0, 64 * 1024,  64, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
>   	{
>   		INFO("w25q16dw", 0xef6015, 0, 64 * 1024,  32,
> -			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
> +			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
> +			SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
>   	},
>   	{
>   		INFO("w25q32dw", 0xef6016, 0, 64 * 1024,  64,


Reviewed-by: Michal Simek <michal.simek@amd.com>

Thanks,
Michal
Tudor Ambarus Sept. 9, 2024, 4:44 p.m. UTC | #2
On 07.09.2024 00:09, Marek Vasut wrote:
> The w25q16dw entry exists twice in spi_nor_ids, remove the less
> complete variant of the entry and keep only one copy of it.
> 
> Fixes: baef13ec9d59 ("mtd: spi-nor-ids: Add support for flashes tested by xilinx")
> Signed-off-by: Marek Vasut <marex@denx.de>
> Reviewed-by: Michal Simek <michal.simek@amd.com>
> ---
> Cc: Andre Przywara <andre.przywara@arm.com>
> Cc: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
> Cc: Dhruva Gole <d-gole@ti.com>
> Cc: Jagan Teki <jagan@amarulasolutions.com>
> Cc: Jim Liu <jim.t90615@gmail.com>
> Cc: Jonas Karlman <jonas@kwiboo.se>
> Cc: Michal Simek <michal.simek@amd.com>
> Cc: Neal Frager <neal.frager@amd.com>
> Cc: Prasad Kummari <prasad.kummari@amd.com>
> Cc: Teik Heng Chong <teik.heng.chong@intel.com>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Vignesh R <vigneshr@ti.com>
> Cc: u-boot@lists.denx.de
> ---
>  drivers/mtd/spi/spi-nor-ids.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c
> index 88709a52b3a..d1389e681d6 100644
> --- a/drivers/mtd/spi/spi-nor-ids.c
> +++ b/drivers/mtd/spi/spi-nor-ids.c
> @@ -430,11 +430,6 @@ const struct flash_info spi_nor_ids[] = {
>  	{ INFO("w25x05", 0xef3010, 0, 64 * 1024,  1,  SECT_4K) },
>  	{ INFO("w25x40", 0xef3013, 0, 64 * 1024,  8,  SECT_4K) },
>  	{ INFO("w25x16", 0xef3015, 0, 64 * 1024,  32, SECT_4K) },
> -	{
> -		INFO("w25q16dw", 0xef6015, 0, 64 * 1024,  32,
> -			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
> -			SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
> -	},
>  	{ INFO("w25x32", 0xef3016, 0, 64 * 1024,  64, SECT_4K) },
>  	{ INFO("w25q20cl", 0xef4012, 0, 64 * 1024,  4, SECT_4K) },
>  	{ INFO("w25q20bw", 0xef5012, 0, 64 * 1024,  4, SECT_4K) },
> @@ -442,7 +437,8 @@ const struct flash_info spi_nor_ids[] = {
>  	{ INFO("w25q32", 0xef4016, 0, 64 * 1024,  64, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
>  	{
>  		INFO("w25q16dw", 0xef6015, 0, 64 * 1024,  32,
> -			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
> +			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
> +			SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)

you probably chose to keep the second entry to have some sort of
alphabetical order. I'd keep the first entry as the second entry was
never used anyway, then reorder alphabetically if one cares. Just
nitpicks so fine by me either way:

Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
>  	},
>  	{
>  		INFO("w25q32dw", 0xef6016, 0, 64 * 1024,  64,
diff mbox series

Patch

diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c
index 88709a52b3a..d1389e681d6 100644
--- a/drivers/mtd/spi/spi-nor-ids.c
+++ b/drivers/mtd/spi/spi-nor-ids.c
@@ -430,11 +430,6 @@  const struct flash_info spi_nor_ids[] = {
 	{ INFO("w25x05", 0xef3010, 0, 64 * 1024,  1,  SECT_4K) },
 	{ INFO("w25x40", 0xef3013, 0, 64 * 1024,  8,  SECT_4K) },
 	{ INFO("w25x16", 0xef3015, 0, 64 * 1024,  32, SECT_4K) },
-	{
-		INFO("w25q16dw", 0xef6015, 0, 64 * 1024,  32,
-			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
-			SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
-	},
 	{ INFO("w25x32", 0xef3016, 0, 64 * 1024,  64, SECT_4K) },
 	{ INFO("w25q20cl", 0xef4012, 0, 64 * 1024,  4, SECT_4K) },
 	{ INFO("w25q20bw", 0xef5012, 0, 64 * 1024,  4, SECT_4K) },
@@ -442,7 +437,8 @@  const struct flash_info spi_nor_ids[] = {
 	{ INFO("w25q32", 0xef4016, 0, 64 * 1024,  64, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
 	{
 		INFO("w25q16dw", 0xef6015, 0, 64 * 1024,  32,
-			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
+			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
+			SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
 	},
 	{
 		INFO("w25q32dw", 0xef6016, 0, 64 * 1024,  64,