blob: 5dd90487eddc6edcdc1802580aff4597bb522569 [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>
Reinhard Meyerb06208c2010-11-07 13:26:14 +010010#include <asm/io.h>
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010011#include <asm/arch/at91_pmc.h>
Jens Scharsiga4db1ca2010-02-03 22:46:58 +010012#include <asm/arch/at91_pio.h>
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010013#include <asm/arch/gpio.h>
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010014
15#ifdef CONFIG_RED_LED
Jason Kridneraff0aa82011-09-04 14:40:16 -040016void red_led_on(void)
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010017{
18 at91_set_gpio_value(CONFIG_RED_LED, 1);
19}
20
Jason Kridneraff0aa82011-09-04 14:40:16 -040021void red_led_off(void)
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010022{
23 at91_set_gpio_value(CONFIG_RED_LED, 0);
24}
25#endif
26
27#ifdef CONFIG_GREEN_LED
Jason Kridneraff0aa82011-09-04 14:40:16 -040028void green_led_on(void)
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010029{
30 at91_set_gpio_value(CONFIG_GREEN_LED, 0);
31}
32
Jason Kridneraff0aa82011-09-04 14:40:16 -040033void green_led_off(void)
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010034{
35 at91_set_gpio_value(CONFIG_GREEN_LED, 1);
36}
37#endif
38
39#ifdef CONFIG_YELLOW_LED
Jason Kridneraff0aa82011-09-04 14:40:16 -040040void yellow_led_on(void)
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010041{
42 at91_set_gpio_value(CONFIG_YELLOW_LED, 0);
43}
44
Jason Kridneraff0aa82011-09-04 14:40:16 -040045void yellow_led_off(void)
Jean-Christophe PLAGNIOL-VILLARD476d10e2009-03-21 21:08:00 +010046{
47 at91_set_gpio_value(CONFIG_YELLOW_LED, 1);
48}
49#endif