Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48972 )
Change subject: soc/mediatek/mt8192: Move flash_controller.c to common/ ......................................................................
Patch Set 2:
(4 comments)
https://review.coreboot.org/c/coreboot/+/48972/2/src/soc/mediatek/common/fla... File src/soc/mediatek/common/flash_controller.c:
https://review.coreboot.org/c/coreboot/+/48972/2/src/soc/mediatek/common/fla... PS2, Line 139: #if CONFIG(SOC_MEDIATEK_MT8173) can we rewrite as
if (CONFIG(SOC_MEDIATEK_MT817)) { if (!ENV_BOOTBLOCK && !ENV_SEPARATE_VERSTAGE) { ... } }
https://review.coreboot.org/c/coreboot/+/48972/2/src/soc/mediatek/common/fla... PS2, Line 141: dma_buf = (uintptr_t)_dma_coherent; : dma_buf_len = REGION_SIZE(dma_coherent); that's already the default value
https://review.coreboot.org/c/coreboot/+/48972/2/src/soc/mediatek/common/fla... PS2, Line 149: #if CONFIG(FLASH_DUAL_READ_SUPPORTED) : setbits8(&mtk_nor->read_dual, SFLASH_READ_DUAL_EN); : write8(&mtk_nor->prgdata[3], SFLASH_1_1_2_READ); : #endif can we replace this by
if (CONFIG(FLASH_DUAL_READ_SUPPORTED)) { setbits8... write8... }
https://review.coreboot.org/c/coreboot/+/48972/2/src/soc/mediatek/mt8192/Kco... File src/soc/mediatek/mt8192/Kconfig:
https://review.coreboot.org/c/coreboot/+/48972/2/src/soc/mediatek/mt8192/Kco... PS2, Line 78: _SUPPORTED We usually don't add 'SUPPORTED' in config. Just call it FLASH_DUAL_READ ?