diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/corsola/mainboard.c | 2 | ||||
-rw-r--r-- | src/soc/mediatek/common/include/soc/msdc.h | 2 | ||||
-rw-r--r-- | src/soc/mediatek/mt8186/msdc.c | 5 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/mainboard/google/corsola/mainboard.c b/src/mainboard/google/corsola/mainboard.c index b13eb15b58..75b8bb5e4b 100644 --- a/src/mainboard/google/corsola/mainboard.c +++ b/src/mainboard/google/corsola/mainboard.c @@ -6,7 +6,7 @@ static void mainboard_init(struct device *dev) { - mtk_msdc_configure_emmc(); + mtk_msdc_configure_emmc(true); mtk_msdc_configure_sdcard(); setup_usb_host(); } diff --git a/src/soc/mediatek/common/include/soc/msdc.h b/src/soc/mediatek/common/include/soc/msdc.h index f25c3d0276..b7f7fd7b0b 100644 --- a/src/soc/mediatek/common/include/soc/msdc.h +++ b/src/soc/mediatek/common/include/soc/msdc.h @@ -165,7 +165,7 @@ struct msdc_ctrlr { #define msdc_error(format...) printk(BIOS_ERR, "ERROR: " format) int mtk_emmc_early_init(void *base, void *top_base); -void mtk_msdc_configure_emmc(void); +void mtk_msdc_configure_emmc(bool is_early_init); void mtk_msdc_configure_sdcard(void); #endif /* SOC_MEDIATEK_COMMON_MSDC_H */ diff --git a/src/soc/mediatek/mt8186/msdc.c b/src/soc/mediatek/mt8186/msdc.c index f1c2004d09..cfdb0f2cfb 100644 --- a/src/soc/mediatek/mt8186/msdc.c +++ b/src/soc/mediatek/mt8186/msdc.c @@ -33,7 +33,7 @@ enum { MSDC1_GPIO_MODE1_BASE = 0x100053b0, }; -void mtk_msdc_configure_emmc(void) +void mtk_msdc_configure_emmc(bool is_early_init) { void *gpio_base = (void *)IOCFG_LT_BASE; int i; @@ -58,6 +58,9 @@ void mtk_msdc_configure_emmc(void) /* set eMMC cmd/dat/clk pins driving to 8mA */ SET32_BITFIELDS(gpio_base, MSDC0_DRV, MSDC0_DRV_VALUE); + + if (is_early_init) + mtk_emmc_early_init((void *)MSDC0_BASE, (void *)MSDC0_TOP_BASE); } void mtk_msdc_configure_sdcard(void) |