board: at91: sama5d2: set blue led on at boot time
Set blue led on at boot time in order to highlight that u-boot is loaded.
This is done for all sama5d2 based boards which contain an RGB led.
Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
index 8b5cd53..4bbb05c 100644
--- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c
+++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
@@ -21,6 +21,13 @@
DECLARE_GLOBAL_DATA_PTR;
+static void rgb_leds_init(void)
+{
+ atmel_pio4_set_pio_output(AT91_PIO_PORTB, 6, 1); /* LED RED */
+ atmel_pio4_set_pio_output(AT91_PIO_PORTB, 5, 1); /* LED GREEN */
+ atmel_pio4_set_pio_output(AT91_PIO_PORTB, 0, 0); /* LED BLUE */
+}
+
#ifdef CONFIG_CMD_USB
static void board_usb_hw_init(void)
{
@@ -70,6 +77,8 @@
/* address of boot parameters */
gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
+ rgb_leds_init();
+
#ifdef CONFIG_CMD_USB
board_usb_hw_init();
#endif