From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 8/9] ARM: rpi: move debug UART base selection to Kconfig
Date: Wed, 1 Mar 2017 15:31:36 +0100 [thread overview]
Message-ID: <20170301143137.11570-8-l.stach@pengutronix.de> (raw)
In-Reply-To: <20170301143137.11570-1-l.stach@pengutronix.de>
To let the user select the right base, when building multi-image.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
arch/arm/mach-bcm283x/Kconfig | 20 ++++++++++++++++++++
arch/arm/mach-bcm283x/include/mach/debug_ll.h | 6 +++++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig
index d9be1a9b65c1..bb4fe95ab2f1 100644
--- a/arch/arm/mach-bcm283x/Kconfig
+++ b/arch/arm/mach-bcm283x/Kconfig
@@ -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
diff --git a/arch/arm/mach-bcm283x/include/mach/debug_ll.h b/arch/arm/mach-bcm283x/include/mach/debug_ll.h
index be93cd95ad46..a625a8bdb71d 100644
--- a/arch/arm/mach-bcm283x/include/mach/debug_ll.h
+++ b/arch/arm/mach-bcm283x/include/mach/debug_ll.h
@@ -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>
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2017-03-01 14:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-01 14:31 [PATCH 1/9] ARM: rpi: move model initialisation to rpi-common Lucas Stach
2017-03-01 14:31 ` [PATCH 2/9] ARM: rpi: move model detection before console init Lucas Stach
2017-03-01 14:31 ` [PATCH 3/9] ARM: rpi: convert mailbox interface to regular driver Lucas Stach
2017-03-01 14:31 ` [PATCH 4/9] ARM: rpi: convert watchdog/reset " Lucas Stach
2017-03-01 14:31 ` [PATCH 5/9] clocksource: bcm2835: use clock-frequency property when available Lucas Stach
2017-03-01 14:31 ` [PATCH 6/9] mci-bcm2835: enable devicetree probing Lucas Stach
2017-03-01 14:31 ` [PATCH 7/9] ARM: rpi: always build relocatable image Lucas Stach
2017-03-01 14:31 ` Lucas Stach [this message]
2017-03-01 14:31 ` [PATCH 9/9] ARM: rpi: switch to DT probe and multi-image build Lucas Stach
2017-03-02 8:11 ` [PATCH 1/9] ARM: rpi: move model initialisation to rpi-common Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170301143137.11570-8-l.stach@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox