blob: 524b4afcbd2c098a5be80f30022f79a459d68fbd [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Ilko Ilievf0a2c7b2009-04-16 21:30:48 +02002/*
3 * (C) Copyright 2007-2008
Stelian Popc9e798d2011-11-01 00:00:39 +01004 * Stelian Pop <stelian@popies.net>
Ilko Ilievf0a2c7b2009-04-16 21:30:48 +02005 * Lead Tech Design <www.leadtechdesign.com>
6 * Ilko Iliev <www.ronetix.at>
Ilko Ilievf0a2c7b2009-04-16 21:30:48 +02007 */
8
9#include <common.h>
Simon Glassc3e44302019-11-14 12:57:11 -070010#include <status_led.h>
Andreas Bießmannbcf9fe32013-11-29 12:13:46 +010011#include <asm/gpio.h>
Wenyou Yang70341e22016-02-03 10:16:50 +080012#include <asm/arch/clk.h>
Asen Dimov684a5672011-06-08 22:01:16 +000013#include <asm/arch/gpio.h>
Ilko Ilievf0a2c7b2009-04-16 21:30:48 +020014
15void coloured_LED_init(void)
16{
Wenyou Yang70341e22016-02-03 10:16:50 +080017 at91_periph_clk_enable(ATMEL_ID_PIOB);
Ilko Ilievf0a2c7b2009-04-16 21:30:48 +020018
Andreas Bießmannbcf9fe32013-11-29 12:13:46 +010019 gpio_direction_output(CONFIG_RED_LED, 1);
20 gpio_direction_output(CONFIG_GREEN_LED, 1);
Ilko Ilievf0a2c7b2009-04-16 21:30:48 +020021
Andreas Bießmannbcf9fe32013-11-29 12:13:46 +010022 gpio_set_value(CONFIG_RED_LED, 0);
23 gpio_set_value(CONFIG_GREEN_LED, 1);
Ilko Ilievf0a2c7b2009-04-16 21:30:48 +020024}