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