From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
barebox@lists.infradead.org
Subject: [PATCH 13/13] ARM: mvebu: armada-xp: Add Lenovo Iomega ix4-300d
Date: Fri, 10 Apr 2015 03:03:50 +0200 [thread overview]
Message-ID: <1428627830-17281-14-git-send-email-sebastian.hesselbarth@gmail.com> (raw)
In-Reply-To: <1428627830-17281-1-git-send-email-sebastian.hesselbarth@gmail.com>
This adds support for Marvell Armada XP based 4-bay NAS Lenovo
Iomega ix4-300d.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: barebox@lists.infradead.org
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/boards/Makefile | 1 +
arch/arm/boards/lenovo-ix4-300d/Makefile | 1 +
arch/arm/boards/lenovo-ix4-300d/kwbimage.cfg | 5 ++++
arch/arm/boards/lenovo-ix4-300d/lowlevel.c | 35 +++++++++++++++++++++++++++
arch/arm/dts/Makefile | 1 +
arch/arm/dts/armada-xp-lenovo-ix4-300d-bb.dts | 14 +++++++++++
arch/arm/mach-mvebu/Kconfig | 4 +++
images/Makefile.mvebu | 11 +++++++++
8 files changed, 72 insertions(+)
create mode 100644 arch/arm/boards/lenovo-ix4-300d/Makefile
create mode 100644 arch/arm/boards/lenovo-ix4-300d/kwbimage.cfg
create mode 100644 arch/arm/boards/lenovo-ix4-300d/lowlevel.c
create mode 100644 arch/arm/dts/armada-xp-lenovo-ix4-300d-bb.dts
diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index 548a84a630fc..15d8a9effef2 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -57,6 +57,7 @@ obj-$(CONFIG_MACH_HIGHBANK) += highbank/
obj-$(CONFIG_MACH_IMX21ADS) += freescale-mx21-ads/
obj-$(CONFIG_MACH_IMX233_OLINUXINO) += imx233-olinuxino/
obj-$(CONFIG_MACH_IMX27ADS) += freescale-mx27-ads/
+obj-$(CONFIG_MACH_LENOVO_IX4_300D) += lenovo-ix4-300d/
obj-$(CONFIG_MACH_LUBBOCK) += lubbock/
obj-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += marvell-armada-xp-gp/
obj-$(CONFIG_MACH_MB7707) += module-mb7707/
diff --git a/arch/arm/boards/lenovo-ix4-300d/Makefile b/arch/arm/boards/lenovo-ix4-300d/Makefile
new file mode 100644
index 000000000000..b08c4a93ca27
--- /dev/null
+++ b/arch/arm/boards/lenovo-ix4-300d/Makefile
@@ -0,0 +1 @@
+lwl-y += lowlevel.o
diff --git a/arch/arm/boards/lenovo-ix4-300d/kwbimage.cfg b/arch/arm/boards/lenovo-ix4-300d/kwbimage.cfg
new file mode 100644
index 000000000000..713efb0b0a89
--- /dev/null
+++ b/arch/arm/boards/lenovo-ix4-300d/kwbimage.cfg
@@ -0,0 +1,5 @@
+VERSION 1
+BOOT_FROM nand
+NAND_BLKSZ 00020000
+NAND_BADBLK_LOCATION 00
+BINARY arch/arm/boards/lenovo-ix4-300d/binary.0 0000005b 00000068
diff --git a/arch/arm/boards/lenovo-ix4-300d/lowlevel.c b/arch/arm/boards/lenovo-ix4-300d/lowlevel.c
new file mode 100644
index 000000000000..8cb8bd40791c
--- /dev/null
+++ b/arch/arm/boards/lenovo-ix4-300d/lowlevel.c
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2014, 2015
+ * 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 <asm/barebox-arm.h>
+#include <asm/barebox-arm-head.h>
+#include <linux/sizes.h>
+#include <mach/lowlevel.h>
+
+extern char __dtb_armada_xp_lenovo_ix4_300d_bb_start[];
+
+ENTRY_FUNCTION(start_lenovo_ix4_300d, r0, r1, r2)
+{
+ void *fdt;
+
+ arm_cpu_lowlevel_init();
+
+ fdt = __dtb_armada_xp_lenovo_ix4_300d_bb_start -
+ get_runtime_offset();
+
+ mvebu_barebox_entry(fdt);
+}
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index cc92bdef838c..06c29c8d8017 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -23,6 +23,7 @@ pbl-dtb-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += kirkwood-guruplug-server-plus-bb.
pbl-dtb-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += armada-370-mirabox-bb.dtb.o
pbl-dtb-$(CONFIG_MACH_GUF_SANTARO) += imx6q-guf-santaro.dtb.o
pbl-dtb-$(CONFIG_MACH_GW_VENTANA) += imx6q-gw54xx.dtb.o
+pbl-dtb-$(CONFIG_MACH_LENOVO_IX4_300D) += armada-xp-lenovo-ix4-300d-bb.dtb.o
pbl-dtb-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += armada-xp-gp-bb.dtb.o
pbl-dtb-$(CONFIG_MACH_NITROGEN6X) += imx6q-nitrogen6x.dtb.o imx6dl-nitrogen6x.dtb.o
pbl-dtb-$(CONFIG_MACH_NVIDIA_BEAVER) += tegra30-beaver.dtb.o
diff --git a/arch/arm/dts/armada-xp-lenovo-ix4-300d-bb.dts b/arch/arm/dts/armada-xp-lenovo-ix4-300d-bb.dts
new file mode 100644
index 000000000000..5f1a6073814d
--- /dev/null
+++ b/arch/arm/dts/armada-xp-lenovo-ix4-300d-bb.dts
@@ -0,0 +1,14 @@
+/*
+ * Barebox specific DT overlay for Lenovo Iomega ix4-300d
+ * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
+ */
+
+#include "arm/armada-xp-lenovo-ix4-300d.dts"
+
+/ {
+ gpio-leds {
+ power-led {
+ linux,default-trigger = "heartbeat";
+ };
+ };
+};
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 9394cf71a998..5e96f16e8cf4 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -43,6 +43,10 @@ config MACH_GLOBALSCALE_MIRABOX
comment "Armada XP based boards"
+config MACH_LENOVO_IX4_300D
+ bool "Lenovo Iomega ix4-300d"
+ select ARCH_ARMADA_XP
+
config MACH_MARVELL_ARMADA_XP_GP
bool "Marvell Armada XP GP"
select ARCH_ARMADA_XP
diff --git a/images/Makefile.mvebu b/images/Makefile.mvebu
index 82f370576468..dcf2235f8cb5 100644
--- a/images/Makefile.mvebu
+++ b/images/Makefile.mvebu
@@ -24,6 +24,17 @@ image-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += barebox-globalscale-mirabox-uart.img
image-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += barebox-globalscale-mirabox-2nd.img
# ----------------------- Armada XP based boards ---------------------------
+LENOVO_IX4_300D_KWBOPTS = ${KWBOPTS} -i $(board)/lenovo-ix4-300d/kwbimage.cfg
+OPTS_start_lenovo_ix4_300d.pblx.kwbimg = $(LENOVO_IX4_300D_KWBOPTS)
+OPTS_start_lenovo_ix4_300d.pblx.kwbuartimg = -m uart $(LENOVO_IX4_300D_KWBOPTS)
+FILE_barebox-lenovo-ix4-300d.img = start_lenovo_ix4_300d.pblx.kwbimg
+FILE_barebox-lenovo-ix4-300d-uart.img = start_lenovo_ix4_300d.pblx.kwbuartimg
+FILE_barebox-lenovo-ix4-300d-2nd.img = start_lenovo_ix4_300d.pblx
+pblx-$(CONFIG_MACH_LENOVO_IX4_300D) += start_lenovo_ix4_300d.pblx
+image-$(CONFIG_MACH_LENOVO_IX4_300D) += barebox-lenovo-ix4-300d.img
+image-$(CONFIG_MACH_LENOVO_IX4_300D) += barebox-lenovo-ix4-300d-uart.img
+image-$(CONFIG_MACH_LENOVO_IX4_300D) += barebox-lenovo-ix4-300d-2nd.img
+
MARVELL_ARMADA_XP_GP_KWBOPTS = ${KWBOPTS} -i $(board)/marvell-armada-xp-gp/kwbimage.cfg
OPTS_start_marvell_armada_xp_gp.pblx.kwbimg = $(MARVELL_ARMADA_XP_GP_KWBOPTS)
OPTS_start_marvell_armada_xp_gp.pblx.kwbuartimg = -m uart $(MARVELL_ARMADA_XP_GP_KWBOPTS)
--
2.1.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-04-10 1:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-10 1:03 [PATCH 00/13] Add support for Lenovo ix4-300d NAS Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 01/13] net: phy: Support Marvell 88E1318S PHY Sebastian Hesselbarth
2015-05-02 16:53 ` Ezequiel Garcia
2015-05-02 20:28 ` Ezequiel Garcia
2015-05-03 9:50 ` Sebastian Hesselbarth
2015-05-03 22:47 ` Sebastian Hesselbarth
2015-05-05 12:06 ` Ezequiel Garcia
2015-04-10 1:03 ` [PATCH 02/13] gpio: Add driver for 74x164 compatible shift-registers Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 03/13] spi: ath79: move spidelay from spi-bitbang-txrx Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 04/13] spi: Add SPI GPIO bitbang driver Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 05/13] bus: mvebu-mbus: Remove coherency attribute Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 06/13] bus: mvebu-mbus: Drop device reference Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 07/13] bus: mvebu-mbus: Convert mbus platform driver to direct driver Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 08/13] ARM: mvebu: Move PCIe register defines to socid.h Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 09/13] ARM: mvebu: armada-xp: Fixup broken MV78230-A0 SoC ID Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 10/13] ARM: mvebu: armada-xp: Limit PUP access to Armada XP Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 11/13] ARM: mvebu: armada-xp: Use MBUS_ERR_PROP_EN define Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 12/13] ARM: mvebu: armada-xp: Sort boards and images alphabetically Sebastian Hesselbarth
2015-04-10 1:03 ` Sebastian Hesselbarth [this message]
2015-04-14 8:43 ` [PATCH 00/13] Add support for Lenovo ix4-300d NAS Sascha Hauer
2015-04-14 9:42 ` Sebastian Hesselbarth
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=1428627830-17281-14-git-send-email-sebastian.hesselbarth@gmail.com \
--to=sebastian.hesselbarth@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=thomas.petazzoni@free-electrons.com \
/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