diff mbox

arm/imx: use Kconfig choice for low-level debug UART selection

Message ID 1484610.g1p0X99tcV@wuerfel
State New
Headers show

Commit Message

Arnd Bergmann Nov. 22, 2011, 9:19 p.m. UTC
On Tuesday 22 November 2011 20:24:25 Russell King - ARM Linux wrote:
> On Tue, Nov 22, 2011 at 04:47:07PM +0000, Mark Brown wrote:
> > On Tue, Nov 22, 2011 at 05:38:12PM +0100, Uwe Kleine-K?nig wrote:
> > > On Tue, Nov 22, 2011 at 03:48:38PM +0000, Russell King - ARM Linux wrote:
> > 
> > > > > Ah, I see the problem. It's more subtile than just failure to build: it
> > > > > autoselects DEBUG_ICEDCC then.
> > 
> > > > At this point, I think the right answer is to remove the option in
> > > > linux-next, and tell anyone who complains that they need to convert
> > > > their platform properly.  (We're going to need them converted in this
> > > > way anyway for the single zImage project.)
> > 
> > > I agree.
> > 
> > It'd be nice if things could be arranged so that the build breaks rather
> > than selecting ICEDCC on unconverted platforms - when you run into the
> > problem it's not that easy to diagnose.
> 
> Well, we could leave the choice as is, and make the NONE option cause a
> #error.

In my randconfig branch, I have a temporary patch doing


We can also move ICEDCC to the bottom of the list to ensure that the default
choice is a platform specific one.

In order to make the conversion nicer (avoiding a conflicting patch
every time someone adds "depends on !MY_PLATFORM", how about expressing
it as this:

	config DEBUG_LL_UART_NONE
		depends on !DEBUG_LL_LEGACY

and then selecting DEBUG_LL_LEGACY from all platforms that do their own
thing. That would avoid the possible randconfig errors.

	Arnd

Comments

Mark Brown Nov. 22, 2011, 11 p.m. UTC | #1
On Tue, Nov 22, 2011 at 10:19:53PM +0100, Arnd Bergmann wrote:

> and then selecting DEBUG_LL_LEGACY from all platforms that do their own
> thing. That would avoid the possible randconfig errors.

Your fix seems good to me, and avoids causing hassle for randconfig
folks, though Russell's will be more likely to encourage people to
convert I guess.
Will Deacon Nov. 23, 2011, 10:57 a.m. UTC | #2
On Tue, Nov 22, 2011 at 11:00:31PM +0000, Mark Brown wrote:
> On Tue, Nov 22, 2011 at 10:19:53PM +0100, Arnd Bergmann wrote:
> 
> > and then selecting DEBUG_LL_LEGACY from all platforms that do their own
> > thing. That would avoid the possible randconfig errors.
> 
> Your fix seems good to me, and avoids causing hassle for randconfig
> folks, though Russell's will be more likely to encourage people to
> convert I guess.

Although Russell's approach is a build breaker for those platforms that have
not yet made the switch, that does provide an incentive for the platform
maintainers to update their code. If we settle for a legacy solution it will
probably sit around forever.

Given that we're now past -rc2, it might be best to wait until the next
merge window to introduce the #error logic, so the LEGACY solution could be
a stopgap for 3.2.

Will
diff mbox

Patch

--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -83,6 +83,8 @@  choice
        depends on DEBUG_LL
 
        config DEBUG_LL_UART_NONE
+               depends on !FOOTBRIDGE && !ARCH_CLPS711X && !ARCH_MXC && \
+                          !PLAT_SAMSUNG && !ARCH_REALVIEW && !ARCH_HIGHBANK
                bool "No low-level debugging UART"
                help
                  Say Y here if your platform doesn't provide a UART option