From: Paul Cercueil <paul@crapouillou.net>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Rob Herring <robh+dt@kernel.org>
Cc: 周琰杰 <zhouyanjie@wanyeetech.com>,
od@zcrc.me, linux-mips@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
"Paul Cercueil" <paul@crapouillou.net>
Subject: [PATCH 4/7] MIPS: ingenic: Use enum instead of macros for Ingenic SoCs
Date: Tue, 23 Jun 2020 20:24:29 +0200 [thread overview]
Message-ID: <20200623182432.187843-4-paul@crapouillou.net> (raw)
In-Reply-To: <20200623182432.187843-1-paul@crapouillou.net>
Use an enum instead of macros to represent the various versions of the
Ingenic SoCs, and add some of the SoC versions that were previously
missing.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
arch/mips/include/asm/bootinfo.h | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h
index c3bd9b2d66e4..26f267d5649f 100644
--- a/arch/mips/include/asm/bootinfo.h
+++ b/arch/mips/include/asm/bootinfo.h
@@ -65,12 +65,22 @@ enum loongson2ef_machine_type {
/*
* Valid machtype for group INGENIC
*/
-#define MACH_INGENIC_JZ4730 0 /* JZ4730 SOC */
-#define MACH_INGENIC_JZ4740 1 /* JZ4740 SOC */
-#define MACH_INGENIC_JZ4770 2 /* JZ4770 SOC */
-#define MACH_INGENIC_JZ4780 3 /* JZ4780 SOC */
-#define MACH_INGENIC_X1000 4 /* X1000 SOC */
-#define MACH_INGENIC_X1830 5 /* X1830 SOC */
+enum ingenic_machine_type {
+ MACH_INGENIC_UNKNOWN,
+ MACH_INGENIC_JZ4720,
+ MACH_INGENIC_JZ4725,
+ MACH_INGENIC_JZ4725B,
+ MACH_INGENIC_JZ4730,
+ MACH_INGENIC_JZ4740,
+ MACH_INGENIC_JZ4750,
+ MACH_INGENIC_JZ4755,
+ MACH_INGENIC_JZ4760,
+ MACH_INGENIC_JZ4770,
+ MACH_INGENIC_JZ4775,
+ MACH_INGENIC_JZ4780,
+ MACH_INGENIC_X1000,
+ MACH_INGENIC_X1830,
+};
extern char *system_type;
const char *get_system_type(void);
--
2.27.0
next prev parent reply other threads:[~2020-06-23 18:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 18:24 [PATCH 1/7] dt-bindings: vendor-prefixes: Add YLM Paul Cercueil
2020-06-23 18:24 ` [PATCH 2/7] dt-bindings: MIPS: Add entry for the YLM RetroMini Paul Cercueil
2020-07-15 19:37 ` Rob Herring
2020-06-23 18:24 ` [PATCH 3/7] dt-bindings: timer/ingenic,tcu: Add compatible strings for JZ4725B SoC Paul Cercueil
2020-07-15 19:37 ` Rob Herring
2020-06-23 18:24 ` Paul Cercueil [this message]
2020-06-23 18:24 ` [PATCH 5/7] MIPS: ingenic: Add support for the " Paul Cercueil
2020-06-23 18:24 ` [PATCH 6/7] MIPS: ingenic: Add support for the RS90 board Paul Cercueil
2020-06-23 18:24 ` [PATCH 7/7] MIPS: ingenic: RS90: Added defconfig Paul Cercueil
2020-07-15 19:37 ` [PATCH 1/7] dt-bindings: vendor-prefixes: Add YLM Rob Herring
2020-07-16 9:39 ` Thomas Bogendoerfer
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=20200623182432.187843-4-paul@crapouillou.net \
--to=paul@crapouillou.net \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=od@zcrc.me \
--cc=robh+dt@kernel.org \
--cc=tsbogend@alpha.franken.de \
--cc=zhouyanjie@wanyeetech.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).