summaryrefslogtreecommitdiff
path: root/board/siemens
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-03-30 18:07:18 -0400
committerTom Rini <trini@konsulko.com>2022-04-08 09:05:20 -0400
commite0f0f1836b43e242eb71a6d316d8d507f9075ff9 (patch)
tree4bc3385adb891e871d7693b9c9e57a2894c552f3 /board/siemens
parent8ab7647297f2e96c59489e62deeba3270889039e (diff)
corvus: Migrate CONFIG_*_LED out of CONFIG namespace
This code is only used on the corvus platform, so migrate the LED on/off code to this platform and remove it from the CONFIG namespace. In theory, this should likely be moved to the modern GPIO LED driver as a further cleanup. Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'board/siemens')
-rw-r--r--board/siemens/corvus/board.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/board/siemens/corvus/board.c b/board/siemens/corvus/board.c
index a6e1737be0..90fece7f95 100644
--- a/board/siemens/corvus/board.c
+++ b/board/siemens/corvus/board.c
@@ -52,8 +52,28 @@ static void corvus_request_gpio(void)
gpio_request(AT91_PIN_PD3, "USB1");
gpio_request(AT91_PIN_PB18, "SPICS1");
gpio_request(AT91_PIN_PB3, "SPICS0");
- gpio_request(CONFIG_RED_LED, "red led");
- gpio_request(CONFIG_GREEN_LED, "green led");
+ gpio_request(AT91_PIN_PD31, "red led"); /* this is the user1 led */
+ gpio_request(AT91_PIN_PD0, "green led"); /* this is the user2 led */
+}
+
+void red_led_on(void)
+{
+ gpio_set_value(AT91_PIN_PD31, 1);
+}
+
+void red_led_off(void)
+{
+ gpio_set_value(AT91_PIN_PD31, 0);
+}
+
+void green_led_on(void)
+{
+ gpio_set_value(AT91_PIN_PD0, 0);
+}
+
+void green_led_off(void)
+{
+ gpio_set_value(AT91_PIN_PD0, 1);
}
static void corvus_nand_hw_init(void)