From: Aurelien Jarno Date: Sun, 20 Jul 2014 17:16:31 +0000 (+0200) Subject: MIPS: Loongson 3: Add Loongson LS3A RS780E 1-way machine definition X-Git-Tag: archive/raspbian/4.9.82-1+deb9u3+rpi1_jessie~8^2~83 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=522decb6e078ce3c878f610c2f16c635c0635f44;p=linux-4.9.git MIPS: Loongson 3: Add Loongson LS3A RS780E 1-way machine definition 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 [bwh: Forward-ported to 4.2] Gbp-Pq: Topic features/mips Gbp-Pq: Name MIPS-Loongson-3-Add-Loongson-LS3A-RS780E-1-way-machi.patch --- diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h index ee9f5f2d18fc..ce8008502913 100644 --- a/arch/mips/include/asm/bootinfo.h +++ b/arch/mips/include/asm/bootinfo.h @@ -71,6 +71,7 @@ enum loongson_machine_type { MACH_LEMOTE_NAS, MACH_LEMOTE_LL2F, MACH_LOONGSON_GENERIC, + MACH_LOONGSON_3A780E1W, MACH_LOONGSON_END }; diff --git a/arch/mips/loongson64/common/machtype.c b/arch/mips/loongson64/common/machtype.c index f2807bc662a3..2b3a0c76a022 100644 --- a/arch/mips/loongson64/common/machtype.c +++ b/arch/mips/loongson64/common/machtype.c @@ -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, }; diff --git a/arch/mips/loongson64/common/serial.c b/arch/mips/loongson64/common/serial.c index ffefc1cb2612..a9373e402bb9 100644 --- a/arch/mips/loongson64/common/serial.c +++ b/arch/mips/loongson64/common/serial.c @@ -48,6 +48,7 @@ static struct plat_serial8250_port uart8250_data[][MAX_UARTS + 1] = { [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] = {}, }; diff --git a/arch/mips/loongson64/common/uart_base.c b/arch/mips/loongson64/common/uart_base.c index 9de559d58e1f..6b1130d2037b 100644 --- a/arch/mips/loongson64/common/uart_base.c +++ b/arch/mips/loongson64/common/uart_base.c @@ -25,6 +25,7 @@ void prom_init_loongson_uart_base(void) { switch (mips_machtype) { case MACH_LOONGSON_GENERIC: + case MACH_LOONGSON_3A780E1W: /* The CPU provided serial port (CPU) */ loongson_uart_base[0] = LOONGSON_REG_BASE + 0x1e0; break;