Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Fix build with DEBUG_ZBOOT and MACH_JZ4770

The debug definitions were missing for MACH_JZ4770, resulting in a build
failure when DEBUG_ZBOOT was set.

Since the UART addresses are the same across all Ingenic SoCs, we just
use a #ifdef CONFIG_MACH_INGENIC instead of checking for individual
Ingenic SoCs.

Additionally, I added a #define for the UART0 address in-code and
dropped the <asm/mach-jz4740/base.h> include, for the reason that this
include file is slowly being phased out as the whole platform is being
moved to devicetree.

Fixes: 9be5f3e92ed5 ("MIPS: ingenic: Initial JZ4770 support")
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 4.16
Patchwork: https://patchwork.linux-mips.org/patch/18957/
Signed-off-by: James Hogan <jhogan@kernel.org>

authored by

Paul Cercueil and committed by
James Hogan
c60128ce 55a2aa08

+3 -3
+3 -3
arch/mips/boot/compressed/uart-16550.c
··· 18 18 #define PORT(offset) (CKSEG1ADDR(AR7_REGS_UART0) + (4 * offset)) 19 19 #endif 20 20 21 - #if defined(CONFIG_MACH_JZ4740) || defined(CONFIG_MACH_JZ4780) 22 - #include <asm/mach-jz4740/base.h> 23 - #define PORT(offset) (CKSEG1ADDR(JZ4740_UART0_BASE_ADDR) + (4 * offset)) 21 + #ifdef CONFIG_MACH_INGENIC 22 + #define INGENIC_UART0_BASE_ADDR 0x10030000 23 + #define PORT(offset) (CKSEG1ADDR(INGENIC_UART0_BASE_ADDR) + (4 * offset)) 24 24 #endif 25 25 26 26 #ifdef CONFIG_CPU_XLR