]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3288: move setup_led() to firefly-rk3288
authorKever Yang <kever.yang@rock-chips.com>
Mon, 22 Jul 2019 11:59:24 +0000 (19:59 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Mon, 29 Jul 2019 02:25:27 +0000 (10:25 +0800)
Only firefly-rk3288 has the dts node "u-boot,boot-led",
while CONFIG_SPL_LED is not enable, move code to firefly-rk3288
now in case someone need this code.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/mach-rockchip/Kconfig
arch/arm/mach-rockchip/rk3288-board-spl.c
arch/arm/mach-rockchip/rk3288/Kconfig
board/firefly/firefly-rk3288/firefly-rk3288.c

index 19043220919dd24264afc5d6b069ce551ab73121..ef9d6e1facd9b6eafd9533844359036e50ee7270 100644 (file)
@@ -73,7 +73,6 @@ config ROCKCHIP_RK322X
 config ROCKCHIP_RK3288
        bool "Support Rockchip RK3288"
        select CPU_V7A
-       select SPL_BOARD_INIT if SPL
        select SUPPORT_SPL
        select SPL
        select SUPPORT_TPL
index 6fbb22075c39fdecce6416795a7ec3f3ee3700a9..6db5369a109f7120dc4986ac4a9dd2402b15a4a3 100644 (file)
@@ -196,42 +196,6 @@ void board_init_f(ulong dummy)
 #endif
 }
 
-static int setup_led(void)
-{
-#ifdef CONFIG_SPL_LED
-       struct udevice *dev;
-       char *led_name;
-       int ret;
-
-       led_name = fdtdec_get_config_string(gd->fdt_blob, "u-boot,boot-led");
-       if (!led_name)
-               return 0;
-       ret = led_get_by_label(led_name, &dev);
-       if (ret) {
-               debug("%s: get=%d\n", __func__, ret);
-               return ret;
-       }
-       ret = led_set_on(dev, 1);
-       if (ret)
-               return ret;
-#endif
-
-       return 0;
-}
-
-void spl_board_init(void)
-{
-       int ret;
-
-       ret = setup_led();
-       if (ret) {
-               debug("LED ret=%d\n", ret);
-               hang();
-       }
-
-       return;
-}
-
 #ifdef CONFIG_SPL_OS_BOOT
 
 #define PMU_BASE               0xff730000
index de8d9c24f18e837c343c6210b96e150c232cbb86..6e3ab1d06b9c2cd4b80a0a35260d38cd9d465e6f 100644 (file)
@@ -66,6 +66,7 @@ config TARGET_FENNEC_RK3288
 config TARGET_FIREFLY_RK3288
        bool "Firefly-RK3288"
        select BOARD_LATE_INIT
+       select SPL_BOARD_INIT if SPL
        help
          Firefly is a RK3288-based development board with 2 USB ports,
          HDMI, VGA, micro-SD card, audio, WiFi  and Gigabit Ethernet, It
index bdc02a6a7929721112e771cdd02d75b3cc264089..a3f784f0a3a0ef1232aa9cb041db3010a6190270 100644 (file)
@@ -4,3 +4,39 @@
  */
 
 #include <common.h>
+
+#ifdef CONFIG_SPL_BUILD
+static int setup_led(void)
+{
+#ifdef CONFIG_SPL_LED
+       struct udevice *dev;
+       char *led_name;
+       int ret;
+
+       led_name = fdtdec_get_config_string(gd->fdt_blob, "u-boot,boot-led");
+       if (!led_name)
+               return 0;
+       ret = led_get_by_label(led_name, &dev);
+       if (ret) {
+               debug("%s: get=%d\n", __func__, ret);
+               return ret;
+       }
+       ret = led_set_on(dev, 1);
+       if (ret)
+               return ret;
+#endif
+
+       return 0;
+}
+
+void spl_board_init(void)
+{
+       int ret;
+
+       ret = setup_led();
+       if (ret) {
+               debug("LED ret=%d\n", ret);
+               hang();
+       }
+}
+#endif