From 7a0ca5ba8ffd8b84bcf6738bc07cce3d3889a760 Mon Sep 17 00:00:00 2001 From: Rex-BC Chen Date: Mon, 13 Jun 2022 19:01:51 +0800 Subject: soc/mediatek: Move FLASH_DUAL_READ to common FLASH_DUAL_READ is a common configuration for all MediaTek SoCs, so we move it to common folder and select it in SoCs' Kconfig. As suggested in CB:58837, we also rename FLASH_DUAL_READ to FLASH_DUAL_IO_READ to reduce confusion. TEST=build pass BUG=b:233720142 Signed-off-by: Bo-Chen Chen Change-Id: If267a332519412a7919c5b7817047fabe4a564c8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65620 Reviewed-by: Yidi Lin Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/soc/mediatek/common/Kconfig | 7 +++++++ src/soc/mediatek/common/flash_controller.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src/soc/mediatek/common') diff --git a/src/soc/mediatek/common/Kconfig b/src/soc/mediatek/common/Kconfig index 2adb34458d2a..119746b497f5 100644 --- a/src/soc/mediatek/common/Kconfig +++ b/src/soc/mediatek/common/Kconfig @@ -56,4 +56,11 @@ config USE_CBMEM_DRAM_INFO The DRAM initialization will keep and return DRAM information (size, geometry and other DDR info) so we can fill that into the CBMEM. +config FLASH_DUAL_IO_READ + bool + default n + help + When this option is enabled, the flash controller provides the ability + to dual IO read mode. + endif diff --git a/src/soc/mediatek/common/flash_controller.c b/src/soc/mediatek/common/flash_controller.c index 3fe17f861286..c4c758ef19a5 100644 --- a/src/soc/mediatek/common/flash_controller.c +++ b/src/soc/mediatek/common/flash_controller.c @@ -142,7 +142,7 @@ static int nor_read(const struct spi_flash *flash, u32 addr, size_t len, } } - if (CONFIG(FLASH_DUAL_READ)) { + if (CONFIG(FLASH_DUAL_IO_READ)) { setbits8(&mtk_nor->read_dual, SFLASH_READ_DUAL_EN); write8(&mtk_nor->prgdata[3], SFLASH_1_1_2_READ); } -- cgit v1.2.3