summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/embest-marsboard/lowlevel.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2019-09-12 08:54:11 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-09-17 11:47:54 +0200
commit0f180e814341faa27a6887aa364a10858ebb9b56 (patch)
treef29dbe717a465e25c7f44dd5717be8dadec70e26 /arch/arm/boards/embest-marsboard/lowlevel.c
parent3769e0fa7b5de004e59bf86035b780f97f26abad (diff)
downloadbarebox-0f180e814341faa27a6887aa364a10858ebb9b56.tar.gz
barebox-0f180e814341faa27a6887aa364a10858ebb9b56.tar.xz
ARM: imx6: add Embest MarSBoard support
This board is produced by Embest/Element 14 and is based on i.MX6 Dual. For more informations on this board : http://www.embest-tech.com/shop/star/marsboard.html Signed-off-by: Eric BĂ©nard <eric@eukrea.com> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Tested-by: Stefan Lengfeld <contact@stefanchrist.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/embest-marsboard/lowlevel.c')
-rw-r--r--arch/arm/boards/embest-marsboard/lowlevel.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/boards/embest-marsboard/lowlevel.c b/arch/arm/boards/embest-marsboard/lowlevel.c
new file mode 100644
index 0000000000..9e20a2ec06
--- /dev/null
+++ b/arch/arm/boards/embest-marsboard/lowlevel.c
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2019 Ahmad Fatoum - Pengutronix
+ */
+
+#include <common.h>
+#include <io.h>
+#include <asm/barebox-arm.h>
+#include <mach/imx6.h>
+#include <mach/esdctl.h>
+#include <mach/iomux-mx6.h>
+#include <debug_ll.h>
+
+static inline void setup_uart(void)
+{
+ void __iomem *iomuxbase = IOMEM(MX6_IOMUXC_BASE_ADDR);
+
+ imx6_ungate_all_peripherals();
+
+ imx_setup_pad(iomuxbase, MX6Q_PAD_EIM_D26__UART2_TXD);
+
+ imx6_uart_setup_ll();
+
+ putc_ll('>');
+}
+
+extern char __dtb_z_imx6q_marsboard_start[];
+
+ENTRY_FUNCTION(start_imx6q_marsboard, r0, r1, r2)
+{
+ void *fdt;
+
+ imx6_cpu_lowlevel_init();
+
+ if (IS_ENABLED(CONFIG_DEBUG_LL))
+ setup_uart();
+
+ fdt = __dtb_z_imx6q_marsboard_start + get_runtime_offset();
+
+ imx6q_barebox_entry(fdt);
+}