Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 2 | /* |
3 | * (C) Copyright 2007-2008 | ||||
Stelian Pop | 5ee0c7f | 2011-11-01 00:00:39 +0100 | [diff] [blame] | 4 | * Stelian Pop <stelian@popies.net> |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 5 | * Lead Tech Design <www.leadtechdesign.com> |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 6 | */ |
7 | |||||
8 | #include <common.h> | ||||
Andreas Bießmann | 30263a2 | 2013-11-29 12:13:46 +0100 | [diff] [blame] | 9 | #include <asm/gpio.h> |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 10 | #include <asm/arch/gpio.h> |
Jeroen Hofstee | 74a08bc | 2014-10-08 22:57:53 +0200 | [diff] [blame] | 11 | #include <status_led.h> |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 12 | |
13 | #ifdef CONFIG_RED_LED | ||||
Jason Kridner | aff0aa8 | 2011-09-04 14:40:16 -0400 | [diff] [blame] | 14 | void red_led_on(void) |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 15 | { |
Andreas Bießmann | 30263a2 | 2013-11-29 12:13:46 +0100 | [diff] [blame] | 16 | gpio_set_value(CONFIG_RED_LED, 1); |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 17 | } |
18 | |||||
Jason Kridner | aff0aa8 | 2011-09-04 14:40:16 -0400 | [diff] [blame] | 19 | void red_led_off(void) |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 20 | { |
Andreas Bießmann | 30263a2 | 2013-11-29 12:13:46 +0100 | [diff] [blame] | 21 | gpio_set_value(CONFIG_RED_LED, 0); |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 22 | } |
23 | #endif | ||||
24 | |||||
25 | #ifdef CONFIG_GREEN_LED | ||||
Jason Kridner | aff0aa8 | 2011-09-04 14:40:16 -0400 | [diff] [blame] | 26 | void green_led_on(void) |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 27 | { |
Andreas Bießmann | 30263a2 | 2013-11-29 12:13:46 +0100 | [diff] [blame] | 28 | gpio_set_value(CONFIG_GREEN_LED, 0); |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 29 | } |
30 | |||||
Jason Kridner | aff0aa8 | 2011-09-04 14:40:16 -0400 | [diff] [blame] | 31 | void green_led_off(void) |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 32 | { |
Andreas Bießmann | 30263a2 | 2013-11-29 12:13:46 +0100 | [diff] [blame] | 33 | gpio_set_value(CONFIG_GREEN_LED, 1); |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 34 | } |
35 | #endif | ||||
36 | |||||
37 | #ifdef CONFIG_YELLOW_LED | ||||
Jason Kridner | aff0aa8 | 2011-09-04 14:40:16 -0400 | [diff] [blame] | 38 | void yellow_led_on(void) |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 39 | { |
Andreas Bießmann | 30263a2 | 2013-11-29 12:13:46 +0100 | [diff] [blame] | 40 | gpio_set_value(CONFIG_YELLOW_LED, 0); |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 41 | } |
42 | |||||
Jason Kridner | aff0aa8 | 2011-09-04 14:40:16 -0400 | [diff] [blame] | 43 | void yellow_led_off(void) |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 44 | { |
Andreas Bießmann | 30263a2 | 2013-11-29 12:13:46 +0100 | [diff] [blame] | 45 | gpio_set_value(CONFIG_YELLOW_LED, 1); |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 46 | } |
47 | #endif |