]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3188: Fix the code support for SPL_LED
authorKever Yang <kever.yang@rock-chips.com>
Thu, 20 Aug 2020 09:31:16 +0000 (17:31 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 21 Aug 2020 11:56:19 +0000 (19:56 +0800)
Fix the build error for the wrong code when CONFIG_SPL_LED is enabled.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/mach-rockchip/rk3188/rk3188.c

index 1b2f4a4757191e5ad996385b67c8436e3beed219..222953ab94add37b0d091d3a1bdb0fce15296478 100644 (file)
@@ -6,6 +6,7 @@
 #include <dm.h>
 #include <hang.h>
 #include <init.h>
+#include <led.h>
 #include <log.h>
 #include <syscon.h>
 #include <asm/io.h>
@@ -105,6 +106,7 @@ int rk_board_late_init(void)
 }
 
 #ifdef CONFIG_SPL_BUILD
+DECLARE_GLOBAL_DATA_PTR;
 static int setup_led(void)
 {
 #ifdef CONFIG_SPL_LED
@@ -120,7 +122,7 @@ static int setup_led(void)
                debug("%s: get=%d\n", __func__, ret);
                return ret;
        }
-       ret = led_set_on(dev, 1);
+       ret = led_set_state(dev, LEDST_ON);
        if (ret)
                return ret;
 #endif