2014-07-20 17:47:13 +00:00
|
|
|
From: Aurelien Jarno <aurelien@aurel32.net>
|
|
|
|
Date: Sun, 20 Jul 2014 19:16:31 +0200
|
|
|
|
Subject: MIPS: Loongson 3: Add Loongson LS3A RS780E 1-way machine definition
|
2014-11-06 00:23:59 +00:00
|
|
|
Forwarded: no
|
2014-07-20 17:47:13 +00:00
|
|
|
|
|
|
|
Add a Loongson LS3A RS780E 1-way machine definition, which only differs
|
|
|
|
from other Loongson 3 based machines by the UART base clock speed.
|
|
|
|
|
|
|
|
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
2015-08-04 01:30:23 +00:00
|
|
|
[bwh: Forward-ported to 4.2]
|
2014-07-20 17:47:13 +00:00
|
|
|
---
|
2015-08-04 01:30:23 +00:00
|
|
|
arch/mips/include/asm/bootinfo.h | 1 +
|
|
|
|
arch/mips/loongson64/common/machtype.c | 1 +
|
|
|
|
arch/mips/loongson64/common/serial.c | 1 +
|
|
|
|
arch/mips/loongson64/common/uart_base.c | 1 +
|
2014-07-20 17:47:13 +00:00
|
|
|
4 files changed, 4 insertions(+)
|
|
|
|
|
|
|
|
--- a/arch/mips/include/asm/bootinfo.h
|
|
|
|
+++ b/arch/mips/include/asm/bootinfo.h
|
2015-02-10 01:13:04 +00:00
|
|
|
@@ -71,6 +71,7 @@ enum loongson_machine_type {
|
|
|
|
MACH_LEMOTE_NAS,
|
|
|
|
MACH_LEMOTE_LL2F,
|
|
|
|
MACH_LOONGSON_GENERIC,
|
2014-07-20 17:47:13 +00:00
|
|
|
+ MACH_LOONGSON_3A780E1W,
|
|
|
|
MACH_LOONGSON_END
|
|
|
|
};
|
|
|
|
|
2015-08-04 01:30:23 +00:00
|
|
|
--- a/arch/mips/loongson64/common/machtype.c
|
|
|
|
+++ b/arch/mips/loongson64/common/machtype.c
|
2015-02-10 01:13:04 +00:00
|
|
|
@@ -28,6 +28,7 @@ static const char *system_types[] = {
|
|
|
|
[MACH_LEMOTE_NAS] = "lemote-nas-2f",
|
|
|
|
[MACH_LEMOTE_LL2F] = "lemote-lynloong-2f",
|
|
|
|
[MACH_LOONGSON_GENERIC] = "generic-loongson-machine",
|
|
|
|
+ [MACH_LOONGSON_3A780E1W] = "loongson-ls3a-rs780e-1w",
|
|
|
|
[MACH_LOONGSON_END] = NULL,
|
2014-07-20 17:47:13 +00:00
|
|
|
};
|
|
|
|
|
2015-08-04 01:30:23 +00:00
|
|
|
--- a/arch/mips/loongson64/common/serial.c
|
|
|
|
+++ b/arch/mips/loongson64/common/serial.c
|
2015-02-10 01:13:04 +00:00
|
|
|
@@ -48,6 +48,7 @@ static struct plat_serial8250_port uart8
|
|
|
|
[MACH_LEMOTE_NAS] = {PORT_M(3, 3686400), {} },
|
|
|
|
[MACH_LEMOTE_LL2F] = {PORT(3, 1843200), {} },
|
|
|
|
[MACH_LOONGSON_GENERIC] = {PORT_M(2, 25000000), {} },
|
|
|
|
+ [MACH_LOONGSON_3A780E1W] = {PORT_M(2, 33177600), {} },
|
|
|
|
[MACH_LOONGSON_END] = {},
|
2014-07-20 17:47:13 +00:00
|
|
|
};
|
|
|
|
|
2015-08-04 01:30:23 +00:00
|
|
|
--- a/arch/mips/loongson64/common/uart_base.c
|
|
|
|
+++ b/arch/mips/loongson64/common/uart_base.c
|
2015-02-10 01:13:04 +00:00
|
|
|
@@ -25,6 +25,7 @@ void prom_init_loongson_uart_base(void)
|
|
|
|
{
|
|
|
|
switch (mips_machtype) {
|
|
|
|
case MACH_LOONGSON_GENERIC:
|
2014-07-20 17:47:13 +00:00
|
|
|
+ case MACH_LOONGSON_3A780E1W:
|
|
|
|
/* The CPU provided serial port (CPU) */
|
2015-02-10 01:13:04 +00:00
|
|
|
loongson_uart_base[0] = LOONGSON_REG_BASE + 0x1e0;
|
2014-07-20 17:47:13 +00:00
|
|
|
break;
|