[PATCH v1 08/14] mtd: spi-nor: micron-st: convert USE_FSR to a manufacturer flag
Pratyush Yadav
p.yadav at ti.com
Tue Feb 15 11:16:09 PST 2022
On 10/02/22 03:37AM, Tudor.Ambarus at microchip.com wrote:
> On 2/2/22 16:58, Michael Walle wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> >
> > Now that all functions using that flag are local to the micron module,
> > we can convert the flag to a manufacturer one.
> >
> > Signed-off-by: Michael Walle <michael at walle.cc>
> > ---
> > drivers/mtd/spi-nor/core.c | 3 --
> > drivers/mtd/spi-nor/core.h | 3 --
> > drivers/mtd/spi-nor/micron-st.c | 92 +++++++++++++++++++++------------
> > 3 files changed, 59 insertions(+), 39 deletions(-)
> >
> > diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> > index e9d9880149d2..be65aaa954ca 100644
> > --- a/drivers/mtd/spi-nor/core.c
> > +++ b/drivers/mtd/spi-nor/core.c
> > @@ -2499,9 +2499,6 @@ static void spi_nor_init_flags(struct spi_nor *nor)
> >
> > if (flags & USE_CLSR)
> > nor->flags |= SNOR_F_USE_CLSR;
> > -
> > - if (flags & USE_FSR)
> > - nor->flags |= SNOR_F_USE_FSR;
> > }
> >
> > /**
> > diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
> > index fabc01ae9a81..a02bf54289fb 100644
> > --- a/drivers/mtd/spi-nor/core.h
> > +++ b/drivers/mtd/spi-nor/core.h
> > @@ -12,7 +12,6 @@
> > #define SPI_NOR_MAX_ID_LEN 6
> >
> > enum spi_nor_option_flags {
> > - SNOR_F_USE_FSR = BIT(0),
> > SNOR_F_HAS_SR_TB = BIT(1),
> > SNOR_F_NO_OP_CHIP_ERASE = BIT(2),
> > SNOR_F_USE_CLSR = BIT(4),
> > @@ -349,7 +348,6 @@ struct spi_nor_fixups {
> > * NO_CHIP_ERASE: chip does not support chip erase.
> > * SPI_NOR_NO_FR: can't do fastread.
> > * USE_CLSR: use CLSR command.
> > - * USE_FSR: use flag status register
> > *
> > * @no_sfdp_flags: flags that indicate support that can be discovered via SFDP.
> > * Used when SFDP tables are not defined in the flash. These
> > @@ -401,7 +399,6 @@ struct flash_info {
> > #define NO_CHIP_ERASE BIT(7)
> > #define SPI_NOR_NO_FR BIT(8)
> > #define USE_CLSR BIT(9)
> > -#define USE_FSR BIT(10)
> >
> > u8 no_sfdp_flags;
> > #define SPI_NOR_SKIP_SFDP BIT(0)
> > diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c
> > index c66580e8aa00..33531c101ccb 100644
> > --- a/drivers/mtd/spi-nor/micron-st.c
> > +++ b/drivers/mtd/spi-nor/micron-st.c
> > @@ -8,6 +8,8 @@
> >
> > #include "core.h"
> >
> > +#define USE_FSR BIT(0)
>
> please add a description and inform the reader that this is a manufacturer specific
> flash_info flag.
+1
> Reviewed-by: Tudor Ambarus <tudor.ambarus at microchip.com>
Reviewed-by: Pratyush Yadav <p.yadav at ti.com>
--
Regards,
Pratyush Yadav
Texas Instruments Inc.
More information about the linux-mtd
mailing list