public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Revert "rockchip: Move the MMC setup check earlier"
@ 2016-07-19  2:13 Ziyuan Xu
  2016-07-23  2:57 ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Ziyuan Xu @ 2016-07-19  2:13 UTC (permalink / raw)
  To: u-boot

Boot Rom wouldn't initialize sdmmc while booting from eMMC. We need to
setup sdmmc gpio, otherwise we will hit an error below:

=>mmc info
blk_get_device: if_type=6, devnum=0: dwmmc at ff0c0000.blk, 6, 0
uclass_find_device_by_seq: 0 -1
uclass_find_device_by_seq: 0 0
   - -1 -1
   - -1 0
   - found
uclass_find_device_by_seq: 0 1
   - -1 -1
   - -1 0
   - not found
fdtdec_get_int_array: interrupts
get_prop_check_min_len: interrupts
Buswidth = 1, clock: 0
Buswidth = 1, clock: 400000
Sending CMD0
dwmci_send_cmd: Timeout on data busy
dwmci_send_cmd: Timeout on data busy
dwmci_send_cmd: Timeout on data busy
dwmci_send_cmd: Timeout on data busy

This reverts commit 6efeeea79c880d3dd262e0dca9da2687f0ab68c9.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
---

 arch/arm/mach-rockchip/rk3288-board-spl.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-rockchip/rk3288-board-spl.c b/arch/arm/mach-rockchip/rk3288-board-spl.c
index ed14023..1b74173 100644
--- a/arch/arm/mach-rockchip/rk3288-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3288-board-spl.c
@@ -116,6 +116,9 @@ static void configure_l2ctlr(void)
 #ifdef CONFIG_SPL_MMC_SUPPORT
 static int configure_emmc(struct udevice *pinctrl)
 {
+#if !defined(CONFIG_TARGET_ROCK2) && !defined(CONFIG_TARGET_FIREFLY_RK3288) && \
+	!defined(CONFIG_TARGET_EVB_RK3288)
+
 	struct gpio_desc desc;
 	int ret;
 
@@ -145,7 +148,7 @@ static int configure_emmc(struct udevice *pinctrl)
 		debug("gpio value ret=%d\n", ret);
 		return ret;
 	}
-
+#endif
 	return 0;
 }
 #endif
@@ -249,20 +252,17 @@ void spl_board_init(void)
 		debug("%s: Cannot find pinctrl device\n", __func__);
 		goto err;
 	}
+
 #ifdef CONFIG_SPL_MMC_SUPPORT
-	if (!IS_ENABLED(CONFIG_TARGET_ROCK2) &&
-	    !IS_ENABLED(CONFIG_TARGET_FIREFLY_RK3288) &&
-	    !IS_ENABLED(CONFIG_TARGET_EVB_RK3288)) {
-		ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_SDCARD);
-		if (ret) {
-			debug("%s: Failed to set up SD card\n", __func__);
-			goto err;
-		}
-		ret = configure_emmc(pinctrl);
-		if (ret) {
-			debug("%s: Failed to set up eMMC\n", __func__);
-			goto err;
-		}
+	ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_SDCARD);
+	if (ret) {
+		debug("%s: Failed to set up SD card\n", __func__);
+		goto err;
+	}
+	ret = configure_emmc(pinctrl);
+	if (ret) {
+		debug("%s: Failed to set up eMMC\n", __func__);
+		goto err;
 	}
 #endif
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-25  2:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-19  2:13 [U-Boot] [PATCH] Revert "rockchip: Move the MMC setup check earlier" Ziyuan Xu
2016-07-23  2:57 ` Simon Glass
2016-07-23  3:45   ` Ziyuan Xu
2016-07-25  2:07     ` Simon Glass
2016-07-25  2:20       ` Ziyuan Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox