[PATCH v2 5/8] mtd: spi-nor: spansion: switch h28hx's ready() to use vreg_offset
tkuw584924 at gmail.com
tkuw584924 at gmail.com
Thu Jul 20 00:10:00 PDT 2023
From: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>
s28hx is the sole user of cypress_nor_set_octal_dtr, which already
uses vreg_offset to set octal DTR. Switch the ready method to use
vreg_offset as well. This is a preparation patch. The goal is to use
the same s28hx methods for the multi die version of the flash.
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>
---
drivers/mtd/spi-nor/spansion.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
index 9150840e748a..00d8305e25f4 100644
--- a/drivers/mtd/spi-nor/spansion.c
+++ b/drivers/mtd/spi-nor/spansion.c
@@ -732,9 +732,15 @@ static int s28hx_t_post_bfpt_fixup(struct spi_nor *nor,
static int s28hx_t_late_init(struct spi_nor *nor)
{
- nor->params->set_octal_dtr = cypress_nor_set_octal_dtr;
+ struct spi_nor_flash_parameter *params = nor->params;
+
+ params->set_octal_dtr = cypress_nor_set_octal_dtr;
cypress_nor_ecc_init(nor);
+ /* Replace ready() with multi die version. */
+ if (params->n_dice)
+ params->ready = cypress_nor_sr_ready_and_clear;
+
return 0;
}
--
2.34.1
More information about the linux-mtd
mailing list