blob: 53e353a75d264c25ae457698d5e854e57e39d578 [file] [log] [blame]
Ilko Iliev32949232009-06-12 21:20:39 +02001/*
2 * (C) Copyright 2007-2008
Stelian Popc9e798d2011-11-01 00:00:39 +01003 * Stelian Pop <stelian@popies.net>
Ilko Iliev32949232009-06-12 21:20:39 +02004 * Lead Tech Design <www.leadtechdesign.com>
5 * Ilko Iliev <www.ronetix.at>
6 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Ilko Iliev32949232009-06-12 21:20:39 +02008 */
9
10#include <common.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 Dimovf47316a2011-07-26 04:48:41 +000013#include <asm/arch/gpio.h>
Ilko Iliev32949232009-06-12 21:20:39 +020014
15void coloured_LED_init(void)
16{
Wenyou Yang70341e22016-02-03 10:16:50 +080017 at91_periph_clk_enable(ATMEL_ID_PIOC);
Ilko Iliev32949232009-06-12 21:20:39 +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);
21 gpio_direction_output(CONFIG_YELLOW_LED, 1);
Ilko Iliev32949232009-06-12 21:20:39 +020022
Andreas Bießmannbcf9fe32013-11-29 12:13:46 +010023 gpio_set_value(CONFIG_RED_LED, 0);
24 gpio_set_value(CONFIG_GREEN_LED, 1);
25 gpio_set_value(CONFIG_YELLOW_LED, 1);
Ilko Iliev32949232009-06-12 21:20:39 +020026}