blob: b8d5c785df4d36557168e3f178738fdc9f717006 [file] [log] [blame]
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +01001/*
2 * (C) Copyright 2007-2008
Stelian Popc9e798d2011-11-01 00:00:39 +01003 * Stelian Pop <stelian@popies.net>
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +01004 * Lead Tech Design <www.leadtechdesign.com>
5 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +01007 */
8
9#include <common.h>
Andreas Bießmannbcf9fe32013-11-29 12:13:46 +010010#include <asm/gpio.h>
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +010011#include <asm/arch/gpio.h>
Jeroen Hofstee52422e32014-10-08 22:57:53 +020012#include <status_led.h>
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +010013
14#ifdef CONFIG_RED_LED
Jason Kridner2d3be7c2011-09-04 14:40:16 -040015void red_led_on(void)
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +010016{
Andreas Bießmannbcf9fe32013-11-29 12:13:46 +010017 gpio_set_value(CONFIG_RED_LED, 1);
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +010018}
19
Jason Kridner2d3be7c2011-09-04 14:40:16 -040020void red_led_off(void)
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +010021{
Andreas Bießmannbcf9fe32013-11-29 12:13:46 +010022 gpio_set_value(CONFIG_RED_LED, 0);
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +010023}
24#endif
25
26#ifdef CONFIG_GREEN_LED
Jason Kridner2d3be7c2011-09-04 14:40:16 -040027void green_led_on(void)
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +010028{
Andreas Bießmannbcf9fe32013-11-29 12:13:46 +010029 gpio_set_value(CONFIG_GREEN_LED, 0);
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +010030}
31
Jason Kridner2d3be7c2011-09-04 14:40:16 -040032void green_led_off(void)
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +010033{
Andreas Bießmannbcf9fe32013-11-29 12:13:46 +010034 gpio_set_value(CONFIG_GREEN_LED, 1);
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +010035}
36#endif
37
38#ifdef CONFIG_YELLOW_LED
Jason Kridner2d3be7c2011-09-04 14:40:16 -040039void yellow_led_on(void)
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +010040{
Andreas Bießmannbcf9fe32013-11-29 12:13:46 +010041 gpio_set_value(CONFIG_YELLOW_LED, 0);
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +010042}
43
Jason Kridner2d3be7c2011-09-04 14:40:16 -040044void yellow_led_off(void)
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +010045{
Andreas Bießmannbcf9fe32013-11-29 12:13:46 +010046 gpio_set_value(CONFIG_YELLOW_LED, 1);
Jean-Christophe PLAGNIOL-VILLARDa484b002009-03-21 21:08:00 +010047}
48#endif