blob: 8025a20a6a92a99c01843da492c08df6f401bdc7 [file] [log] [blame]
Ilko Iliev8b954a92009-04-16 21:30:48 +02001/*
2 * (C) Copyright 2007-2008
Stelian Pop5ee0c7f2011-11-01 00:00:39 +01003 * Stelian Pop <stelian@popies.net>
Ilko Iliev8b954a92009-04-16 21:30:48 +02004 * Lead Tech Design <www.leadtechdesign.com>
5 * Ilko Iliev <www.ronetix.at>
6 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Ilko Iliev8b954a92009-04-16 21:30:48 +02008 */
9
10#include <common.h>
Andreas Bießmann30263a22013-11-29 12:13:46 +010011#include <asm/gpio.h>
Wenyou Yang78f89762016-02-03 10:16:50 +080012#include <asm/arch/clk.h>
Asen Dimove1002e22011-06-08 22:01:16 +000013#include <asm/arch/gpio.h>
Ilko Iliev8b954a92009-04-16 21:30:48 +020014
15void coloured_LED_init(void)
16{
Wenyou Yang78f89762016-02-03 10:16:50 +080017 at91_periph_clk_enable(ATMEL_ID_PIOB);
Ilko Iliev8b954a92009-04-16 21:30:48 +020018
Andreas Bießmann30263a22013-11-29 12:13:46 +010019 gpio_direction_output(CONFIG_RED_LED, 1);
20 gpio_direction_output(CONFIG_GREEN_LED, 1);
Ilko Iliev8b954a92009-04-16 21:30:48 +020021
Andreas Bießmann30263a22013-11-29 12:13:46 +010022 gpio_set_value(CONFIG_RED_LED, 0);
23 gpio_set_value(CONFIG_GREEN_LED, 1);
Ilko Iliev8b954a92009-04-16 21:30:48 +020024}