Message ID | 20230807-mtd-flash-info-db-rework-v2-1-291a0f39f8d8@kernel.org |
---|---|
State | Changes Requested |
Delegated to: | Ambarus Tudor |
Headers | show |
Series | mtd: spi-nor: clean the flash_info database up | expand |
On 8/22/23 08:09, Michael Walle wrote: > CAT25xx are actually EEPROMs manufactured by Catalyst. The devices are > ancient (DS are from 1998), there are not in-tree users, nor are there > any device tree bindings. Remove it. The correct driver is the at25. > > Signed-off-by: Michael Walle <mwalle@kernel.org> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org> > --- > drivers/mtd/spi-nor/Makefile | 1 - > drivers/mtd/spi-nor/catalyst.c | 24 ------------------------ > drivers/mtd/spi-nor/core.c | 1 - > drivers/mtd/spi-nor/core.h | 1 - > 4 files changed, 27 deletions(-) > > diff --git a/drivers/mtd/spi-nor/Makefile b/drivers/mtd/spi-nor/Makefile > index e347b435a038..496dae9ca0f3 100644 > --- a/drivers/mtd/spi-nor/Makefile > +++ b/drivers/mtd/spi-nor/Makefile > @@ -2,7 +2,6 @@ > > spi-nor-objs := core.o sfdp.o swp.o otp.o sysfs.o > spi-nor-objs += atmel.o > -spi-nor-objs += catalyst.o > spi-nor-objs += eon.o > spi-nor-objs += esmt.o > spi-nor-objs += everspin.o > diff --git a/drivers/mtd/spi-nor/catalyst.c b/drivers/mtd/spi-nor/catalyst.c > deleted file mode 100644 > index 6d310815fb12..000000000000 > --- a/drivers/mtd/spi-nor/catalyst.c > +++ /dev/null > @@ -1,24 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0 > -/* > - * Copyright (C) 2005, Intec Automation Inc. > - * Copyright (C) 2014, Freescale Semiconductor, Inc. > - */ > - > -#include <linux/mtd/spi-nor.h> > - > -#include "core.h" > - > -static const struct flash_info catalyst_nor_parts[] = { > - /* Catalyst / On Semiconductor -- non-JEDEC */ > - { "cat25c11", CAT25_INFO(16, 8, 16, 1) }, > - { "cat25c03", CAT25_INFO(32, 8, 16, 2) }, > - { "cat25c09", CAT25_INFO(128, 8, 32, 2) }, > - { "cat25c17", CAT25_INFO(256, 8, 32, 2) }, > - { "cat25128", CAT25_INFO(2048, 8, 64, 2) }, > -}; > - > -const struct spi_nor_manufacturer spi_nor_catalyst = { > - .name = "catalyst", > - .parts = catalyst_nor_parts, > - .nparts = ARRAY_SIZE(catalyst_nor_parts), > -}; > diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c > index 1b0c6770c14e..c44de69c4353 100644 > --- a/drivers/mtd/spi-nor/core.c > +++ b/drivers/mtd/spi-nor/core.c > @@ -1999,7 +1999,6 @@ int spi_nor_sr2_bit7_quad_enable(struct spi_nor *nor) > > static const struct spi_nor_manufacturer *manufacturers[] = { > &spi_nor_atmel, > - &spi_nor_catalyst, > &spi_nor_eon, > &spi_nor_esmt, > &spi_nor_everspin, > diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h > index 9217379b9cfe..6d31af6c39ed 100644 > --- a/drivers/mtd/spi-nor/core.h > +++ b/drivers/mtd/spi-nor/core.h > @@ -631,7 +631,6 @@ struct sfdp { > > /* Manufacturer drivers. */ > extern const struct spi_nor_manufacturer spi_nor_atmel; > -extern const struct spi_nor_manufacturer spi_nor_catalyst; > extern const struct spi_nor_manufacturer spi_nor_eon; > extern const struct spi_nor_manufacturer spi_nor_esmt; > extern const struct spi_nor_manufacturer spi_nor_everspin; >
you could also move CAT25_INFO into everspin.c
diff --git a/drivers/mtd/spi-nor/Makefile b/drivers/mtd/spi-nor/Makefile index e347b435a038..496dae9ca0f3 100644 --- a/drivers/mtd/spi-nor/Makefile +++ b/drivers/mtd/spi-nor/Makefile @@ -2,7 +2,6 @@ spi-nor-objs := core.o sfdp.o swp.o otp.o sysfs.o spi-nor-objs += atmel.o -spi-nor-objs += catalyst.o spi-nor-objs += eon.o spi-nor-objs += esmt.o spi-nor-objs += everspin.o diff --git a/drivers/mtd/spi-nor/catalyst.c b/drivers/mtd/spi-nor/catalyst.c deleted file mode 100644 index 6d310815fb12..000000000000 --- a/drivers/mtd/spi-nor/catalyst.c +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (C) 2005, Intec Automation Inc. - * Copyright (C) 2014, Freescale Semiconductor, Inc. - */ - -#include <linux/mtd/spi-nor.h> - -#include "core.h" - -static const struct flash_info catalyst_nor_parts[] = { - /* Catalyst / On Semiconductor -- non-JEDEC */ - { "cat25c11", CAT25_INFO(16, 8, 16, 1) }, - { "cat25c03", CAT25_INFO(32, 8, 16, 2) }, - { "cat25c09", CAT25_INFO(128, 8, 32, 2) }, - { "cat25c17", CAT25_INFO(256, 8, 32, 2) }, - { "cat25128", CAT25_INFO(2048, 8, 64, 2) }, -}; - -const struct spi_nor_manufacturer spi_nor_catalyst = { - .name = "catalyst", - .parts = catalyst_nor_parts, - .nparts = ARRAY_SIZE(catalyst_nor_parts), -}; diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 1b0c6770c14e..c44de69c4353 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -1999,7 +1999,6 @@ int spi_nor_sr2_bit7_quad_enable(struct spi_nor *nor) static const struct spi_nor_manufacturer *manufacturers[] = { &spi_nor_atmel, - &spi_nor_catalyst, &spi_nor_eon, &spi_nor_esmt, &spi_nor_everspin, diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index 9217379b9cfe..6d31af6c39ed 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -631,7 +631,6 @@ struct sfdp { /* Manufacturer drivers. */ extern const struct spi_nor_manufacturer spi_nor_atmel; -extern const struct spi_nor_manufacturer spi_nor_catalyst; extern const struct spi_nor_manufacturer spi_nor_eon; extern const struct spi_nor_manufacturer spi_nor_esmt; extern const struct spi_nor_manufacturer spi_nor_everspin;
CAT25xx are actually EEPROMs manufactured by Catalyst. The devices are ancient (DS are from 1998), there are not in-tree users, nor are there any device tree bindings. Remove it. The correct driver is the at25. Signed-off-by: Michael Walle <mwalle@kernel.org> --- drivers/mtd/spi-nor/Makefile | 1 - drivers/mtd/spi-nor/catalyst.c | 24 ------------------------ drivers/mtd/spi-nor/core.c | 1 - drivers/mtd/spi-nor/core.h | 1 - 4 files changed, 27 deletions(-)