linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: fix DEBUG_UART_PHYS/VIRT issue when modifying DEBUG_LL output
@ 2015-01-13 10:37 Boris Brezillon
  2015-06-17 12:46 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Boris Brezillon @ 2015-01-13 10:37 UTC (permalink / raw)
  To: linux-arm-kernel

The DEBUG_UART_PHYS/VIRT value can only be automatically set once
(automatically means set from the DEBUG_<SOC_ID>_<UART_ID> option), which
prevents re-configuring the earlyprintk output for another platform once
the DEBUG_LL output has been selected.

Add a new boolean option (DEBUG_CUSTOM_UART_ADDR) enabling custom phys and
virt address setting (configured through DEBUG_CUSTOM_UART_PHYS/VIRT
options), and make DEBUG_UART_PHYS/VIRT hidden so that they will always be
set from one of the 'default' definitions, and thus will be overwritten
each time you change the DEBUG_LL output.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
Hello,

I know there is some WIP on DEBUG_LL and multi-platform [1], but from my
understanding (tell me if I'm wrong), it does not address this "select once
keep forever" issue.

Best Regards,

Boris


[1]https://lkml.org/lkml/2015/1/5/275

 arch/arm/Kconfig.debug | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 5ddd490..54ee0f3 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1227,8 +1227,22 @@ config DEBUG_UART_8250
 config DEBUG_UART_BCM63XX
 	def_bool ARCH_BCM_63XX
 
-config DEBUG_UART_PHYS
+config DEBUG_CUSTOM_UART_ADDR
+	bool "Custom phys and virt address for debug uart"
+
+config DEBUG_CUSTOM_UART_PHYS
 	hex "Physical base address of debug UART"
+	depends on DEBUG_CUSTOM_UART_ADDR
+	default 0x0
+
+config DEBUG_CUSTOM_UART_VIRT
+	hex "Virtual base address of debug UART"
+	depends on DEBUG_CUSTOM_UART_ADDR
+	default 0x0
+
+config DEBUG_UART_PHYS
+	hex
+	default DEBUG_CUSTOM_UART_PHYS if DEBUG_CUSTOM_UART_ADDR
 	default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0
 	default 0x01c28000 if DEBUG_SUNXI_UART0
 	default 0x01c28400 if DEBUG_SUNXI_UART1
@@ -1323,7 +1337,8 @@ config DEBUG_UART_PHYS
 		DEBUG_UART_BCM63XX || DEBUG_ASM9260_UART
 
 config DEBUG_UART_VIRT
-	hex "Virtual base address of debug UART"
+	hex
+	default DEBUG_CUSTOM_UART_VIRT if MMU && DEBUG_CUSTOM_UART_ADDR
 	default 0xe0010fe0 if ARCH_RPC
 	default 0xe1000000 if DEBUG_MSM_UART
 	default 0xf0000be0 if ARCH_EBSA110
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ARM: fix DEBUG_UART_PHYS/VIRT issue when modifying DEBUG_LL output
  2015-01-13 10:37 [PATCH] ARM: fix DEBUG_UART_PHYS/VIRT issue when modifying DEBUG_LL output Boris Brezillon
@ 2015-06-17 12:46 ` Thomas Petazzoni
  2015-06-17 19:40   ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-06-17 12:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On Tue, 13 Jan 2015 11:37:48 +0100, Boris Brezillon wrote:
> The DEBUG_UART_PHYS/VIRT value can only be automatically set once
> (automatically means set from the DEBUG_<SOC_ID>_<UART_ID> option), which
> prevents re-configuring the earlyprintk output for another platform once
> the DEBUG_LL output has been selected.
> 
> Add a new boolean option (DEBUG_CUSTOM_UART_ADDR) enabling custom phys and
> virt address setting (configured through DEBUG_CUSTOM_UART_PHYS/VIRT
> options), and make DEBUG_UART_PHYS/VIRT hidden so that they will always be
> set from one of the 'default' definitions, and thus will be overwritten
> each time you change the DEBUG_LL output.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>

What is the status of this patch? It would actually be quite useful
when switching back and forth between different DEBUG_LL configurations.

Russell, what do you think of the proposed approach?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ARM: fix DEBUG_UART_PHYS/VIRT issue when modifying DEBUG_LL output
  2015-06-17 12:46 ` Thomas Petazzoni
@ 2015-06-17 19:40   ` Russell King - ARM Linux
  2015-06-17 20:10     ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2015-06-17 19:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 17, 2015 at 02:46:56PM +0200, Thomas Petazzoni wrote:
> What is the status of this patch? It would actually be quite useful
> when switching back and forth between different DEBUG_LL configurations.
> 
> Russell, what do you think of the proposed approach?

I'd rather we killed all the defaults, rather than keep trying to fix
these subtle issues.  That was always my goal of converting to this
model anyway.

However, I think it's important not to loose this information (how many
of us with lots of different platforms want to keep on digging through
PDFs to try and find this documentation?)  I'd like to see a per-SoC
file somewhere in Documentation/arm/ giving these details so at least
they're relatively easy to find.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ARM: fix DEBUG_UART_PHYS/VIRT issue when modifying DEBUG_LL output
  2015-06-17 19:40   ` Russell King - ARM Linux
@ 2015-06-17 20:10     ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-06-17 20:10 UTC (permalink / raw)
  To: linux-arm-kernel

Russell,

On Wed, 17 Jun 2015 20:40:58 +0100, Russell King - ARM Linux wrote:

> > Russell, what do you think of the proposed approach?
> 
> I'd rather we killed all the defaults, rather than keep trying to fix
> these subtle issues.  That was always my goal of converting to this
> model anyway.
> 
> However, I think it's important not to loose this information (how many
> of us with lots of different platforms want to keep on digging through
> PDFs to try and find this documentation?)  I'd like to see a per-SoC
> file somewhere in Documentation/arm/ giving these details so at least
> they're relatively easy to find.

I personally find having the defaults for various popular platforms
readily available in menuconfig to be a lot easier than having to dig
some documentation to find the appropriate addresses.

I.e, the current way is perfect. It's just that there is no need to
show the physical/virtual addresses if an existing well-known platform
is selected, especially as it causes weird behavior due to how kconfig
works. Which Boris patch is solving.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-17 20:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-13 10:37 [PATCH] ARM: fix DEBUG_UART_PHYS/VIRT issue when modifying DEBUG_LL output Boris Brezillon
2015-06-17 12:46 ` Thomas Petazzoni
2015-06-17 19:40   ` Russell King - ARM Linux
2015-06-17 20:10     ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).