Revert "ARM64: zynqmp: Add serdes address space dp driver"
[oweals/u-boot.git] / arch / arm / mach-rockchip / rk3288-board-spl.c
index 08152aa72bbf049968421beaa4b9846ed87850cd..0f40351769e658c18e2934d6f276797cf7764d2d 100644 (file)
@@ -116,6 +116,8 @@ static void configure_l2ctlr(void)
 #ifdef CONFIG_SPL_MMC_SUPPORT
 static int configure_emmc(struct udevice *pinctrl)
 {
+#if defined(CONFIG_TARGET_CHROMEBOOK_JERRY)
+
        struct gpio_desc desc;
        int ret;
 
@@ -145,7 +147,7 @@ static int configure_emmc(struct udevice *pinctrl)
                debug("gpio value ret=%d\n", ret);
                return ret;
        }
-
+#endif
        return 0;
 }
 #endif
@@ -187,7 +189,7 @@ void board_init_f(ulong dummy)
        rockchip_timer_init();
        configure_l2ctlr();
 
-       ret = uclass_get_device(UCLASS_CLK, 0, &dev);
+       ret = rockchip_get_clk(&dev);
        if (ret) {
                debug("CLK init failed: %d\n", ret);
                return;
@@ -204,7 +206,7 @@ void board_init_f(ulong dummy)
                debug("DRAM init failed: %d\n", ret);
                return;
        }
-#ifdef CONFIG_ROCKCHIP_SPL_BACK_TO_BROM
+#if defined(CONFIG_ROCKCHIP_SPL_BACK_TO_BROM) && !defined(CONFIG_SPL_BOARD_INIT)
        back_to_bootrom();
 #endif
 }
@@ -249,19 +251,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)) {
-               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
 
@@ -273,6 +273,9 @@ void spl_board_init(void)
        }
 
        preloader_console_init();
+#ifdef CONFIG_ROCKCHIP_SPL_BACK_TO_BROM
+       back_to_bootrom();
+#endif
        return;
 err:
        printf("spl_board_init: Error %d\n", ret);
@@ -280,7 +283,3 @@ err:
        /* No way to report error here */
        hang();
 }
-
-void lowlevel_init(void)
-{
-}