linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Binbin Zhou <zhoubb@lemote.com>
To: Ralf Baechle <ralf@linux-mips.org>, James Hogan <james.hogan@imgtec.com>
Cc: "John Crispin" <john@phrozen.org>,
	"Steven J . Hill" <Steven.Hill@imgtec.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Fuxin Zhang" <zhangfx@lemote.com>,
	"Zhangjin Wu" <wuzhangjin@gmail.com>,
	"Kelvin Cheung" <keguang.zhang@gmail.com>,
	"Yang Ling" <gnaygnil@gmail.com>, 谢致邦 <Yeking@Red54.com>,
	linux-mips@linux-mips.org, "Binbin Zhou" <zhoubb@lemote.com>,
	"HuaCai Chen" <chenhc@lemote.com>
Subject: [PATCH v6 6/8] MIPS: Loongson: Add Loongson-1A board support
Date: Thu, 30 Mar 2017 10:44:47 +0800	[thread overview]
Message-ID: <1490841889-13450-7-git-send-email-zhoubb@lemote.com> (raw)
In-Reply-To: <1490841889-13450-1-git-send-email-zhoubb@lemote.com>

Register basic devices for Loongson-1A, and setup clk for UART.

Signed-off-by: Binbin Zhou <zhoubb@lemote.com>
Signed-off-by: HuaCai Chen <chenhc@lemote.com>
---
 arch/mips/loongson32/Makefile      |  6 ++++++
 arch/mips/loongson32/ls1a/Makefile |  5 +++++
 arch/mips/loongson32/ls1a/board.c  | 31 +++++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+)
 create mode 100644 arch/mips/loongson32/ls1a/Makefile
 create mode 100644 arch/mips/loongson32/ls1a/board.c

diff --git a/arch/mips/loongson32/Makefile b/arch/mips/loongson32/Makefile
index 1ab2c5b..cd1f597 100644
--- a/arch/mips/loongson32/Makefile
+++ b/arch/mips/loongson32/Makefile
@@ -5,6 +5,12 @@
 obj-$(CONFIG_MACH_LOONGSON32) += common/
 
 #
+# Loongson LS1A board
+#
+
+obj-$(CONFIG_LOONGSON1_LS1A)  += ls1a/
+
+#
 # Loongson LS1B board
 #
 
diff --git a/arch/mips/loongson32/ls1a/Makefile b/arch/mips/loongson32/ls1a/Makefile
new file mode 100644
index 0000000..dc23a9a
--- /dev/null
+++ b/arch/mips/loongson32/ls1a/Makefile
@@ -0,0 +1,5 @@
+#
+# Makefile for loongson1A based machines.
+#
+
+obj-y += board.o
diff --git a/arch/mips/loongson32/ls1a/board.c b/arch/mips/loongson32/ls1a/board.c
new file mode 100644
index 0000000..7993f6c
--- /dev/null
+++ b/arch/mips/loongson32/ls1a/board.c
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2016 Binbin Zhou <zhoubb@lemote.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.
+ */
+
+#include <platform.h>
+
+static struct platform_device *ls1a_platform_devices[] __initdata = {
+	&ls1x_uart_pdev,
+	&ls1x_eth0_pdev,
+	&ls1x_eth1_pdev,
+	&ls1x_rtc_pdev,
+	&ls1x_wdt_pdev,
+	&ls1x_ahci_pdev,
+	&ls1x_ohci_pdev,
+};
+
+static int __init ls1a_platform_init(void)
+{
+	ls1x_serial_set_uartclk(&ls1x_uart_pdev);
+	ls1x_rtc_set_extclk(&ls1x_rtc_pdev);
+
+	return platform_add_devices(ls1a_platform_devices,
+				   ARRAY_SIZE(ls1a_platform_devices));
+}
+
+arch_initcall(ls1a_platform_init);
-- 
2.9.3

  parent reply	other threads:[~2017-03-30  2:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30  2:44 [PATCH v6 0/8] MIPS: Loongson: Add the Loongson-1A processor support Binbin Zhou
2017-03-30  2:44 ` [PATCH v6 1/8] MIPS: Loongson: Merge PRID macro for Loongson-1A/1B/1C Binbin Zhou
2017-03-30  9:50   ` Sergei Shtylyov
2017-04-24 14:52     ` Yang Ling
2017-03-30  2:44 ` [PATCH RESEND v6 2/8] MIPS: Loongson: Expand Loongson-1's register definition Binbin Zhou
2017-03-30  2:44 ` [PATCH v6 3/8] MIPS: Loongson: Add basic Loongson-1A CPU support Binbin Zhou
2017-03-30  2:44 ` [PATCH v6 4/8] MIPS: Loongson: Add Loongson-1A Kconfig options Binbin Zhou
2017-03-30  2:44 ` [PATCH v6 5/8] MIPS: Loongson: Add platform devices for Loongson-1A Binbin Zhou
2017-03-30  2:44 ` Binbin Zhou [this message]
2017-03-30  2:44 ` [PATCH v6 7/8] clk: Loongson: Add Loongson-1A clock support Binbin Zhou
2017-03-30  2:44 ` [PATCH v6 8/8] MIPS: Loongson: Add Loongson-1A default config file Binbin Zhou

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=1490841889-13450-7-git-send-email-zhoubb@lemote.com \
    --to=zhoubb@lemote.com \
    --cc=Steven.Hill@imgtec.com \
    --cc=Yeking@Red54.com \
    --cc=aurelien@aurel32.net \
    --cc=chenhc@lemote.com \
    --cc=gnaygnil@gmail.com \
    --cc=james.hogan@imgtec.com \
    --cc=john@phrozen.org \
    --cc=keguang.zhang@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=wuzhangjin@gmail.com \
    --cc=zhangfx@lemote.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;
as well as URLs for NNTP newsgroup(s).