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>
This commit is contained in:
parent
9e8edcff99
commit
382282eca9
1 changed files with 23 additions and 1 deletions
|
@ -30,7 +30,7 @@
|
||||||
+#########################################################################
|
+#########################################################################
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/board/arcadyan/vgv7510kw22/vgv7510kw22.c
|
+++ b/board/arcadyan/vgv7510kw22/vgv7510kw22.c
|
||||||
@@ -0,0 +1,98 @@
|
@@ -0,0 +1,120 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (C) 2015 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
+ * Copyright (C) 2015 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||||
+ *
|
+ *
|
||||||
|
@ -63,11 +63,15 @@
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
+#define GPIO_POWER_GREEN 14
|
+#define GPIO_POWER_GREEN 14
|
||||||
|
+#define GPIO_POWER_RED 28
|
||||||
+
|
+
|
||||||
+static void gpio_init(void)
|
+static void gpio_init(void)
|
||||||
+{
|
+{
|
||||||
+ /* Turn on the green power LED */
|
+ /* Turn on the green power LED */
|
||||||
+ gpio_direction_output(GPIO_POWER_GREEN, 0);
|
+ 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)
|
+int board_early_init_f(void)
|
||||||
|
@ -92,6 +96,24 @@
|
||||||
+ return 0;
|
+ 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[] = {
|
+static const struct ltq_eth_port_config eth_port_config[] = {
|
||||||
+ /* unused */
|
+ /* unused */
|
||||||
+ { 0, 0x0, LTQ_ETH_PORT_NONE, PHY_INTERFACE_MODE_NONE },
|
+ { 0, 0x0, LTQ_ETH_PORT_NONE, PHY_INTERFACE_MODE_NONE },
|
||||||
|
|
Loading…
Reference in a new issue