xref: /openbmc/u-boot/board/atmel/at91sam9263ek/led.c (revision e8f80a5a)
1*83d290c5STom Rini // SPDX-License-Identifier: GPL-2.0+
28e429b3eSStelian Pop /*
38e429b3eSStelian Pop  * (C) Copyright 2007-2008
4c9e798d3SStelian Pop  * Stelian Pop <stelian@popies.net>
58e429b3eSStelian Pop  * Lead Tech Design <www.leadtechdesign.com>
68e429b3eSStelian Pop  */
78e429b3eSStelian Pop 
88e429b3eSStelian Pop #include <common.h>
9cd46b0f2SXu, Hong #include <asm/io.h>
108e429b3eSStelian Pop #include <asm/arch/gpio.h>
11cd46b0f2SXu, Hong #include <asm/arch/at91sam9263.h>
1270341e2eSWenyou Yang #include <asm/arch/clk.h>
138e429b3eSStelian Pop 
coloured_LED_init(void)148e429b3eSStelian Pop void coloured_LED_init(void)
158e429b3eSStelian Pop {
1670341e2eSWenyou Yang 	at91_periph_clk_enable(ATMEL_ID_PIOB);
1770341e2eSWenyou Yang 	at91_periph_clk_enable(ATMEL_ID_PIOB);
188e429b3eSStelian Pop 
19cd46b0f2SXu, Hong 	at91_set_gpio_output(CONFIG_RED_LED, 1);
20cd46b0f2SXu, Hong 	at91_set_gpio_output(CONFIG_GREEN_LED, 1);
21cd46b0f2SXu, Hong 	at91_set_gpio_output(CONFIG_YELLOW_LED, 1);
221b34f00cSJens Scharsig 
23cd46b0f2SXu, Hong 	at91_set_gpio_value(CONFIG_RED_LED, 0);
24cd46b0f2SXu, Hong 	at91_set_gpio_value(CONFIG_GREEN_LED, 1);
25cd46b0f2SXu, Hong 	at91_set_gpio_value(CONFIG_YELLOW_LED, 1);
268e429b3eSStelian Pop }
27