diff options
author | Mathias Kresin <dev@kresin.me> | 2016-05-21 12:13:38 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-05-23 11:03:24 +0200 |
commit | 382282eca922e106f5b01597e4676bab8c7176db (patch) | |
tree | 84e2106d8f4df0788702a064c68f8d59ec7e6a85 /package | |
parent | 9e8edcff990d989215cc0bda7ee99ba9ebec4133 (diff) | |
download | mtk-20170518-382282eca922e106f5b01597e4676bab8c7176db.zip mtk-20170518-382282eca922e106f5b01597e4676bab8c7176db.tar.gz mtk-20170518-382282eca922e106f5b01597e4676bab8c7176db.tar.bz2 |
uboot-lantiq: VGV7510KW22 - use leds to indicate boot status
Switch on the red power led if kernel image can't be loaded. Otherwise
switch the green led on.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'package')
-rw-r--r-- | package/boot/uboot-lantiq/patches/0112-MIPS-add-board-support-for-Arcadyan-VGV7510KW22.patch | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/package/boot/uboot-lantiq/patches/0112-MIPS-add-board-support-for-Arcadyan-VGV7510KW22.patch b/package/boot/uboot-lantiq/patches/0112-MIPS-add-board-support-for-Arcadyan-VGV7510KW22.patch index b532f41..e46d374 100644 --- a/package/boot/uboot-lantiq/patches/0112-MIPS-add-board-support-for-Arcadyan-VGV7510KW22.patch +++ b/package/boot/uboot-lantiq/patches/0112-MIPS-add-board-support-for-Arcadyan-VGV7510KW22.patch @@ -30,7 +30,7 @@ +######################################################################### --- /dev/null +++ b/board/arcadyan/vgv7510kw22/vgv7510kw22.c -@@ -0,0 +1,98 @@ +@@ -0,0 +1,120 @@ +/* + * Copyright (C) 2015 Martin Blumenstingl <martin.blumenstingl@googlemail.com> + * @@ -63,11 +63,15 @@ +#endif + +#define GPIO_POWER_GREEN 14 ++#define GPIO_POWER_RED 28 + +static void gpio_init(void) +{ + /* Turn on the green power LED */ + gpio_direction_output(GPIO_POWER_GREEN, 0); ++ ++ /* Turn off the red power LED */ ++ gpio_direction_output(GPIO_POWER_RED, 1); +} + +int board_early_init_f(void) @@ -92,6 +96,24 @@ + return 0; +} + ++void show_boot_progress(int arg) ++{ ++ if (!do_gpio_init) ++ return 0; ++ ++ if (arg >= 0) { ++ /* Success - turn off the red power LED and turn on the green power LED */ ++ gpio_set_value(GPIO_POWER_RED, 1); ++ gpio_set_value(GPIO_POWER_GREEN, 0); ++ } else { ++ /* Failure - turn off green power LED and turn on red power LED */ ++ gpio_set_value(GPIO_POWER_GREEN, 1); ++ gpio_set_value(GPIO_POWER_RED, 0); ++ } ++ ++ return 0; ++} ++ +static const struct ltq_eth_port_config eth_port_config[] = { + /* unused */ + { 0, 0x0, LTQ_ETH_PORT_NONE, PHY_INTERFACE_MODE_NONE }, |