diff mbox series

[v2,1/2] MIPS: Ingenic: Add system type for new Ingenic SoCs.

Message ID 20200921174522.33866-2-zhouyanjie@wanyeetech.com (mailing list archive)
State Superseded
Headers show
Series [v2,1/2] MIPS: Ingenic: Add system type for new Ingenic SoCs. | expand

Commit Message

Zhou Yanjie Sept. 21, 2020, 5:45 p.m. UTC
Add JZ4775, X1000E, X2000, and X2000E system type for cat /proc/cpuinfo
to give out JZ4775, X1000E, X2000 and X2000E.

Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
---

Notes:
    v1->v2:
    1.Add system type for JZ4775, X2000, and X2000E.
    2.Add Paul Cercueil's Reviewed-by.

 arch/mips/generic/board-ingenic.c | 12 ++++++++++++
 arch/mips/include/asm/bootinfo.h  |  2 ++
 2 files changed, 14 insertions(+)

Comments

Thomas Bogendoerfer Sept. 21, 2020, 8:13 p.m. UTC | #1
On Tue, Sep 22, 2020 at 01:45:21AM +0800, 周琰杰 (Zhou Yanjie) wrote:
> @@ -56,9 +64,13 @@ static const struct of_device_id ingenic_of_match[] __initconst = {
>  	{ .compatible = "ingenic,jz4740", .data = (void *)MACH_INGENIC_JZ4740 },
>  	{ .compatible = "ingenic,jz4725b", .data = (void *)MACH_INGENIC_JZ4725B },
>  	{ .compatible = "ingenic,jz4770", .data = (void *)MACH_INGENIC_JZ4770 },
> +	{ .compatible = "ingenic,jz4775", .data = (void *)MACH_INGENIC_JZ4775 },
>  	{ .compatible = "ingenic,jz4780", .data = (void *)MACH_INGENIC_JZ4780 },
>  	{ .compatible = "ingenic,x1000", .data = (void *)MACH_INGENIC_X1000 },
> +	{ .compatible = "ingenic,x1000e", .data = (void *)MACH_INGENIC_X1000E },
>  	{ .compatible = "ingenic,x1830", .data = (void *)MACH_INGENIC_X1830 },
> +	{ .compatible = "ingenic,x2000", .data = (void *)MACH_INGENIC_X2000 },
> +	{ .compatible = "ingenic,x2000e", .data = (void *)MACH_INGENIC_X2000E },

I get a warning from checkpatch:

WARNING: DT compatible string "ingenic,x2000e" appears un-documented -- check ./Documentation/devicetree/bindings/

Thomas.
Zhou Yanjie Sept. 22, 2020, 12:59 a.m. UTC | #2
Hello Thomas,

在 2020/9/22 上午4:13, Thomas Bogendoerfer 写道:
> On Tue, Sep 22, 2020 at 01:45:21AM +0800, 周琰杰 (Zhou Yanjie) wrote:
>> @@ -56,9 +64,13 @@ static const struct of_device_id ingenic_of_match[] __initconst = {
>>   	{ .compatible = "ingenic,jz4740", .data = (void *)MACH_INGENIC_JZ4740 },
>>   	{ .compatible = "ingenic,jz4725b", .data = (void *)MACH_INGENIC_JZ4725B },
>>   	{ .compatible = "ingenic,jz4770", .data = (void *)MACH_INGENIC_JZ4770 },
>> +	{ .compatible = "ingenic,jz4775", .data = (void *)MACH_INGENIC_JZ4775 },
>>   	{ .compatible = "ingenic,jz4780", .data = (void *)MACH_INGENIC_JZ4780 },
>>   	{ .compatible = "ingenic,x1000", .data = (void *)MACH_INGENIC_X1000 },
>> +	{ .compatible = "ingenic,x1000e", .data = (void *)MACH_INGENIC_X1000E },
>>   	{ .compatible = "ingenic,x1830", .data = (void *)MACH_INGENIC_X1830 },
>> +	{ .compatible = "ingenic,x2000", .data = (void *)MACH_INGENIC_X2000 },
>> +	{ .compatible = "ingenic,x2000e", .data = (void *)MACH_INGENIC_X2000E },
> I get a warning from checkpatch:
>
> WARNING: DT compatible string "ingenic,x2000e" appears un-documented -- check ./Documentation/devicetree/bindings/


My fault, I will fix this in the next version.

Thanks and best regards!

> Thomas.
>
diff mbox series

Patch

diff --git a/arch/mips/generic/board-ingenic.c b/arch/mips/generic/board-ingenic.c
index 0d7de8f9713d..0cec0bea13d6 100644
--- a/arch/mips/generic/board-ingenic.c
+++ b/arch/mips/generic/board-ingenic.c
@@ -21,12 +21,20 @@ 
 static __init char *ingenic_get_system_type(unsigned long machtype)
 {
 	switch (machtype) {
+	case MACH_INGENIC_X2000E:
+		return "X2000E";
+	case MACH_INGENIC_X2000:
+		return "X2000";
 	case MACH_INGENIC_X1830:
 		return "X1830";
+	case MACH_INGENIC_X1000E:
+		return "X1000E";
 	case MACH_INGENIC_X1000:
 		return "X1000";
 	case MACH_INGENIC_JZ4780:
 		return "JZ4780";
+	case MACH_INGENIC_JZ4775:
+		return "JZ4775";
 	case MACH_INGENIC_JZ4770:
 		return "JZ4770";
 	case MACH_INGENIC_JZ4725B:
@@ -56,9 +64,13 @@  static const struct of_device_id ingenic_of_match[] __initconst = {
 	{ .compatible = "ingenic,jz4740", .data = (void *)MACH_INGENIC_JZ4740 },
 	{ .compatible = "ingenic,jz4725b", .data = (void *)MACH_INGENIC_JZ4725B },
 	{ .compatible = "ingenic,jz4770", .data = (void *)MACH_INGENIC_JZ4770 },
+	{ .compatible = "ingenic,jz4775", .data = (void *)MACH_INGENIC_JZ4775 },
 	{ .compatible = "ingenic,jz4780", .data = (void *)MACH_INGENIC_JZ4780 },
 	{ .compatible = "ingenic,x1000", .data = (void *)MACH_INGENIC_X1000 },
+	{ .compatible = "ingenic,x1000e", .data = (void *)MACH_INGENIC_X1000E },
 	{ .compatible = "ingenic,x1830", .data = (void *)MACH_INGENIC_X1830 },
+	{ .compatible = "ingenic,x2000", .data = (void *)MACH_INGENIC_X2000 },
+	{ .compatible = "ingenic,x2000e", .data = (void *)MACH_INGENIC_X2000E },
 	{}
 };
 
diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h
index 147c9327ce04..6dd173a22aeb 100644
--- a/arch/mips/include/asm/bootinfo.h
+++ b/arch/mips/include/asm/bootinfo.h
@@ -79,8 +79,10 @@  enum ingenic_machine_type {
 	MACH_INGENIC_JZ4775,
 	MACH_INGENIC_JZ4780,
 	MACH_INGENIC_X1000,
+	MACH_INGENIC_X1000E,
 	MACH_INGENIC_X1830,
 	MACH_INGENIC_X2000,
+	MACH_INGENIC_X2000E,
 };
 
 extern char *system_type;