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