mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 7/9] MIPS: add MIPS Creator CI20 board support
Date: Wed, 10 Sep 2014 11:42:24 +0400	[thread overview]
Message-ID: <1410334946-12922-8-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1410334946-12922-1-git-send-email-antonynpavlov@gmail.com>

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 arch/mips/Makefile                                 |  1 +
 arch/mips/boards/img-ci20/Makefile                 |  1 +
 arch/mips/boards/img-ci20/board.c                  | 27 ++++++++++++++
 .../img-ci20/include/board/board_pbl_start.h       | 43 ++++++++++++++++++++++
 arch/mips/boards/img-ci20/include/board/debug_ll.h | 23 ++++++++++++
 arch/mips/dts/img-ci20.dts                         | 35 ++++++++++++++++++
 arch/mips/mach-xburst/Kconfig                      |  4 ++
 7 files changed, 134 insertions(+)

diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index a3cf112..f3f4f67 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -89,6 +89,7 @@ board-$(CONFIG_BOARD_LOONGSON_TECH_LS1B)	:= loongson-ls1b
 
 machine-$(CONFIG_MACH_MIPS_XBURST)	:= xburst
 board-$(CONFIG_BOARD_RZX50)	:= ritmix-rzx50
+board-$(CONFIG_BOARD_CI20)	:= img-ci20
 
 machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
 
diff --git a/arch/mips/boards/img-ci20/Makefile b/arch/mips/boards/img-ci20/Makefile
new file mode 100644
index 0000000..dcfc293
--- /dev/null
+++ b/arch/mips/boards/img-ci20/Makefile
@@ -0,0 +1 @@
+obj-y += board.o
diff --git a/arch/mips/boards/img-ci20/board.c b/arch/mips/boards/img-ci20/board.c
new file mode 100644
index 0000000..515ebae
--- /dev/null
+++ b/arch/mips/boards/img-ci20/board.c
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * 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>
+
+static int ci20_hostname_init(void)
+{
+	barebox_set_hostname("ci20");
+
+	return 0;
+}
+console_initcall(ci20_hostname_init);
diff --git a/arch/mips/boards/img-ci20/include/board/board_pbl_start.h b/arch/mips/boards/img-ci20/include/board/board_pbl_start.h
new file mode 100644
index 0000000..26232f5
--- /dev/null
+++ b/arch/mips/boards/img-ci20/include/board/board_pbl_start.h
@@ -0,0 +1,43 @@
+/*
+ * Startup Code for Imagination Creator CI20 board
+ *
+ * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * 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 <asm/pbl_macros.h>
+#include <mach/debug_ll.h>
+#include <asm/pbl_nmon.h>
+
+	.macro	board_pbl_start
+	.set	push
+	.set	noreorder
+
+	mips_disable_interrupts
+
+	/* CPU/SoC specific setup ... */
+	/* ... absent */
+
+	debug_ll_ns16550_init
+
+	debug_ll_ns16550_outc '.'
+	debug_ll_ns16550_outnl
+
+	mips_nmon
+
+	copy_to_link_location	pbl_start
+
+	.set	pop
+	.endm
diff --git a/arch/mips/boards/img-ci20/include/board/debug_ll.h b/arch/mips/boards/img-ci20/include/board/debug_ll.h
new file mode 100644
index 0000000..72612cf
--- /dev/null
+++ b/arch/mips/boards/img-ci20/include/board/debug_ll.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * 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.
+ *
+ */
+
+#ifndef __INCLUDE_CI20_BOARD_DEBUG_LL_H__
+#define __INCLUDE_CI20_BOARD_DEBUG_LL_H__
+
+#include <mach/debug_ll_jz4780.h>
+
+#endif  /* __INCLUDE_CI20_BOARD_DEBUG_LL_H__ */
diff --git a/arch/mips/dts/img-ci20.dts b/arch/mips/dts/img-ci20.dts
new file mode 100644
index 0000000..f2022dd
--- /dev/null
+++ b/arch/mips/dts/img-ci20.dts
@@ -0,0 +1,35 @@
+/*
+ * CI20 device tree
+ *
+ * Copyright (c) 2013 Imagination Technologies
+ * Author: Paul Burton <paul.burton@imgtec.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.
+ *
+ */
+
+/dts-v1/;
+
+#include "jz4780.dtsi"
+
+/ {
+	model = "MIPS Creator CI20";
+	compatible = "img,ci20";
+
+	memory {
+		device_type = "memory";
+		reg = <0x0 0x10000000>;
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
diff --git a/arch/mips/mach-xburst/Kconfig b/arch/mips/mach-xburst/Kconfig
index e3db61e..f4a64c6 100644
--- a/arch/mips/mach-xburst/Kconfig
+++ b/arch/mips/mach-xburst/Kconfig
@@ -24,6 +24,10 @@ config BOARD_RZX50
 	select HAS_POWEROFF
 	select CPU_JZ4755
 
+config BOARD_CI20
+	bool "Imagination Creator CI20"
+	select CPU_JZ4780
+
 endchoice
 
 if DEBUG_LL
-- 
2.1.0


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

  parent reply	other threads:[~2014-09-10  7:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10  7:42 [PATCH 0/9] MIPS: xburst: add JZ4780 SoC and " Antony Pavlov
2014-09-10  7:42 ` [PATCH 1/9] common.h: use special IOMEM() for MIPS Antony Pavlov
2014-09-10  7:42 ` [PATCH 2/9] MIPS: dts: use physical addresses (as Linux does) Antony Pavlov
2014-09-10  7:42 ` [PATCH 3/9] MIPS: xburst: add JZ4780 SoC support Antony Pavlov
2014-09-10  7:42 ` [PATCH 4/9] MIPS: add (another) Ingenic vendor ID Antony Pavlov
2014-09-10  7:42 ` [PATCH 5/9] MIPS: xburst: debug_ll: rework common code, add JZ4780 support Antony Pavlov
2014-09-10  7:42 ` [PATCH 6/9] MIPS: dts: add jz4780.dtsi Antony Pavlov
2014-09-10  7:42 ` Antony Pavlov [this message]
2014-09-10  7:42 ` [PATCH 8/9] MIPS: add img-ci20_defconfig Antony Pavlov
2014-09-10  7:42 ` [PATCH 9/9] Documentation: add MIPS Creator CI20 board mini-howto Antony Pavlov
2014-09-11  6:02 ` [PATCH 0/9] MIPS: xburst: add JZ4780 SoC and MIPS Creator CI20 board support Sascha Hauer

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=1410334946-12922-8-git-send-email-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /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