Skip to contentSkip to conversation

Add Lemote NAS and Lynloong support

PATCH In review Wu Zhangjin 2 participants 8 messages Nov 16, 2009 – Nov 17, 2009 MIPS

lore
Share & tools
lore
#0 lore raw

cover Add Lemote NAS and Lynloong support

The following two patches add support for NAS & Lynloong made by Lemote, These two machines are basically the same as fuloong2f, only a few part of differences.

Hi, Ralf, Could you please queue them to 2.6.33? I will delay the left drivers to 2.6.34.

Thanks & Regards,
Wu Zhangjin

Wu Zhangjin (2):
loongson: lemote-2f: add NAS support
loongson: lemote-2f: add lynloong support

 arch/mips/include/asm/bootinfo.h      |    4 +++-
 arch/mips/loongson/common/machtype.c  |    2 ++
 arch/mips/loongson/common/serial.c    |    2 ++
 arch/mips/loongson/common/uart_base.c |    2 ++
 arch/mips/loongson/lemote-2f/reset.c  |    4 ++++
 5 files changed, 13 insertions(+), 1 deletions(-)
#1 lore raw

PATCH 1/2 loongson: lemote-2f: add NAS support

This patch add support to Lemote's Loongson-2F based network attached system.

The kernel support to this machine is almost the same as fuloong2f, the only difference is that it use the serial port provided by loongson2f processor as yeeloong2f does.

---
 arch/mips/include/asm/bootinfo.h      |    3 ++-
 arch/mips/loongson/common/machtype.c  |    1 +
 arch/mips/loongson/common/serial.c    |    1 +
 arch/mips/loongson/common/uart_base.c |    1 +
 arch/mips/loongson/lemote-2f/reset.c  |    2 ++
 5 files changed, 7 insertions(+), 1 deletions(-)
arch/mips/include/asm/bootinfo.h +2 -1
index 07d4115..be28e3b 100644
@@ -67,7 +67,8 @@
 #define MACH_LEMOTE_ML2F7      3
 #define MACH_LEMOTE_YL2F89     4
 #define MACH_DEXXON_GDIUM2F10  5
-#define MACH_LOONGSON_END      6
+#define MACH_LEMOTE_NAS        6
+#define MACH_LOONGSON_END      7
 
 extern char *system_type;
 const char *get_system_type(void);
arch/mips/loongson/common/machtype.c +1 -0
index 87b502f..6f77a73 100644
@@ -22,6 +22,7 @@ static const char *system_types[] = {
 	[MACH_LEMOTE_ML2F7]             "lemote-mengloong-2f-7inches",
 	[MACH_LEMOTE_YL2F89]            "lemote-yeeloong-2f-8.9inches",
 	[MACH_DEXXON_GDIUM2F10]         "dexxon-gidum-2f-10inches",
+	[MACH_LEMOTE_NAS]		"lemote-nas-2f",
 	[MACH_LOONGSON_END]             NULL,
 };
 
arch/mips/loongson/common/serial.c +1 -0
index dc6488c..45601e4 100644
@@ -45,6 +45,7 @@ static struct plat_serial8250_port uart8250_data[][2] = {
 	[MACH_LEMOTE_ML2F7]             {PORT_M(3), {} },
 	[MACH_LEMOTE_YL2F89]            {PORT_M(3), {} },
 	[MACH_DEXXON_GDIUM2F10]         {PORT_M(3), {} },
+	[MACH_LEMOTE_NAS]               {PORT_M(3), {} },
 	[MACH_LOONGSON_END]             {},
 };
 
arch/mips/loongson/common/uart_base.c +1 -0
index c3db78a..1ab7309 100644
@@ -23,6 +23,7 @@ unsigned long __maybe_unused uart8250_base[] = {
 	[MACH_LEMOTE_ML2F7]	(LOONGSON_LIO1_BASE + 0x3f8),
 	[MACH_LEMOTE_YL2F89]	(LOONGSON_LIO1_BASE + 0x3f8),
 	[MACH_DEXXON_GDIUM2F10]	(LOONGSON_LIO1_BASE + 0x3f8),
+	[MACH_LEMOTE_NAS]	(LOONGSON_LIO1_BASE + 0x3f8),
 	[MACH_LOONGSON_END]	0,
 };
 EXPORT_SYMBOL(uart8250_base);
arch/mips/loongson/lemote-2f/reset.c +2 -0
index 0458a1c..980299d 100644
@@ -141,6 +141,7 @@ void mach_prepare_reboot(void)
 {
 	switch (mips_machtype) {
 	case MACH_LEMOTE_FL2F:
+	case MACH_LEMOTE_NAS:
 		fl2f_reboot();
 		break;
 	case MACH_LEMOTE_ML2F7:
@@ -158,6 +159,7 @@ void mach_prepare_shutdown(void)
 {
 	switch (mips_machtype) {
 	case MACH_LEMOTE_FL2F:
+	case MACH_LEMOTE_NAS:
 		fl2f_shutdown();
 		break;
 	case MACH_LEMOTE_ML2F7:
Signature · 1 line
1.6.2.1
#2 lore raw

PATCH 2/2 loongson: lemote-2f: add lynloong support

This patch add a new machtype and kernel options for lynloong, which can help to select lynloong specific source code and tell users which type of machine they are using via the /proc/cpuinfo interface.

---
 arch/mips/include/asm/bootinfo.h      |    3 ++-
 arch/mips/loongson/common/machtype.c  |    1 +
 arch/mips/loongson/common/serial.c    |    1 +
 arch/mips/loongson/common/uart_base.c |    1 +
 arch/mips/loongson/lemote-2f/reset.c  |    2 ++
 5 files changed, 7 insertions(+), 1 deletions(-)
arch/mips/include/asm/bootinfo.h +2 -1
index be28e3b..09eee09 100644
@@ -68,7 +68,8 @@
 #define MACH_LEMOTE_YL2F89     4
 #define MACH_DEXXON_GDIUM2F10  5
 #define MACH_LEMOTE_NAS        6
-#define MACH_LOONGSON_END      7
+#define MACH_LEMOTE_LL2F       7
+#define MACH_LOONGSON_END      8
 
 extern char *system_type;
 const char *get_system_type(void);
arch/mips/loongson/common/machtype.c +1 -0
index 6f77a73..2a46b4d 100644
@@ -23,6 +23,7 @@ static const char *system_types[] = {
 	[MACH_LEMOTE_YL2F89]            "lemote-yeeloong-2f-8.9inches",
 	[MACH_DEXXON_GDIUM2F10]         "dexxon-gidum-2f-10inches",
 	[MACH_LEMOTE_NAS]		"lemote-nas-2f",
+	[MACH_LEMOTE_LL2F]              "lemote-lynloong-2f",
 	[MACH_LOONGSON_END]             NULL,
 };
 
arch/mips/loongson/common/serial.c +1 -0
index 45601e4..ea29db0 100644
@@ -46,6 +46,7 @@ static struct plat_serial8250_port uart8250_data[][2] = {
 	[MACH_LEMOTE_YL2F89]            {PORT_M(3), {} },
 	[MACH_DEXXON_GDIUM2F10]         {PORT_M(3), {} },
 	[MACH_LEMOTE_NAS]               {PORT_M(3), {} },
+	[MACH_LEMOTE_LL2F]              {PORT(3), {} },
 	[MACH_LOONGSON_END]             {},
 };
 
arch/mips/loongson/common/uart_base.c +1 -0
index 1ab7309..275bed6 100644
@@ -24,6 +24,7 @@ unsigned long __maybe_unused uart8250_base[] = {
 	[MACH_LEMOTE_YL2F89]	(LOONGSON_LIO1_BASE + 0x3f8),
 	[MACH_DEXXON_GDIUM2F10]	(LOONGSON_LIO1_BASE + 0x3f8),
 	[MACH_LEMOTE_NAS]	(LOONGSON_LIO1_BASE + 0x3f8),
+	[MACH_LEMOTE_LL2F]	(LOONGSON_PCIIO_BASE + 0x2f8),
 	[MACH_LOONGSON_END]	0,
 };
 EXPORT_SYMBOL(uart8250_base);
arch/mips/loongson/lemote-2f/reset.c +2 -0
index 980299d..44bb984 100644
@@ -142,6 +142,7 @@ void mach_prepare_reboot(void)
 	switch (mips_machtype) {
 	case MACH_LEMOTE_FL2F:
 	case MACH_LEMOTE_NAS:
+	case MACH_LEMOTE_LL2F:
 		fl2f_reboot();
 		break;
 	case MACH_LEMOTE_ML2F7:
@@ -160,6 +161,7 @@ void mach_prepare_shutdown(void)
 	switch (mips_machtype) {
 	case MACH_LEMOTE_FL2F:
 	case MACH_LEMOTE_NAS:
+	case MACH_LEMOTE_LL2F:
 		fl2f_shutdown();
 		break;
 	case MACH_LEMOTE_ML2F7:
Signature · 1 line
1.6.2.1
#3 lore raw

Re: [PATCH 2/2] loongson: lemote-2f: add lynloong support

Quoted 3 lines · Wu Zhangjin

This patch add a new machtype and kernel options for lynloong, which can help to select lynloong specific source code and tell users which type of machine they are using via the /proc/cpuinfo interface.

Thanks, queued for 2.6.33.

Ralf

#4 lore raw

Re: [PATCH 1/2] loongson: lemote-2f: add NAS support

In reply to Wu Zhangjin
Quoted 6 lines · Wu Zhangjin

This patch add support to Lemote's Loongson-2F based network attached system.

The kernel support to this machine is almost the same as fuloong2f, the only difference is that it use the serial port provided by loongson2f processor as yeeloong2f does.

Thanks, queue for 2.6.33.

Ralf

#5 lore raw
In reply to Wu Zhangjin
Quoted 6 lines · Wu Zhangjin

The following two patches add support for NAS & Lynloong made by Lemote, These two machines are basically the same as fuloong2f, only a few part of differences.

Hi, Ralf, Could you please queue them to 2.6.33? I will delay the left drivers to 2.6.34.

What driver patches you got pending?

Ralf

#6 lore raw
Quoted 10 lines · Ralf Baechle
Quoted 6 lines · Wu Zhangjin

The following two patches add support for NAS & Lynloong made by Lemote, These two machines are basically the same as fuloong2f, only a few part of differences.

Hi, Ralf, Could you please queue them to 2.6.33? I will delay the left drivers to 2.6.34.

What driver patches you got pending?

the CPUFreq driver for loongson2f and the platform drivers for yeeloong2f netbook and lynloong pc.

is the time enough to upstream them? and again, where should I put the platform drivers in(I have incorporated with your feedbacks)? in arch/mips or drivers/platform/mips ?

and I will send the lastest CPUFreq driver asap.

Best Regards,
Wu Zhangjin

#7 lore raw
Quoted 4 lines · Wu Zhangjin
Quoted 1 line

What driver patches you got pending?

the CPUFreq driver for loongson2f and the platform drivers for yeeloong2f netbook and lynloong pc.

The CPU frequency scaling patches I applied.

Quoted 1 line

is the time enough to upstream them? and again, where should I put the

Well, we should come to an end.

Quoted 2 lines

platform drivers in(I have incorporated with your feedbacks)? in arch/mips or drivers/platform/mips ?

I think in arch/mips/loongson/ is probably the best place.

Ralf