summaryrefslogtreecommitdiffstats
path: root/debian/patches/features/mips
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/features/mips')
-rw-r--r--debian/patches/features/mips/MIPS-Loongson-3-Add-Loongson-LS3A-RS780E-1-way-machi.patch65
-rw-r--r--debian/patches/features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch29
2 files changed, 94 insertions, 0 deletions
diff --git a/debian/patches/features/mips/MIPS-Loongson-3-Add-Loongson-LS3A-RS780E-1-way-machi.patch b/debian/patches/features/mips/MIPS-Loongson-3-Add-Loongson-LS3A-RS780E-1-way-machi.patch
new file mode 100644
index 000000000..73f420b6c
--- /dev/null
+++ b/debian/patches/features/mips/MIPS-Loongson-3-Add-Loongson-LS3A-RS780E-1-way-machi.patch
@@ -0,0 +1,65 @@
+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
+Forwarded: no
+
+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>
+[bwh: Forward-ported to 4.2]
+---
+ 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 +
+ 4 files changed, 4 insertions(+)
+
+Index: linux/arch/mips/include/asm/bootinfo.h
+===================================================================
+--- linux.orig/arch/mips/include/asm/bootinfo.h
++++ linux/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
+ };
+
+Index: linux/arch/mips/loongson64/common/machtype.c
+===================================================================
+--- linux.orig/arch/mips/loongson64/common/machtype.c
++++ linux/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,
+ };
+
+Index: linux/arch/mips/loongson64/common/serial.c
+===================================================================
+--- linux.orig/arch/mips/loongson64/common/serial.c
++++ linux/arch/mips/loongson64/common/serial.c
+@@ -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] = {},
+ };
+
+Index: linux/arch/mips/loongson64/common/uart_base.c
+===================================================================
+--- linux.orig/arch/mips/loongson64/common/uart_base.c
++++ linux/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;
diff --git a/debian/patches/features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch b/debian/patches/features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch
new file mode 100644
index 000000000..3de14026f
--- /dev/null
+++ b/debian/patches/features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch
@@ -0,0 +1,29 @@
+From: Aurelien Jarno <aurelien@aurel32.net>
+Subject: MIPS: increase MAX_PHYSMEM_BITS on Loongson 3 only
+Bug-Debian: https://bugs.debian.org/764223
+Forwarded: no
+
+Commit c4617318 broke Loongson-2 support and maybe even more by increasing
+the value of MAX_PHYSMEM_BITS. At it is currently only needed on
+Loongson-3, define it conditionally.
+
+Note: this should be replace by upstream fix when available.
+
+Index: linux/arch/mips/include/asm/sparsemem.h
+===================================================================
+--- linux.orig/arch/mips/include/asm/sparsemem.h
++++ linux/arch/mips/include/asm/sparsemem.h
+@@ -12,7 +12,12 @@
+ #else
+ # define SECTION_SIZE_BITS 28
+ #endif
+-#define MAX_PHYSMEM_BITS 48
++
++#if defined(CONFIG_CPU_LOONGSON3)
++# define MAX_PHYSMEM_BITS 48
++#else
++# define MAX_PHYSMEM_BITS 35
++#endif
+
+ #endif /* CONFIG_SPARSEMEM */
+ #endif /* _MIPS_SPARSEMEM_H */