From 4dcdc5c159f595e27cbaae55569d514bb692d739 Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Fri, 19 Jul 2019 18:01:11 +0800 Subject: [PATCH 1/3] rockchip: sdhci: Fix sdhci mmc driver probe abort This patch fix mmc driver abort caused by below patch: 3d296365e4 mmc: sdhci: Add support for sdhci-caps-mask After the patch sdhci_setup_cfg() access to host->mmc->dev, so we have to do init before make the call to the function() Signed-off-by: Kever Yang --- drivers/mmc/rockchip_sdhci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c index cb623d589b4..dd3d5574dbc 100644 --- a/drivers/mmc/rockchip_sdhci.c +++ b/drivers/mmc/rockchip_sdhci.c @@ -68,15 +68,15 @@ static int arasan_sdhci_probe(struct udevice *dev) if (host->bus_width == 8) host->host_caps |= MMC_MODE_8BIT; - ret = sdhci_setup_cfg(&plat->cfg, host, 0, EMMC_MIN_FREQ); - host->mmc = &plat->mmc; - if (ret) - return ret; host->mmc->priv = &prv->host; host->mmc->dev = dev; upriv->mmc = host->mmc; + ret = sdhci_setup_cfg(&plat->cfg, host, 0, EMMC_MIN_FREQ); + if (ret) + return ret; + return sdhci_probe(dev); } From 58fcb03e671fbe847a0007171d4d54dad5af8139 Mon Sep 17 00:00:00 2001 From: Chris Webb Date: Fri, 19 Jul 2019 14:23:11 +0100 Subject: [PATCH 2/3] rockchip: Fix TPL build without CONFIG_TPL_SERIAL_SUPPORT If CONFIG_DEBUG_UART is set but CONFIG_TPL_SERIAL_SUPPORT is not, the serial output should be available in SPL and full U-Boot, but not built in TPL. However, the rockchip tpl.c instead fails to compile with undefined references to the debug UART. Instead, initialise the debug UART and print the TPL banner only if both CONFIG_DEBUG_UART and CONFIG_TPL_SERIAL_SUPPORT are set. Signed-off-by: Reviewed-by: Kever Yang --- arch/arm/mach-rockchip/tpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c index 0ff2a197edb..5df88bddeb2 100644 --- a/arch/arm/mach-rockchip/tpl.c +++ b/arch/arm/mach-rockchip/tpl.c @@ -44,7 +44,7 @@ void board_init_f(ulong dummy) struct udevice *dev; int ret; -#ifdef CONFIG_DEBUG_UART +#if defined(CONFIG_DEBUG_UART) && defined(CONFIG_TPL_SERIAL_SUPPORT) /* * Debug UART can be used from here if required: * From 89e39172301f15b29f663baf704bf2163a0cfa46 Mon Sep 17 00:00:00 2001 From: Chris Webb Date: Fri, 19 Jul 2019 14:23:55 +0100 Subject: [PATCH 3/3] rockchip: TPL banner should depend on CONFIG_TPL_BANNER_PRINT The generic code in common/spl/spl.c allows TPL/SPL banners to be silenced by unsetting CONFIG_TPL_BANNER_PRINT or CONFIG_SPL_BANNER_PRINT respectively. However, arch/arm/mach-rockchip/tpl.c prints this banner unconditionally. Fix the rockchip-specific tpl.c so that the TPL banner depends on CONFIG_TPL_BANNER_PRINT in the same way as the generic code. Signed-off-by: Reviewed-by: Kever Yang --- arch/arm/mach-rockchip/tpl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c index 5df88bddeb2..55f6e922d0a 100644 --- a/arch/arm/mach-rockchip/tpl.c +++ b/arch/arm/mach-rockchip/tpl.c @@ -54,8 +54,10 @@ void board_init_f(ulong dummy) * printascii("string"); */ debug_uart_init(); +#ifdef CONFIG_TPL_BANNER_PRINT printascii("\nU-Boot TPL " PLAIN_VERSION " (" U_BOOT_DATE " - " \ U_BOOT_TIME ")\n"); +#endif #endif ret = spl_early_init(); if (ret) {