mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH 5/8] freescale-mx6-sabresd: Add CONFIG_DEBUG_LL support
Date: Sun, 11 Oct 2015 11:43:38 -0700	[thread overview]
Message-ID: <1444589021-12727-5-git-send-email-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <1444589021-12727-1-git-send-email-andrew.smirnov@gmail.com>

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 arch/arm/boards/freescale-mx6-sabresd/lowlevel.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c b/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c
index 73eed1d..b329f46 100644
--- a/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c
+++ b/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c
@@ -1,9 +1,28 @@
+#include <debug_ll.h>
 #include <common.h>
 #include <linux/sizes.h>
 #include <mach/generic.h>
 #include <asm/barebox-arm-head.h>
 #include <asm/barebox-arm.h>
 
+static inline void setup_uart(void)
+{
+	void __iomem *iomuxbase = IOMEM(MX6_IOMUXC_BASE_ADDR);
+
+	imx6_ungate_all_peripherals();
+
+	writel(0x1b0b1, iomuxbase + 0x0650);
+	writel(3, iomuxbase + 0x0280);
+
+	writel(0x1b0b1, iomuxbase + 0x0654);
+	writel(3, iomuxbase + 0x0284);
+	writel(1, iomuxbase + 0x0920);
+
+	imx6_uart_setup_ll();
+
+	putc_ll('>');
+}
+
 extern char __dtb_imx6q_sabresd_start[];
 
 ENTRY_FUNCTION(start_imx6q_sabresd, r0, r1, r2)
@@ -12,6 +31,9 @@ ENTRY_FUNCTION(start_imx6q_sabresd, r0, r1, r2)
 
 	imx6_cpu_lowlevel_init();
 
+	if (IS_ENABLED(CONFIG_DEBUG_LL))
+		setup_uart();
+
 	fdt = __dtb_imx6q_sabresd_start - get_runtime_offset();
 
 	barebox_arm_entry(0x10000000, SZ_1G, fdt);
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2015-10-11 18:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-11 18:43 [PATCH 1/8] memtest.c: Print iterations count if -i is 0 Andrey Smirnov
2015-10-11 18:43 ` [PATCH 2/8] arm: Disable unaligned accesses Andrey Smirnov
2015-10-11 18:43 ` [PATCH 3/8] arm/cpu/start.c: Distil some common code in __start() Andrey Smirnov
2015-10-12  9:44   ` Sascha Hauer
2015-10-11 18:43 ` [PATCH 4/8] arm/cpu: Avoid multiple definitions of barebox_arm_entry Andrey Smirnov
2015-10-12  9:37   ` Sascha Hauer
2015-10-11 18:43 ` Andrey Smirnov [this message]
2015-10-11 18:43 ` [PATCH 6/8] common/command.c: Replace magic number with appropriate constant Andrey Smirnov
2015-10-11 18:43 ` [PATCH 7/8] common/parser.c: Do not conflate error reporting disciplines Andrey Smirnov
2015-10-11 18:43 ` [PATCH 8/8] common/parser.c: Do not treat zero return code as error Andrey Smirnov
2015-10-12  9:46 ` [PATCH 1/8] memtest.c: Print iterations count if -i is 0 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=1444589021-12727-5-git-send-email-andrew.smirnov@gmail.com \
    --to=andrew.smirnov@gmail.com \
    --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