rockchip: Move the MMC setup check earlier
When the boot ROM sets up MMC we don't need to do it again. Remove the MMC setup code entirely. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -114,7 +114,6 @@ static void configure_l2ctlr(void)
|
|||||||
#ifdef CONFIG_SPL_MMC_SUPPORT
|
#ifdef CONFIG_SPL_MMC_SUPPORT
|
||||||
static int configure_emmc(struct udevice *pinctrl)
|
static int configure_emmc(struct udevice *pinctrl)
|
||||||
{
|
{
|
||||||
#if !defined(CONFIG_TARGET_ROCK2) && !defined(CONFIG_TARGET_FIREFLY_RK3288)
|
|
||||||
struct gpio_desc desc;
|
struct gpio_desc desc;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@@ -144,7 +143,6 @@ static int configure_emmc(struct udevice *pinctrl)
|
|||||||
debug("gpio value ret=%d\n", ret);
|
debug("gpio value ret=%d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -247,15 +245,18 @@ void spl_board_init(void)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_SPL_MMC_SUPPORT
|
#ifdef CONFIG_SPL_MMC_SUPPORT
|
||||||
ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_SDCARD);
|
if (!IS_ENABLED(CONFIG_TARGET_ROCK2) &&
|
||||||
if (ret) {
|
!IS_ENABLED(CONFIG_TARGET_FIREFLY_RK3288)) {
|
||||||
debug("%s: Failed to set up SD card\n", __func__);
|
ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_SDCARD);
|
||||||
goto err;
|
if (ret) {
|
||||||
}
|
debug("%s: Failed to set up SD card\n", __func__);
|
||||||
ret = configure_emmc(pinctrl);
|
goto err;
|
||||||
if (ret) {
|
}
|
||||||
debug("%s: Failed to set up eMMC\n", __func__);
|
ret = configure_emmc(pinctrl);
|
||||||
goto err;
|
if (ret) {
|
||||||
|
debug("%s: Failed to set up eMMC\n", __func__);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user