summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>2014-04-12 17:04:35 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-06-24 08:25:43 +0200
commit31910339791ef692b0f0d760e44ec1cce81e733f (patch)
tree39d7694fef0b5e7daab744a18ec9d4a597edf808 /arch
parent83a443796883ce59c4f379553ab43a38dad4ba2d (diff)
downloadbarebox-31910339791ef692b0f0d760e44ec1cce81e733f.tar.gz
barebox-31910339791ef692b0f0d760e44ec1cce81e733f.tar.xz
ARM: mvebu: convert Marvell Armada XP GP to PBL_MULTI_IMAGES
This converts Marvell Armada XP based Marvell Armada XP GP to PBL_MULTI_IMAGES. A DT overlay is added to keep possible barebox-specific changes separated and added to lowlevel board init. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boards/marvell-armada-xp-gp/Makefile1
-rw-r--r--arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg2
-rw-r--r--arch/arm/boards/marvell-armada-xp-gp/lowlevel.c34
-rw-r--r--arch/arm/dts/Makefile1
-rw-r--r--arch/arm/dts/armada-xp-gp-bb.dts6
5 files changed, 43 insertions, 1 deletions
diff --git a/arch/arm/boards/marvell-armada-xp-gp/Makefile b/arch/arm/boards/marvell-armada-xp-gp/Makefile
index dcfc2937d3..01c7a259e9 100644
--- a/arch/arm/boards/marvell-armada-xp-gp/Makefile
+++ b/arch/arm/boards/marvell-armada-xp-gp/Makefile
@@ -1 +1,2 @@
obj-y += board.o
+lwl-y += lowlevel.o
diff --git a/arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg b/arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg
index db75969fe0..3f66aa080e 100644
--- a/arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg
+++ b/arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg
@@ -1,3 +1,3 @@
VERSION 1
BOOT_FROM spi
-BINARY marvell-armada-xp-gp-binary.0 0000005b 00000068
+BINARY arch/arm/boards/marvell-armada-xp-gp/binary.0 0000005b 00000068
diff --git a/arch/arm/boards/marvell-armada-xp-gp/lowlevel.c b/arch/arm/boards/marvell-armada-xp-gp/lowlevel.c
new file mode 100644
index 0000000000..046057f56a
--- /dev/null
+++ b/arch/arm/boards/marvell-armada-xp-gp/lowlevel.c
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2014
+ * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <common.h>
+#include <sizes.h>
+#include <asm/barebox-arm.h>
+#include <asm/barebox-arm-head.h>
+#include <mach/lowlevel.h>
+
+extern char __dtb_armada_xp_gp_bb_start[];
+
+ENTRY_FUNCTION(start_marvell_armada_xp_gp, r0, r1, r2)
+{
+ void *fdt;
+
+ arm_cpu_lowlevel_init();
+
+ fdt = __dtb_armada_xp_gp_bb_start - get_runtime_offset();
+
+ mvebu_barebox_entry(fdt);
+}
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 5a8eef6ca2..651e0abf7c 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -60,6 +60,7 @@ pbl-$(CONFIG_MACH_GK802) += imx6q-gk802.dtb.o
pbl-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += kirkwood-guruplug-server-plus-bb.dtb.o
pbl-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += armada-370-mirabox-bb.dtb.o
pbl-$(CONFIG_MACH_GUF_SANTARO) += imx6q-guf-santaro.dtb.o
+pbl-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += armada-xp-gp-bb.dtb.o
pbl-$(CONFIG_MACH_NITROGEN6X) += imx6q-nitrogen6x.dtb.o imx6dl-nitrogen6x.dtb.o
pbl-$(CONFIG_MACH_NVIDIA_BEAVER) += tegra30-beaver.dtb.o
pbl-$(CONFIG_MACH_NVIDIA_JETSON) += tegra124-jetson-tk1.dtb.o
diff --git a/arch/arm/dts/armada-xp-gp-bb.dts b/arch/arm/dts/armada-xp-gp-bb.dts
index e27a966445..3836016425 100644
--- a/arch/arm/dts/armada-xp-gp-bb.dts
+++ b/arch/arm/dts/armada-xp-gp-bb.dts
@@ -4,3 +4,9 @@
*/
#include "arm/armada-xp-gp.dts"
+
+/ {
+ chosen {
+ stdout-path = "/soc/internal-regs/serial@12000";
+ };
+};