diff options
author | Jagan Teki <jagan@amarulasolutions.com> | 2020-07-21 18:06:01 +0300 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2020-07-22 15:55:13 +0300 |
commit | 9aed2880603b794daae7bee5c50a964215481072 (patch) | |
tree | 664fa1aaa5d9a53c3f5a104cfd6569ae8b34b67e /board | |
parent | 500d1e7749b540b739a7daaa3693ad0497608286 (diff) | |
download | u-boot-9aed2880603b794daae7bee5c50a964215481072.tar.xz |
rockchip: roc-rk3399-pc: Add custom led_setup()
roc-rk3399-pc has some specific requirements to support LEDS,
environment. board detection and etc prior to U-Boot proper.
So as of now SPL would be a better stage for these custom board
requirements to support unlike TPL. Adding few of these custom
requirements like LEDS in TPL would require extra code pulling
and also the size of TPL can grow.
So, this patch moves the leds code from TPL into SPL Board init
led_setup code.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
(split tpl.c change as separate patch)
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/firefly/roc-pc-rk3399/roc-pc-rk3399.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c b/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c index 7c3a803654..2b447df8aa 100644 --- a/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c +++ b/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c @@ -6,7 +6,6 @@ #include <common.h> #include <dm.h> #include <log.h> -#include <asm/arch-rockchip/periph.h> #include <power/regulator.h> #include <spl_gpio.h> #include <asm/io.h> @@ -30,19 +29,16 @@ int board_early_init_f(void) out: return 0; } -#endif -#if defined(CONFIG_TPL_BUILD) +#else -#define GPIO0_BASE 0xff720000 +#define GPIO0_BASE 0xff720000 -int board_early_init_f(void) +void led_setup(void) { struct rockchip_gpio_regs * const gpio0 = (void *)GPIO0_BASE; /* Turn on red LED, indicating full power mode */ spl_gpio_output(gpio0, GPIO(BANK_B, 5), 1); - - return 0; } #endif |