summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>2014-04-12 16:44:02 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-06-24 08:25:43 +0200
commit83a443796883ce59c4f379553ab43a38dad4ba2d (patch)
tree98ce71b9a0ff7fc47fd26874a9b82e4bd6106612 /arch
parentf73625b6a1a635aa99bb162c97cf453f8a816f06 (diff)
downloadbarebox-83a443796883ce59c4f379553ab43a38dad4ba2d.tar.gz
barebox-83a443796883ce59c4f379553ab43a38dad4ba2d.tar.xz
ARM: mvebu: convert Globalscale Mirabox to PBL_MULTI_IMAGES
This converts Marvell Armada 370 based Globalscale Mirabox 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/globalscale-mirabox/Makefile1
-rw-r--r--arch/arm/boards/globalscale-mirabox/kwbimage.cfg2
-rw-r--r--arch/arm/boards/globalscale-mirabox/lowlevel.c35
-rw-r--r--arch/arm/dts/Makefile1
-rw-r--r--arch/arm/dts/armada-370-mirabox-bb.dts7
5 files changed, 45 insertions, 1 deletions
diff --git a/arch/arm/boards/globalscale-mirabox/Makefile b/arch/arm/boards/globalscale-mirabox/Makefile
index dcfc2937d3..01c7a259e9 100644
--- a/arch/arm/boards/globalscale-mirabox/Makefile
+++ b/arch/arm/boards/globalscale-mirabox/Makefile
@@ -1 +1,2 @@
obj-y += board.o
+lwl-y += lowlevel.o
diff --git a/arch/arm/boards/globalscale-mirabox/kwbimage.cfg b/arch/arm/boards/globalscale-mirabox/kwbimage.cfg
index 72283d9b69..16fb77c31f 100644
--- a/arch/arm/boards/globalscale-mirabox/kwbimage.cfg
+++ b/arch/arm/boards/globalscale-mirabox/kwbimage.cfg
@@ -2,4 +2,4 @@ VERSION 1
BOOT_FROM nand
NAND_BLKSZ 00020000
NAND_BADBLK_LOCATION 01
-BINARY globalscale-mirabox-binary.0 0000005b 00000068
+BINARY arch/arm/boards/globalscale-mirabox/binary.0 0000005b 00000068
diff --git a/arch/arm/boards/globalscale-mirabox/lowlevel.c b/arch/arm/boards/globalscale-mirabox/lowlevel.c
new file mode 100644
index 0000000000..92203b768a
--- /dev/null
+++ b/arch/arm/boards/globalscale-mirabox/lowlevel.c
@@ -0,0 +1,35 @@
+/*
+ * 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_370_mirabox_bb_start[];
+
+ENTRY_FUNCTION(start_globalscale_mirabox, r0, r1, r2)
+{
+ void *fdt;
+
+ arm_cpu_lowlevel_init();
+
+ fdt = __dtb_armada_370_mirabox_bb_start -
+ get_runtime_offset();
+
+ mvebu_barebox_entry(fdt);
+}
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index c0f848aef9..5a8eef6ca2 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -58,6 +58,7 @@ pbl-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o imx53-qsrb.dtb.o
pbl-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += imx53-voipac-bsb.dtb.o
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_NITROGEN6X) += imx6q-nitrogen6x.dtb.o imx6dl-nitrogen6x.dtb.o
pbl-$(CONFIG_MACH_NVIDIA_BEAVER) += tegra30-beaver.dtb.o
diff --git a/arch/arm/dts/armada-370-mirabox-bb.dts b/arch/arm/dts/armada-370-mirabox-bb.dts
index 22fec18aaf..de37a75bb9 100644
--- a/arch/arm/dts/armada-370-mirabox-bb.dts
+++ b/arch/arm/dts/armada-370-mirabox-bb.dts
@@ -6,7 +6,14 @@
#include "arm/armada-370-mirabox.dts"
/ {
+ chosen {
+ stdout-path = "/soc/internal-regs/serial@12000";
+ };
+
soc {
+ ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
+ MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>;
+
internal-regs {
gpio_leds {
green_pwr_led {