[PATCH v1 07/14] mtd: spi-nor: move all micron-st specifics into micron-st.c
Tudor.Ambarus at microchip.com
Tudor.Ambarus at microchip.com
Wed Feb 9 19:18:44 PST 2022
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
>
> The flag status register is only available on micron flashes. Move all
> the functions around that into the micron module.
>
> This is almost a mechanical move except for the spi_nor_fsr_ready()
> which now also checks the normal status register. Previously, this was
> done in spi_nor_ready().
>
> Signed-off-by: Michael Walle <michael at walle.cc>
> ---
> drivers/mtd/spi-nor/core.c | 123 +-----------------------------
> drivers/mtd/spi-nor/micron-st.c | 129 ++++++++++++++++++++++++++++++++
> include/linux/mtd/spi-nor.h | 8 --
> 3 files changed, 130 insertions(+), 130 deletions(-)
>
cut
> diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c
> index bb95b1aabf74..c66580e8aa00 100644
> --- a/drivers/mtd/spi-nor/micron-st.c
> +++ b/drivers/mtd/spi-nor/micron-st.c
> static void micron_st_default_init(struct spi_nor *nor)
> {
> nor->flags |= SNOR_F_HAS_LOCK;
> nor->flags &= ~SNOR_F_HAS_16BIT_SR;
> nor->params->quad_enable = NULL;
> nor->params->set_4byte_addr_mode = st_micron_set_4byte_addr_mode;
> +
> + if (nor->flags & SNOR_F_USE_FSR)
> + nor->params->ready = spi_nor_fsr_ready;
I would like to get rid of the default_init hooks. Can't we use late_init for
setting the ready method?
More information about the linux-mtd
mailing list