diff options
author | Klaus Goger <klaus.goger@theobroma-systems.com> | 2017-02-16 08:36:31 +0100 |
---|---|---|
committer | Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com> | 2017-04-27 15:48:59 +0200 |
commit | 6ea7a8380ce6177b0d3b976a063a917dfa76f137 (patch) | |
tree | e0025399a2d95a35f6649c8cebc92f61c3ae6efb | |
parent | 9a9f4cc3946e52e6a05d150539357da3d3754e14 (diff) |
sunxi: blink LED at bootup
Instead of turning the LED just on, let it blink 3 times as a feedback that
U-Boot has started. This is also useful for boards that have default on
LEDs.
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
-rw-r--r-- | board/sunxi/board.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c index a6373bd50c..3f631d8c60 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -86,7 +86,7 @@ static int setup_led(void) #if defined(CONFIG_LED) struct udevice *dev; char *led_name; - int ret; + int ret, i; led_name = fdtdec_get_config_string(gd->fdt_blob, "u-boot,boot-led"); if (!led_name) { @@ -98,7 +98,11 @@ static int setup_led(void) debug("%s: get=%d\n", __func__, ret); return ret; } - ret = led_set_on(dev, 1); + for(i=0;i<=5;i++) + { + ret = led_set_on(dev, i % 2); + mdelay(30); + } if (ret) return ret; #endif |