All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: Forcing DEBUG_UART_{PHYS, VIRT} changes when switching between v7 platforms?
Date: Thu, 20 Mar 2014 08:07:52 +0100	[thread overview]
Message-ID: <8099777.qvOx0M5YBS@wuerfel> (raw)
In-Reply-To: <CAGVrzcZT+3VuuM9wdLTAu7wtbYTFcwSnMaYE7PcR8Eo4PmTnhg@mail.gmail.com>

On Wednesday 19 March 2014 16:38:45 Florian Fainelli wrote:
> Hi,
> 
> When switching between different Multi v7 platform which all select
> DEBUG_UART_8250, whichever platform managed to set
> DEBUG_UART_{PHYS,VIRT} first will end-up forcing its value to the
> others.
> 
> What I am seeing at the moment is for instance enabling BCM_MOBILE
> will set DEBUG_UART_PHYS to 0x3e000000, disabling BCM_MOBILE and now
> enabling MVEBU won't force a new DEBUG_UART_PHYS address to be
> re-computed.
> 
> Should we add some sort of specific annotation to the Kconfig symbol
> to force a recalculation of the UART PHYS address?

Russell has plans to change the Konfig logic in the future, removing the
platform specific options. With the current code, you could probably
do something along the lines of

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index f72147f..aa20929 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1013,7 +1013,7 @@ config DEBUG_UART_8250
 		ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC
 
 config DEBUG_UART_PHYS
-	hex "Physical base address of debug UART"
+	hex
 	default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0
 	default 0x01c28000 if DEBUG_SUNXI_UART0
 	default 0x01c28400 if DEBUG_SUNXI_UART1
@@ -1074,7 +1074,7 @@ config DEBUG_UART_PHYS
 		DEBUG_UART_8250 || DEBUG_UART_PL01X
 
 config DEBUG_UART_VIRT
-	hex "Virtual base address of debug UART"
+	hex
 	default 0xe0010fe0 if ARCH_RPC
 	default 0xf0000be0 if ARCH_EBSA110
 	default 0xf0009000 if DEBUG_CNS3XXX

with some extra logic to still allow you to enter the values
manually if not set by default, but that probably wouldn't work
any more when the rework is done.

	Arnd

  reply	other threads:[~2014-03-20  7:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 23:38 Forcing DEBUG_UART_{PHYS, VIRT} changes when switching between v7 platforms? Florian Fainelli
2014-03-20  7:07 ` Arnd Bergmann [this message]
2014-03-20 10:11   ` Russell King - ARM Linux
2014-03-20 11:45     ` Arnd Bergmann
2014-03-20 12:46       ` Russell King - ARM Linux
2014-04-14 14:25         ` Domenico Andreoli
2014-03-20 18:22   ` Florian Fainelli
2014-03-20 18:26     ` Russell King - ARM Linux
2014-03-20 13:36 ` Rob Herring

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=8099777.qvOx0M5YBS@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.