All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eugen Hristev <eugen.hristev@microchip.com>
To: <u-boot@lists.denx.de>
Cc: <eugen.hristev@microchip.com>, Mihai Sain <mihai.sain@microchip.com>
Subject: [PATCH] board: sama7g5ek: set blue led on at boot time
Date: Mon, 20 Dec 2021 10:12:39 +0200	[thread overview]
Message-ID: <20211220081239.758276-1-eugen.hristev@microchip.com> (raw)

From: Mihai Sain <mihai.sain@microchip.com>

Set blue led on at boot time in order to highlight that u-boot is loaded.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
---
 board/atmel/sama7g5ek/sama7g5ek.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/board/atmel/sama7g5ek/sama7g5ek.c b/board/atmel/sama7g5ek/sama7g5ek.c
index 4df43d81f8..5444799dfb 100644
--- a/board/atmel/sama7g5ek/sama7g5ek.c
+++ b/board/atmel/sama7g5ek/sama7g5ek.c
@@ -17,6 +17,13 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+static void board_leds_init(void)
+{
+	atmel_pio4_set_pio_output(AT91_PIO_PORTB, 8, 0);	/* LED RED */
+	atmel_pio4_set_pio_output(AT91_PIO_PORTA, 13, 0);	/* LED GREEN */
+	atmel_pio4_set_pio_output(AT91_PIO_PORTD, 20, 1);	/* LED BLUE */
+}
+
 int board_late_init(void)
 {
 	return 0;
@@ -65,6 +72,8 @@ int board_init(void)
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
+	board_leds_init();
+
 	return 0;
 }
 
-- 
2.25.1


             reply	other threads:[~2021-12-20  8:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20  8:12 Eugen Hristev [this message]
2022-01-13  9:49 ` [PATCH] board: sama7g5ek: set blue led on at boot time Eugen.Hristev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211220081239.758276-1-eugen.hristev@microchip.com \
    --to=eugen.hristev@microchip.com \
    --cc=mihai.sain@microchip.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.