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> |
Reinhard Meyer | b06208c | 2010-11-07 13:26:14 +0100 | [diff] [blame] | 10 | #include <asm/io.h> |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 11 | #include <asm/arch/at91_pmc.h> |
Jens Scharsig | a4db1ca | 2010-02-03 22:46:58 +0100 | [diff] [blame] | 12 | #include <asm/arch/at91_pio.h> |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 13 | #include <asm/arch/gpio.h> |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 14 | |
| 15 | #ifdef CONFIG_RED_LED |
Jason Kridner | aff0aa8 | 2011-09-04 14:40:16 -0400 | [diff] [blame] | 16 | void red_led_on(void) |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 17 | { |
| 18 | at91_set_gpio_value(CONFIG_RED_LED, 1); |
| 19 | } |
| 20 | |
Jason Kridner | aff0aa8 | 2011-09-04 14:40:16 -0400 | [diff] [blame] | 21 | void red_led_off(void) |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 22 | { |
| 23 | at91_set_gpio_value(CONFIG_RED_LED, 0); |
| 24 | } |
| 25 | #endif |
| 26 | |
| 27 | #ifdef CONFIG_GREEN_LED |
Jason Kridner | aff0aa8 | 2011-09-04 14:40:16 -0400 | [diff] [blame] | 28 | void green_led_on(void) |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 29 | { |
| 30 | at91_set_gpio_value(CONFIG_GREEN_LED, 0); |
| 31 | } |
| 32 | |
Jason Kridner | aff0aa8 | 2011-09-04 14:40:16 -0400 | [diff] [blame] | 33 | void green_led_off(void) |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 34 | { |
| 35 | at91_set_gpio_value(CONFIG_GREEN_LED, 1); |
| 36 | } |
| 37 | #endif |
| 38 | |
| 39 | #ifdef CONFIG_YELLOW_LED |
Jason Kridner | aff0aa8 | 2011-09-04 14:40:16 -0400 | [diff] [blame] | 40 | void yellow_led_on(void) |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 41 | { |
| 42 | at91_set_gpio_value(CONFIG_YELLOW_LED, 0); |
| 43 | } |
| 44 | |
Jason Kridner | aff0aa8 | 2011-09-04 14:40:16 -0400 | [diff] [blame] | 45 | void yellow_led_off(void) |
Jean-Christophe PLAGNIOL-VILLARD | 476d10e | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 46 | { |
| 47 | at91_set_gpio_value(CONFIG_YELLOW_LED, 1); |
| 48 | } |
| 49 | #endif |