From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 3/3] ARM: i.MX6 Santaro: Add PBL console support
Date: Mon, 29 Aug 2016 17:38:19 +0200 [thread overview]
Message-ID: <1472485099-10551-3-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1472485099-10551-1-git-send-email-s.hauer@pengutronix.de>
To be able to use PBL console do the usual
relocate_to_current_adr()/setup_c() dance and call pbl_set_putc() to
tell the PBL console where the UART is.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/guf-santaro/lowlevel.c | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/arch/arm/boards/guf-santaro/lowlevel.c b/arch/arm/boards/guf-santaro/lowlevel.c
index e2b6df5..1502bb3 100644
--- a/arch/arm/boards/guf-santaro/lowlevel.c
+++ b/arch/arm/boards/guf-santaro/lowlevel.c
@@ -3,36 +3,47 @@
#include <io.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
+#include <asm/cache.h>
#include <mach/generic.h>
#include <mach/imx6-regs.h>
#include <debug_ll.h>
+#include <console.h>
+#include <mach/esdctl.h>
static inline void setup_uart(void)
{
- void __iomem *iomuxbase = (void *)MX6_IOMUXC_BASE_ADDR;
+ void __iomem *iomuxbase = IOMEM(MX6_IOMUXC_BASE_ADDR);
writel(0x1, iomuxbase + 0x2b0);
imx6_ungate_all_peripherals();
- imx6_uart_setup_ll();
-
- putc_ll('>');
+ imx6_uart_setup(IOMEM(MX6_UART2_BASE_ADDR));
}
extern char __dtb_imx6q_guf_santaro_start[];
-ENTRY_FUNCTION(start_imx6q_guf_santaro, r0, r1, r2)
+static noinline void santaro_start(void)
{
- void *fdt;
+ pbl_set_putc(imx_uart_putc, IOMEM(MX6_UART2_BASE_ADDR));
+
+ pr_debug("Garz+Fricke Santaro\n");
+
+ imx6q_barebox_entry(__dtb_imx6q_guf_santaro_start);
+}
+ENTRY_FUNCTION(start_imx6q_guf_santaro, r0, r1, r2)
+{
imx6_cpu_lowlevel_init();
arm_setup_stack(0x00920000 - 8);
- if (IS_ENABLED(CONFIG_DEBUG_LL))
- setup_uart();
+ arm_early_mmu_cache_invalidate();
+
+ setup_uart();
- fdt = __dtb_imx6q_guf_santaro_start - get_runtime_offset();
+ relocate_to_current_adr();
+ setup_c();
+ barrier();
- barebox_arm_entry(0x10000000, SZ_1G, fdt);
+ santaro_start();
}
--
2.8.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2016-08-29 15:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-29 15:38 [PATCH 1/3] ARM: i.MX6 Santaro: Add enable-delay for the display Sascha Hauer
2016-08-29 15:38 ` [PATCH 2/3] ARM: i.MX6 Santaro: Add USB support Sascha Hauer
2016-08-29 15:38 ` Sascha Hauer [this message]
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=1472485099-10551-3-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.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