]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
MIPS: boot: Support specifying UART port on Ingenic SoCs
authorPaul Cercueil <paul@crapouillou.net>
Sun, 30 May 2021 17:17:56 +0000 (18:17 +0100)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Tue, 1 Jun 2021 09:44:47 +0000 (11:44 +0200)
Allow specifying from the config the UART to use on Ingenic SoCs when
compressed kernel debugging is enabled.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/Kconfig.debug
arch/mips/boot/compressed/uart-16550.c

index f5832a49a88100a891cf8ddfb0982a847de4e11a..43dbf5930796f0281b9ed5ebe9a6f5f7a479501d 100644 (file)
@@ -102,6 +102,14 @@ config DEBUG_ZBOOT
          to reduce the kernel image size and speed up the booting procedure a
          little.
 
+config ZBOOT_INGENIC_UART
+       int "UART to use for compressed kernel debugging"
+       depends on DEBUG_ZBOOT && MACH_INGENIC_SOC
+       default 0
+       range 0 4
+       help
+         Specify the UART that should be used for compressed kernel debugging.
+
 config SPINLOCK_TEST
        bool "Enable spinlock timing tests in debugfs"
        depends on DEBUG_FS
index aee8d7b8f09143fd8e4ce30a9552bf827ec357e4..c18d7f72d9d9ca0684ad9f3780dcdf95fab92e77 100644 (file)
@@ -19,8 +19,8 @@
 #endif
 
 #ifdef CONFIG_MACH_INGENIC
-#define INGENIC_UART0_BASE_ADDR        0x10030000
-#define PORT(offset) (CKSEG1ADDR(INGENIC_UART0_BASE_ADDR) + (4 * offset))
+#define INGENIC_UART_BASE_ADDR (0x10030000 + 0x1000 * CONFIG_ZBOOT_INGENIC_UART)
+#define PORT(offset) (CKSEG1ADDR(INGENIC_UART_BASE_ADDR) + (4 * offset))
 #endif
 
 #ifdef CONFIG_CPU_XLR