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