board: atmel: sama5d27_wlsom1_ek: start green led in SPL
authorEugen Hristev <eugen.hristev@microchip.com>
Mon, 26 Aug 2019 06:47:09 +0000 (06:47 +0000)
committerEugen Hristev <eugen.hristev@microchip.com>
Tue, 8 Oct 2019 06:16:11 +0000 (09:16 +0300)
When SPL boots, enable green led on the board.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c

index 19300483b5c57cdd3368f0650b327959c04e24b6..fda06c824d53593c8a03460aa7786e4d173c20c4 100644 (file)
@@ -82,6 +82,13 @@ int dram_init(void)
 /* SPL */
 #ifdef CONFIG_SPL_BUILD
 
+static void board_leds_init(void)
+{
+       atmel_pio4_set_pio_output(AT91_PIO_PORTA, 6, 0); /* RED */
+       atmel_pio4_set_pio_output(AT91_PIO_PORTA, 7, 1); /* GREEN */
+       atmel_pio4_set_pio_output(AT91_PIO_PORTA, 8, 0); /* BLUE */
+}
+
 #ifdef CONFIG_SD_BOOT
 void spl_mmc_init(void)
 {
@@ -113,6 +120,7 @@ void spl_qspi_init(void)
 
 void spl_board_init(void)
 {
+       board_leds_init();
 #ifdef CONFIG_SD_BOOT
        spl_mmc_init();
 #endif