Skip to content

Commit 9437a14

Browse files
BoughChenprati0100
authored andcommitted
mtd: spi-nor: micron-st: move set_octal_dtr to late_init()
Move params->set_octal_dtr from flash_info->fixups->default_init() to spi_nor_manufacturer-> fixups-> late_init(), this can cover all Micorn and ST chips without repeat in each chip's flash_info. Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org> Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
1 parent 74883ac commit 9437a14

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

drivers/mtd/spi-nor/micron-st.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,6 @@ static int micron_st_nor_two_die_late_init(struct spi_nor *nor)
159159
return spi_nor_set_4byte_addr_mode(nor, true);
160160
}
161161

162-
static void mt35xu512aba_default_init(struct spi_nor *nor)
163-
{
164-
nor->params->set_octal_dtr = micron_st_nor_set_octal_dtr;
165-
}
166-
167162
static int mt35xu512aba_post_sfdp_fixup(struct spi_nor *nor)
168163
{
169164
/* Set the Fast Read settings. */
@@ -187,7 +182,6 @@ static int mt35xu512aba_post_sfdp_fixup(struct spi_nor *nor)
187182
}
188183

189184
static const struct spi_nor_fixups mt35xu512aba_fixups = {
190-
.default_init = mt35xu512aba_default_init,
191185
.post_sfdp = mt35xu512aba_post_sfdp_fixup,
192186
};
193187

@@ -635,6 +629,8 @@ static int micron_st_nor_late_init(struct spi_nor *nor)
635629
if (!params->set_4byte_addr_mode)
636630
params->set_4byte_addr_mode = spi_nor_set_4byte_addr_mode_wren_en4b_ex4b;
637631

632+
params->set_octal_dtr = micron_st_nor_set_octal_dtr;
633+
638634
return 0;
639635
}
640636

0 commit comments

Comments
 (0)