MIPS: Fix build with DEBUG_ZBOOT and MACH_JZ4770
PATCH 1/1 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 indifidual 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.
--- arch/mips/boot/compressed/uart-16550.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/mips/boot/compressed/uart-16550.c +3 -3
@@ -18,9 +18,9 @@#define PORT (offset) (CKSEG1ADDR(AR7_REGS_UART0) + (4 * offset))#endif -#if defined(CONFIG_MACH_JZ4740 ) || defined(CONFIG_MACH_JZ4780 ) -#include <asm/mach-jz4740/base.h> -#define PORT (offset) (CKSEG1ADDR(JZ4740_UART0_BASE_ADDR) + (4 * offset)) +#if CONFIG_MACH_INGENIC +#define INGENIC_UART0_BASE_ADDR 0x10030000 +#define PORT (offset) (CKSEG1ADDR(INGENIC_UART0_BASE_ADDR) + (4 * offset))#endif #ifdef CONFIG_CPU_XLR
Signature · 1 line
2.11.0
Quoted 3 lines · Paul Cercueil
Since the UART addresses are the same across all Ingenic SoCs, we just use a #ifdef
CONFIG_MACH_INGENICinstead of checking for indifidual Ingenic SoCs.
s/indifidual/individual/
arch/mips/boot/compressed/uart-16550.c line 21
Quoted 10 lines
arch/mips/boot/compressed/uart-16550.c +1
-3@@ -18,9 +18,9 @@#define PORT (offset) (CKSEG1ADDR(AR7_REGS_UART0) + (4 * offset))#endif -#if defined(CONFIG_MACH_JZ4740 ) || defined(CONFIG_MACH_JZ4780 ) -#include <asm/mach-jz4740/base.h> -#define PORT (offset) (CKSEG1ADDR(JZ4740_UART0_BASE_ADDR) + (4 * offset)) +#if CONFIG_MACH_INGENIC
I think you meant #ifdef there.
Cheers
James
Hi,
Quoted 20 lines · James Hogan
Quoted 4 lines · Paul Cercueil
Since the UART addresses are the same across all Ingenic SoCs, we
just
use a #ifdefCONFIG_MACH_INGENICinstead of checking for indifidual Ingenic SoCs.s/indifidual/individual/
Quoted 11 lines
---
a/arch/mips/boot/compressed/uart-16550.c
+++b/arch/mips/boot/compressed/uart-16550.c
@@ -18,9 +18,9 @@
#define PORT(offset) (CKSEG1ADDR(AR7_REGS_UART0)+ (4 * offset)) #endif-#if
defined(CONFIG_MACH_JZ4740)||defined(CONFIG_MACH_JZ4780)-#include <asm/mach-jz4740/base.h>
-#define PORT(offset) (CKSEG1ADDR(JZ4740_UART0_BASE_ADDR)+ (4 *
offset))
+#ifCONFIG_MACH_INGENIC
Quoted 4 lines
I think you meant #ifdef there.
Cheers
James
Oops. Will fix in V2.
-Paul