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 <rex-bc.chen@mediatek.com>
Change-Id: If267a332519412a7919c5b7817047fabe4a564c8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65620
Reviewed-by: Yidi Lin <yidilin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
Rex-BC Chen 2022-06-13 19:01:51 +08:00 committed by Felix Held
parent ccaafdfa5a
commit 7a0ca5ba8f
5 changed files with 11 additions and 22 deletions

View File

@ -56,4 +56,11 @@ config USE_CBMEM_DRAM_INFO
The DRAM initialization will keep and return DRAM information (size, The DRAM initialization will keep and return DRAM information (size,
geometry and other DDR info) so we can fill that into the CBMEM. 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 endif

View File

@ -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); setbits8(&mtk_nor->read_dual, SFLASH_READ_DUAL_EN);
write8(&mtk_nor->prgdata[3], SFLASH_1_1_2_READ); write8(&mtk_nor->prgdata[3], SFLASH_1_1_2_READ);
} }

View File

@ -11,6 +11,7 @@ config SOC_MEDIATEK_MT8186
select SOC_MEDIATEK_COMMON select SOC_MEDIATEK_COMMON
select MEDIATEK_BLOB_FAST_INIT select MEDIATEK_BLOB_FAST_INIT
select USE_CBMEM_DRAM_INFO select USE_CBMEM_DRAM_INFO
select FLASH_DUAL_IO_READ
if SOC_MEDIATEK_MT8186 if SOC_MEDIATEK_MT8186
@ -32,11 +33,4 @@ config SSPM_FIRMWARE
help help
The file name of the MediaTek SSPM firmware. The file name of the MediaTek SSPM firmware.
config FLASH_DUAL_READ
bool
default y
help
When this option is enabled, the flash controller provides the ability
to dual IO read mode.
endif endif

View File

@ -11,6 +11,7 @@ config SOC_MEDIATEK_MT8192
select HAVE_UART_SPECIAL select HAVE_UART_SPECIAL
select SOC_MEDIATEK_COMMON select SOC_MEDIATEK_COMMON
select MEDIATEK_DRAM_DVFS select MEDIATEK_DRAM_DVFS
select FLASH_DUAL_IO_READ
if SOC_MEDIATEK_MT8192 if SOC_MEDIATEK_MT8192
@ -50,13 +51,6 @@ config SSPM_FIRMWARE
help help
The file name of the MediaTek SSPM firmware. The file name of the MediaTek SSPM firmware.
config FLASH_DUAL_READ
bool
default y
help
When this option is enabled, the flash controller provides the ability
to dual IO read mode.
config SRCLKEN_RC_SUPPORT config SRCLKEN_RC_SUPPORT
bool bool
default y default y

View File

@ -11,6 +11,7 @@ config SOC_MEDIATEK_MT8195
select SOC_MEDIATEK_COMMON select SOC_MEDIATEK_COMMON
select DPM_FOUR_CHANNEL select DPM_FOUR_CHANNEL
select PCI select PCI
select FLASH_DUAL_IO_READ
if SOC_MEDIATEK_MT8195 if SOC_MEDIATEK_MT8195
@ -50,11 +51,4 @@ config SSPM_FIRMWARE
help help
The file name of the MediaTek SSPM firmware. The file name of the MediaTek SSPM firmware.
config FLASH_DUAL_READ
bool
default y
help
When this option is enabled, the flash controller provides the ability
to dual IO read mode.
endif endif