MIPS: Lemote 2F: Add NAS support
Kernel support for this machine is almost the same as Fuloong 2F; the only
difference is that it uses the serial port provided by Loongson 2F processor
as Yeeloong 2F does.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/656/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h
index 07d4115..be28e3b 100644
--- a/arch/mips/include/asm/bootinfo.h
+++ b/arch/mips/include/asm/bootinfo.h
@@ -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);
diff --git a/arch/mips/loongson/common/machtype.c b/arch/mips/loongson/common/machtype.c
index 7545fe6..d57e1f4 100644
--- a/arch/mips/loongson/common/machtype.c
+++ b/arch/mips/loongson/common/machtype.c
@@ -25,6 +25,7 @@
[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,
};
diff --git a/arch/mips/loongson/common/serial.c b/arch/mips/loongson/common/serial.c
index dc6488c..45601e4 100644
--- a/arch/mips/loongson/common/serial.c
+++ b/arch/mips/loongson/common/serial.c
@@ -45,6 +45,7 @@
[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] {},
};
diff --git a/arch/mips/loongson/common/uart_base.c b/arch/mips/loongson/common/uart_base.c
index 233c708..e34d699 100644
--- a/arch/mips/loongson/common/uart_base.c
+++ b/arch/mips/loongson/common/uart_base.c
@@ -23,6 +23,7 @@
[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);
diff --git a/arch/mips/loongson/lemote-2f/reset.c b/arch/mips/loongson/lemote-2f/reset.c
index 0458a1c..980299d 100644
--- a/arch/mips/loongson/lemote-2f/reset.c
+++ b/arch/mips/loongson/lemote-2f/reset.c
@@ -141,6 +141,7 @@
{
switch (mips_machtype) {
case MACH_LEMOTE_FL2F:
+ case MACH_LEMOTE_NAS:
fl2f_reboot();
break;
case MACH_LEMOTE_ML2F7:
@@ -158,6 +159,7 @@
{
switch (mips_machtype) {
case MACH_LEMOTE_FL2F:
+ case MACH_LEMOTE_NAS:
fl2f_shutdown();
break;
case MACH_LEMOTE_ML2F7: