mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: barebox@lists.infradead.org
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Lior Amsalem <alior@marvell.com>, Willy Tarreau <w@1wt.eu>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Subject: [PATCH v2 6/7] arm: add basic support for the Armada 370 Mirabox platform
Date: Wed,  8 May 2013 23:10:21 +0200	[thread overview]
Message-ID: <1368047422-3397-7-git-send-email-thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <1368047422-3397-1-git-send-email-thomas.petazzoni@free-electrons.com>

The Mirabox is a platform manufactured by Globalscale, and based on
the Marvell Armada 370 SoC.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 arch/arm/Makefile                                  |    1 +
 arch/arm/boards/globalscale-mirabox/Makefile       |    2 ++
 arch/arm/boards/globalscale-mirabox/config.h       |    4 +++
 .../globalscale-mirabox/globalscale-mirabox.c      |   26 ++++++++++++++++++++
 arch/arm/boards/globalscale-mirabox/kwbimage.cfg   |    5 ++++
 arch/arm/boards/globalscale-mirabox/lowlevel.c     |   26 ++++++++++++++++++++
 arch/arm/configs/globalscale_mirabox_defconfig     |    8 ++++++
 arch/arm/mach-mvebu/Kconfig                        |    5 ++++
 8 files changed, 77 insertions(+)
 create mode 100644 arch/arm/boards/globalscale-mirabox/Makefile
 create mode 100644 arch/arm/boards/globalscale-mirabox/config.h
 create mode 100644 arch/arm/boards/globalscale-mirabox/globalscale-mirabox.c
 create mode 100644 arch/arm/boards/globalscale-mirabox/kwbimage.cfg
 create mode 100644 arch/arm/boards/globalscale-mirabox/lowlevel.c
 create mode 100644 arch/arm/configs/globalscale_mirabox_defconfig

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 13799fd..c8bdba7 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -102,6 +102,7 @@ board-$(CONFIG_MACH_EUKREA_CPUIMX51SD)		:= eukrea_cpuimx51
 board-$(CONFIG_MACH_FREESCALE_MX25_3STACK)	:= freescale-mx25-3-stack
 board-$(CONFIG_MACH_FREESCALE_MX35_3STACK)	:= freescale-mx35-3-stack
 board-$(CONFIG_MACH_GE863)			:= telit-evk-pro3
+board-$(CONFIG_MACH_GLOBALSCALE_MIRABOX)        := globalscale-mirabox
 board-$(CONFIG_MACH_HIGHBANK)			:= highbank
 board-$(CONFIG_MACH_IMX21ADS)			:= imx21ads
 board-$(CONFIG_MACH_IMX27ADS)			:= imx27ads
diff --git a/arch/arm/boards/globalscale-mirabox/Makefile b/arch/arm/boards/globalscale-mirabox/Makefile
new file mode 100644
index 0000000..bd5d47e
--- /dev/null
+++ b/arch/arm/boards/globalscale-mirabox/Makefile
@@ -0,0 +1,2 @@
+obj-y = globalscale-mirabox.o
+lwl-y += lowlevel.o
diff --git a/arch/arm/boards/globalscale-mirabox/config.h b/arch/arm/boards/globalscale-mirabox/config.h
new file mode 100644
index 0000000..ca15136
--- /dev/null
+++ b/arch/arm/boards/globalscale-mirabox/config.h
@@ -0,0 +1,4 @@
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#endif	/* __CONFIG_H */
diff --git a/arch/arm/boards/globalscale-mirabox/globalscale-mirabox.c b/arch/arm/boards/globalscale-mirabox/globalscale-mirabox.c
new file mode 100644
index 0000000..b8f4bff
--- /dev/null
+++ b/arch/arm/boards/globalscale-mirabox/globalscale-mirabox.c
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.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 <init.h>
+#include <sizes.h>
+#include <mach/mvebu.h>
+
+static int globalscale_mirabox_console_init(void)
+{
+	return mvebu_add_uart0();
+}
+
+console_initcall(globalscale_mirabox_console_init);
diff --git a/arch/arm/boards/globalscale-mirabox/kwbimage.cfg b/arch/arm/boards/globalscale-mirabox/kwbimage.cfg
new file mode 100644
index 0000000..3e20502
--- /dev/null
+++ b/arch/arm/boards/globalscale-mirabox/kwbimage.cfg
@@ -0,0 +1,5 @@
+VERSION 1
+BOOT_FROM nand
+NAND_BLKSZ 00020000
+NAND_BADBLK_LOCATION 01
+BINARY 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 0000000..3ca202e
--- /dev/null
+++ b/arch/arm/boards/globalscale-mirabox/lowlevel.c
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.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/mvebu.h>
+
+void __naked barebox_arm_reset_vector(void)
+{
+	arm_cpu_lowlevel_init();
+	mvebu_barebox_entry();
+}
diff --git a/arch/arm/configs/globalscale_mirabox_defconfig b/arch/arm/configs/globalscale_mirabox_defconfig
new file mode 100644
index 0000000..ed9d94d
--- /dev/null
+++ b/arch/arm/configs/globalscale_mirabox_defconfig
@@ -0,0 +1,8 @@
+CONFIG_ARCH_MVEBU=y
+CONFIG_AEABI=y
+CONFIG_DEBUG_LL=y
+CONFIG_CMD_LOADY=y
+CONFIG_CMD_LOADS=y
+CONFIG_CMD_RESET=y
+CONFIG_CMD_CLK=y
+CONFIG_DRIVER_SERIAL_NS16550=y
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 9196251..8489335 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -3,9 +3,11 @@ if ARCH_MVEBU
 config ARCH_TEXT_BASE
 	hex
 	default 0x2000000 if MACH_PLATHOME_OPENBLOCKS_AX3
+	default 0x2000000 if MACH_GLOBALSCALE_MIRABOX
 
 config BOARDINFO
 	default "PlatHome OpenBlocks AX3" if MACH_PLATHOME_OPENBLOCKS_AX3
+	default "Globalscale Mirabox" if MACH_GLOBALSCALE_MIRABOX
 
 choice
 	prompt "Marvell EBU Processor"
@@ -25,6 +27,9 @@ if ARCH_ARMADA_370
 choice
 	prompt "Armada 370 Board Type"
 
+config MACH_GLOBALSCALE_MIRABOX
+	bool "Globalscale Mirabox"
+
 endchoice
 
 endif # ARCH_ARMADA_370
-- 
1.7.9.5


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

  parent reply	other threads:[~2013-05-08 21:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-08 21:10 [PATCH v2 0/7] Basic support for Armada 370/XP SOCs Thomas Petazzoni
2013-05-08 21:10 ` [PATCH v2 1/7] scripts: new kwbimage manipulation tool for Marvell SoC boot images Thomas Petazzoni
2013-05-08 21:10 ` [PATCH v2 2/7] scripts: add kwboot tool Thomas Petazzoni
2013-05-08 21:10 ` [PATCH v2 3/7] arm: initial support for Marvell Armada 370/XP SoCs Thomas Petazzoni
2013-05-08 21:10 ` [PATCH v2 4/7] arm: integrate kwbimage in the image generation Thomas Petazzoni
2013-05-08 22:18   ` Gregory CLEMENT
2013-05-08 21:10 ` [PATCH v2 5/7] arm: add basic support for Armada XP OpenBlocks AX3 platform Thomas Petazzoni
2013-05-08 21:10 ` Thomas Petazzoni [this message]
2013-05-08 21:10 ` [PATCH v2 7/7] arm: add basic support for the Armada XP GP platform Thomas Petazzoni
2013-05-08 21:53 ` [PATCH v2 0/7] Basic support for Armada 370/XP SOCs Gregory CLEMENT
2013-05-08 21:59   ` Thomas Petazzoni
2013-05-08 22:11     ` Gregory CLEMENT

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=1368047422-3397-7-git-send-email-thomas.petazzoni@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=alior@marvell.com \
    --cc=barebox@lists.infradead.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=w@1wt.eu \
    /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