blob: de24db18366596af4cc38eaeafeac1c04f5cd8dc [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +01002/*
3 * (C) Copyright 2007-2008
Stelian Pop5ee0c7f2011-11-01 00:00:39 +01004 * Stelian Pop <stelian@popies.net>
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +01005 * Lead Tech Design <www.leadtechdesign.com>
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +01006 */
7
8#include <common.h>
Andreas Bießmann30263a22013-11-29 12:13:46 +01009#include <asm/gpio.h>
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010010#include <asm/arch/gpio.h>
Jeroen Hofstee74a08bc2014-10-08 22:57:53 +020011#include <status_led.h>
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010012
13#ifdef CONFIG_RED_LED
Jason Kridneraff0aa82011-09-04 14:40:16 -040014void red_led_on(void)
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010015{
Andreas Bießmann30263a22013-11-29 12:13:46 +010016 gpio_set_value(CONFIG_RED_LED, 1);
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010017}
18
Jason Kridneraff0aa82011-09-04 14:40:16 -040019void red_led_off(void)
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010020{
Andreas Bießmann30263a22013-11-29 12:13:46 +010021 gpio_set_value(CONFIG_RED_LED, 0);
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010022}
23#endif
24
25#ifdef CONFIG_GREEN_LED
Jason Kridneraff0aa82011-09-04 14:40:16 -040026void green_led_on(void)
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010027{
Andreas Bießmann30263a22013-11-29 12:13:46 +010028 gpio_set_value(CONFIG_GREEN_LED, 0);
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010029}
30
Jason Kridneraff0aa82011-09-04 14:40:16 -040031void green_led_off(void)
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010032{
Andreas Bießmann30263a22013-11-29 12:13:46 +010033 gpio_set_value(CONFIG_GREEN_LED, 1);
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010034}
35#endif
36
37#ifdef CONFIG_YELLOW_LED
Jason Kridneraff0aa82011-09-04 14:40:16 -040038void yellow_led_on(void)
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010039{
Andreas Bießmann30263a22013-11-29 12:13:46 +010040 gpio_set_value(CONFIG_YELLOW_LED, 0);
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010041}
42
Jason Kridneraff0aa82011-09-04 14:40:16 -040043void yellow_led_off(void)
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010044{
Andreas Bießmann30263a22013-11-29 12:13:46 +010045 gpio_set_value(CONFIG_YELLOW_LED, 1);
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010046}
47#endif