9
0
Fork 0

ARM: rpi: move debug UART base selection to Kconfig

To let the user select the right base, when building multi-image.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Lucas Stach 2017-03-01 15:31:36 +01:00 committed by Sascha Hauer
parent cf2448a584
commit e0e2a4d8cc
2 changed files with 25 additions and 1 deletions

View File

@ -22,4 +22,24 @@ config MACH_RPI2
endchoice
config MACH_RPI_DEBUG_UART_BASE
hex
default 0x20201000 if MACH_RPI_DEBUG_UART_RPI
default 0x3f201000 if MACH_RPI_DEBUG_UART_RPI2
if DEBUG_LL
choice
prompt "Lowlevel debug UART"
config MACH_RPI_DEBUG_UART_RPI
bool "use RaspberryPi 1 compatible base"
config MACH_RPI_DEBUG_UART_RPI2
bool "use RaspberryPi 2 and 3 compatible base"
endchoice
endif
endif

View File

@ -20,7 +20,11 @@
#include <mach/platform.h>
#define DEBUG_LL_UART_ADDR BCM2835_UART0_BASE
#ifndef CONFIG_MACH_RPI_DEBUG_UART_BASE
#define CONFIG_MACH_RPI_DEBUG_UART_BASE 0
#endif
#define DEBUG_LL_UART_ADDR CONFIG_MACH_RPI_DEBUG_UART_BASE
#include <asm/debug_ll_pl011.h>