The macronix_octal_fixups should be set only when mfr and flags match.
Fixes: df3d5f9e41 ("mtd: spi-nor: add support for Macronix Octal flash")
Acked-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Cc: JaimeLiao <jaimeliao.tw@gmail.com>
#endif
#if CONFIG_IS_ENABLED(SPI_FLASH_MACRONIX)
- nor->fixups = ¯onix_octal_fixups;
+ if (JEDEC_MFR(nor->info) == SNOR_MFR_MACRONIX &&
+ nor->info->flags & SPI_NOR_OCTAL_DTR_READ)
+ nor->fixups = ¯onix_octal_fixups;
#endif /* SPI_FLASH_MACRONIX */
}