From: Lucas Stach <dev@lynxeye.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] ARM: zynq: zedboard: add PBL console support
Date: Mon, 13 Jan 2020 20:37:16 +0100 [thread overview]
Message-ID: <20200113193716.133305-3-dev@lynxeye.de> (raw)
In-Reply-To: <20200113193716.133305-1-dev@lynxeye.de>
Allows for significantly easier debugging of PBL functions.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
arch/arm/boards/avnet-zedboard/lowlevel.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm/boards/avnet-zedboard/lowlevel.c b/arch/arm/boards/avnet-zedboard/lowlevel.c
index 8edc6293f210..912eb11fdac0 100644
--- a/arch/arm/boards/avnet-zedboard/lowlevel.c
+++ b/arch/arm/boards/avnet-zedboard/lowlevel.c
@@ -22,6 +22,7 @@
#include <asm/barebox-arm-head.h>
#include <mach/init.h>
#include <mach/zynq7000-regs.h>
+#include <serial/cadence.h>
#define DCI_DONE (1 << 13)
#define PLL_ARM_LOCK (1 << 0)
@@ -279,6 +280,18 @@ static void avnet_zedboard_ps7_init(void)
writel(0x0000767B, ZYNQ_SLCR_LOCK);
}
+static void avnet_zedboard_pbl_console_init(void)
+{
+ relocate_to_current_adr();
+ setup_c();
+ barrier();
+
+ cadence_uart_init((void *)ZYNQ_UART1_BASE_ADDR);
+ pbl_set_putc(cadence_uart_putc, (void *)ZYNQ_UART1_BASE_ADDR);
+
+ pr_debug("\nAvnet ZedBoard PBL\n");
+}
+
ENTRY_FUNCTION(start_avnet_zedboard, r0, r1, r2)
{
@@ -289,5 +302,8 @@ ENTRY_FUNCTION(start_avnet_zedboard, r0, r1, r2)
avnet_zedboard_ps7_init();
+ if (IS_ENABLED(CONFIG_PBL_CONSOLE))
+ avnet_zedboard_pbl_console_init();
+
barebox_arm_entry(0, SZ_512M, fdt);
}
--
2.24.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-01-13 19:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 19:37 [PATCH 1/3] serial: cadence: move register definitions into header file Lucas Stach
2020-01-13 19:37 ` [PATCH 2/3] serial: cadence: add lowlevel init and putc functions Lucas Stach
2020-01-13 19:37 ` Lucas Stach [this message]
2020-01-14 11:07 ` [PATCH 1/3] serial: cadence: move register definitions into header file Sascha Hauer
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=20200113193716.133305-3-dev@lynxeye.de \
--to=dev@lynxeye.de \
--cc=barebox@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox