diff options
author | Mihai Sain | 2022-12-23 08:39:36 +0200 |
---|---|---|
committer | Eugen Hristev | 2023-01-04 09:28:04 +0200 |
commit | 77aa6456bf8e9dc9ac1edf7ef22d00bc03a3d6f3 (patch) | |
tree | 395d492223194853c7e1add39dc6c72393af8e09 /board/atmel | |
parent | ee43b1e744f2a4279668823e8e13a16ec20b4e80 (diff) |
board: at91: sam9x60: 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 sam9x60 based boards which contain an RGB led.
Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
Diffstat (limited to 'board/atmel')
-rw-r--r-- | board/atmel/sam9x60_curiosity/sam9x60_curiosity.c | 10 | ||||
-rw-r--r-- | board/atmel/sam9x60ek/sam9x60ek.c | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c b/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c index 8cf67d148dd..0fe0de9fde9 100644 --- a/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c +++ b/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c @@ -25,6 +25,13 @@ DECLARE_GLOBAL_DATA_PTR; void at91_prepare_cpu_var(void); +static void board_leds_init(void) +{ + at91_set_pio_output(AT91_PIO_PORTD, 17, 0); /* LED RED */ + at91_set_pio_output(AT91_PIO_PORTD, 19, 0); /* LED GREEN */ + at91_set_pio_output(AT91_PIO_PORTD, 21, 1); /* LED BLUE */ +} + int board_late_init(void) { at91_prepare_cpu_var(); @@ -62,6 +69,9 @@ int board_init(void) { /* address of boot parameters */ gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100; + + board_leds_init(); + return 0; } diff --git a/board/atmel/sam9x60ek/sam9x60ek.c b/board/atmel/sam9x60ek/sam9x60ek.c index 04bf2bb5c96..3fbfca4acc9 100644 --- a/board/atmel/sam9x60ek/sam9x60ek.c +++ b/board/atmel/sam9x60ek/sam9x60ek.c @@ -24,6 +24,13 @@ DECLARE_GLOBAL_DATA_PTR; void at91_prepare_cpu_var(void); +static void board_leds_init(void) +{ + at91_set_pio_output(AT91_PIO_PORTB, 11, 0); /* LED RED */ + at91_set_pio_output(AT91_PIO_PORTB, 12, 0); /* LED GREEN */ + at91_set_pio_output(AT91_PIO_PORTB, 13, 1); /* LED BLUE */ +} + #ifdef CONFIG_BOARD_LATE_INIT int board_late_init(void) { @@ -66,6 +73,8 @@ int board_init(void) /* address of boot parameters */ gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x100; + board_leds_init(); + return 0; } |