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>,
"Stephen Boyd" <sboyd@codeaurora.org>,
"Michael Turquette" <mturquette@baylibre.com>,
linux-mips@linux-mips.org, linux-clk@vger.kernel.org,
"Binbin Zhou" <zhoubb@lemote.com>,
"HuaCai Chen" <chenhc@lemote.com>
Subject: [PATCH v7 1/8] MIPS: Loongson: Merge PRID macro for Loongson-1A/1B/1C
Date: Fri, 16 Jun 2017 10:52:46 +0800 [thread overview]
Message-ID: <1497581573-17258-2-git-send-email-zhoubb@lemote.com> (raw)
In-Reply-To: <1497581573-17258-1-git-send-email-zhoubb@lemote.com>
The Loongson-1 series CPUs(1A/1B/1C) share the same PRID macro.
Signed-off-by: Binbin Zhou <zhoubb@lemote.com>
Signed-off-by: HuaCai Chen <chenhc@lemote.com>
---
arch/mips/include/asm/cpu.h | 3 +--
arch/mips/kernel/cpu-probe.c | 4 +++-
arch/mips/loongson32/common/setup.c | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index 9a83724..76c0b56c3 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -239,8 +239,7 @@
#define PRID_REV_VR4181A 0x0070 /* Same as VR4122 */
#define PRID_REV_VR4130 0x0080
#define PRID_REV_34K_V1_0_2 0x0022
-#define PRID_REV_LOONGSON1B 0x0020
-#define PRID_REV_LOONGSON1C 0x0020 /* Same as Loongson-1B */
+#define PRID_REV_LOONGSON1ABC 0x0020
#define PRID_REV_LOONGSON2E 0x0002
#define PRID_REV_LOONGSON2F 0x0003
#define PRID_REV_LOONGSON3A_R1 0x0005
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 07718bb..657d65d 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -1502,8 +1502,10 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
c->cputype = CPU_LOONGSON1;
switch (c->processor_id & PRID_REV_MASK) {
- case PRID_REV_LOONGSON1B:
+ case PRID_REV_LOONGSON1ABC:
+#ifdef CONFIG_CPU_LOONGSON1B
__cpu_name[cpu] = "Loongson 1B";
+#endif
break;
}
diff --git a/arch/mips/loongson32/common/setup.c b/arch/mips/loongson32/common/setup.c
index 1640744..c8e8b3e 100644
--- a/arch/mips/loongson32/common/setup.c
+++ b/arch/mips/loongson32/common/setup.c
@@ -21,7 +21,7 @@ const char *get_system_type(void)
unsigned int processor_id = (¤t_cpu_data)->processor_id;
switch (processor_id & PRID_REV_MASK) {
- case PRID_REV_LOONGSON1B:
+ case PRID_REV_LOONGSON1ABC:
#if defined(CONFIG_LOONGSON1_LS1B)
return "LOONGSON LS1B";
#elif defined(CONFIG_LOONGSON1_LS1C)
--
2.9.3
next prev parent reply other threads:[~2017-06-16 2:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 2:52 [PATCH v7 0/8] MIPS: Loongson: Add the Loongson-1A processor support Binbin Zhou
2017-06-16 2:52 ` Binbin Zhou [this message]
2017-06-16 2:52 ` [PATCH v7 2/8] MIPS: Loongson: Expand Loongson-1's register definition Binbin Zhou
2017-06-16 2:52 ` [PATCH v7 3/8] MIPS: Loongson: Add basic Loongson-1A CPU support Binbin Zhou
2017-06-16 2:52 ` [PATCH v7 4/8] MIPS: Loongson: Add Loongson-1A Kconfig options Binbin Zhou
2017-06-16 2:52 ` [PATCH v7 5/8] MIPS: Loongson: Add platform devices for Loongson-1A Binbin Zhou
2017-06-16 2:52 ` [PATCH v7 6/8] MIPS: Loongson: Add Loongson-1A board support Binbin Zhou
2017-06-16 2:52 ` [PATCH v7 7/8] clk: Loongson: Add Loongson-1A clock support Binbin Zhou
2017-06-19 23:34 ` Stephen Boyd
2017-06-20 4:51 ` zhoubb
2017-06-20 20:44 ` Stephen Boyd
2017-06-16 2:52 ` [PATCH v7 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=1497581573-17258-2-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-clk@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=mturquette@baylibre.com \
--cc=ralf@linux-mips.org \
--cc=sboyd@codeaurora.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