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 v3 5/7] arm: add basic support for Armada XP OpenBlocks AX3 platform
Date: Thu,  9 May 2013 11:52:49 +0200	[thread overview]
Message-ID: <1368093171-17845-6-git-send-email-thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <1368093171-17845-1-git-send-email-thomas.petazzoni@free-electrons.com>

The OpenBlocks AX3 platform is manufactured by PlatHome and uses the
MV78260 dual-core SoC from the Armada XP family.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 arch/arm/Makefile                                  |    1 +
 arch/arm/boards/plathome-openblocks-ax3/Makefile   |    2 ++
 arch/arm/boards/plathome-openblocks-ax3/config.h   |    4 ++++
 .../boards/plathome-openblocks-ax3/kwbimage.cfg    |    3 +++
 arch/arm/boards/plathome-openblocks-ax3/lowlevel.c |   25 ++++++++++++++++++++
 .../plathome-openblocks-ax3.c                      |   25 ++++++++++++++++++++
 arch/arm/configs/plathome_openblocks_ax3_defconfig |    9 +++++++
 arch/arm/mach-mvebu/Kconfig                        |    6 ++++-
 8 files changed, 74 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boards/plathome-openblocks-ax3/Makefile
 create mode 100644 arch/arm/boards/plathome-openblocks-ax3/config.h
 create mode 100644 arch/arm/boards/plathome-openblocks-ax3/kwbimage.cfg
 create mode 100644 arch/arm/boards/plathome-openblocks-ax3/lowlevel.c
 create mode 100644 arch/arm/boards/plathome-openblocks-ax3/plathome-openblocks-ax3.c
 create mode 100644 arch/arm/configs/plathome_openblocks_ax3_defconfig

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index d9e0cf1..913dfed 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -143,6 +143,7 @@ board-$(CONFIG_MACH_GUF_CUPID)			:= guf-cupid
 board-$(CONFIG_MACH_MINI2440)			:= friendlyarm-mini2440
 board-$(CONFIG_MACH_MINI6410)			:= friendlyarm-mini6410
 board-$(CONFIG_MACH_TINY6410)			:= friendlyarm-tiny6410
+board-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3)	:= plathome-openblocks-ax3
 board-$(CONFIG_MACH_QIL_A9260)			:= qil-a9260
 board-$(CONFIG_MACH_TNY_A9260)			:= tny-a926x
 board-$(CONFIG_MACH_TNY_A9263)			:= tny-a926x
diff --git a/arch/arm/boards/plathome-openblocks-ax3/Makefile b/arch/arm/boards/plathome-openblocks-ax3/Makefile
new file mode 100644
index 0000000..91dc764
--- /dev/null
+++ b/arch/arm/boards/plathome-openblocks-ax3/Makefile
@@ -0,0 +1,2 @@
+obj-y = plathome-openblocks-ax3.o
+lwl-y += lowlevel.o
diff --git a/arch/arm/boards/plathome-openblocks-ax3/config.h b/arch/arm/boards/plathome-openblocks-ax3/config.h
new file mode 100644
index 0000000..ca15136
--- /dev/null
+++ b/arch/arm/boards/plathome-openblocks-ax3/config.h
@@ -0,0 +1,4 @@
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#endif	/* __CONFIG_H */
diff --git a/arch/arm/boards/plathome-openblocks-ax3/kwbimage.cfg b/arch/arm/boards/plathome-openblocks-ax3/kwbimage.cfg
new file mode 100644
index 0000000..69fd1fd
--- /dev/null
+++ b/arch/arm/boards/plathome-openblocks-ax3/kwbimage.cfg
@@ -0,0 +1,3 @@
+VERSION 1
+BOOT_FROM spi
+BINARY plathome-openblocks-ax3-binary.0 0000005b 00000068
diff --git a/arch/arm/boards/plathome-openblocks-ax3/lowlevel.c b/arch/arm/boards/plathome-openblocks-ax3/lowlevel.c
new file mode 100644
index 0000000..e9b2e30
--- /dev/null
+++ b/arch/arm/boards/plathome-openblocks-ax3/lowlevel.c
@@ -0,0 +1,25 @@
+/*
+ * 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 <mach/mvebu.h>
+#include <asm/barebox-arm.h>
+#include <asm/barebox-arm-head.h>
+
+void __naked barebox_arm_reset_vector(void)
+{
+	arm_cpu_lowlevel_init();
+	mvebu_barebox_entry();
+}
diff --git a/arch/arm/boards/plathome-openblocks-ax3/plathome-openblocks-ax3.c b/arch/arm/boards/plathome-openblocks-ax3/plathome-openblocks-ax3.c
new file mode 100644
index 0000000..9daf020
--- /dev/null
+++ b/arch/arm/boards/plathome-openblocks-ax3/plathome-openblocks-ax3.c
@@ -0,0 +1,25 @@
+/*
+ * 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 <mach/mvebu.h>
+
+static int plathome_openblocks_ax3_console_init(void)
+{
+	return mvebu_add_uart0();
+}
+
+console_initcall(plathome_openblocks_ax3_console_init);
diff --git a/arch/arm/configs/plathome_openblocks_ax3_defconfig b/arch/arm/configs/plathome_openblocks_ax3_defconfig
new file mode 100644
index 0000000..95449c9
--- /dev/null
+++ b/arch/arm/configs/plathome_openblocks_ax3_defconfig
@@ -0,0 +1,9 @@
+CONFIG_ARCH_MVEBU=y
+CONFIG_ARCH_ARMADA_XP=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 4cbe546..9196251 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -2,9 +2,10 @@ if ARCH_MVEBU
 
 config ARCH_TEXT_BASE
 	hex
+	default 0x2000000 if MACH_PLATHOME_OPENBLOCKS_AX3
 
 config BOARDINFO
-	default
+	default "PlatHome OpenBlocks AX3" if MACH_PLATHOME_OPENBLOCKS_AX3
 
 choice
 	prompt "Marvell EBU Processor"
@@ -33,6 +34,9 @@ if ARCH_ARMADA_XP
 choice
 	prompt "Armada XP Board Type"
 
+config MACH_PLATHOME_OPENBLOCKS_AX3
+	bool "PlatHome OpenBlocks AX3"
+
 endchoice
 
 endif # ARCH_ARMADA_XP
-- 
1.7.9.5


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

  parent reply	other threads:[~2013-05-09  9:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-09  9:52 [PATCH v3 0/7] Basic support for Armada 370/XP SOCs Thomas Petazzoni
2013-05-09  9:52 ` [PATCH v3 1/7] scripts: new kwbimage manipulation tool for Marvell SoC boot images Thomas Petazzoni
2013-05-09  9:52 ` [PATCH v3 2/7] scripts: add kwboot tool Thomas Petazzoni
2013-05-09 11:16   ` Jason Cooper
2013-05-10 13:25     ` Sascha Hauer
2013-05-09  9:52 ` [PATCH v3 3/7] arm: initial support for Marvell Armada 370/XP SoCs Thomas Petazzoni
2013-05-12 11:14   ` antonynpavlov
2013-05-09  9:52 ` [PATCH v3 4/7] arm: integrate kwbimage in the image generation Thomas Petazzoni
2013-05-09  9:52 ` Thomas Petazzoni [this message]
2013-05-09  9:52 ` [PATCH v3 6/7] arm: add basic support for the Armada 370 Mirabox platform Thomas Petazzoni
2013-05-09  9:52 ` [PATCH v3 7/7] arm: add basic support for the Armada XP GP platform Thomas Petazzoni
2013-05-09 13:33 ` [PATCH v3 0/7] Basic support for Armada 370/XP SOCs Gregory CLEMENT
2013-05-11 15:27 ` Sascha Hauer
2013-05-11 16:27   ` Thomas Petazzoni
2013-05-12  7:56 ` Sascha Hauer
2013-05-12  9:12   ` Thomas Petazzoni
2013-05-12 10:24     ` Sascha Hauer
2013-05-12 10:41       ` Thomas Petazzoni

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=1368093171-17845-6-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