2014-04-04 11:18:06

by Daniel Thompson

[permalink] [raw]
Subject: [PATCH] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

When building a multi_v7_defconfig kernel it is not possible to configure
DEBUG_LL to use any serial device except a ARM Primecell PL01X, or more
accurately and worse, it is possible to configure a different serial
device but KConfig does not honour this request.

The happens because the multi-platform mode may include ARCH_SPEAR13XX
and this forcibly engages DEBUG_UART_PL01X to provide some kind of
compatibility with single platform builds (SPEAr supports both single and
multi-platform). This in turn causes DEBUG_LL_INCLUDE to wedge at
debug/pl01x.S.

Problem is fixed by only deploying the compatibility options for SPEAr
when ARCH_MULTIPLATFORM is not set.

Signed-off-by: Daniel Thompson <[email protected]>
---
arch/arm/Kconfig.debug | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 0531da8..f10c784 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -991,9 +991,9 @@ config DEBUG_LL_INCLUDE
config DEBUG_UART_PL01X
def_bool ARCH_EP93XX || \
ARCH_INTEGRATOR || \
- ARCH_SPEAR3XX || \
- ARCH_SPEAR6XX || \
- ARCH_SPEAR13XX || \
+ (ARCH_SPEAR3XX && !ARCH_MULTIPLATFORM) || \
+ (ARCH_SPEAR6XX && !ARCH_MULTIPLATFORM) || \
+ (ARCH_SPEAR13XX && !ARCH_MULTIPLATFORM) || \
ARCH_VERSATILE

# Compatibility options for 8250
--
1.9.0


2014-04-04 11:39:40

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

On Friday 04 April 2014 12:17:49 Daniel Thompson wrote:
> When building a multi_v7_defconfig kernel it is not possible to configure
> DEBUG_LL to use any serial device except a ARM Primecell PL01X, or more
> accurately and worse, it is possible to configure a different serial
> device but KConfig does not honour this request.
>
> The happens because the multi-platform mode may include ARCH_SPEAR13XX
> and this forcibly engages DEBUG_UART_PL01X to provide some kind of
> compatibility with single platform builds (SPEAr supports both single and
> multi-platform). This in turn causes DEBUG_LL_INCLUDE to wedge at
> debug/pl01x.S.
>
> Problem is fixed by only deploying the compatibility options for SPEAr
> when ARCH_MULTIPLATFORM is not set.

The assumption is actually wrong: SPEAr does not support single
platform builds any more. The PLAT_SPEAR_SINGLE symbol in Kconfig
is a leftover from an earlier patch I did that never got merged,
and we should just remove that.

> Signed-off-by: Daniel Thompson <[email protected]>
> ---
> arch/arm/Kconfig.debug | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 0531da8..f10c784 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -991,9 +991,9 @@ config DEBUG_LL_INCLUDE
> config DEBUG_UART_PL01X
> def_bool ARCH_EP93XX || \
> ARCH_INTEGRATOR || \
> - ARCH_SPEAR3XX || \
> - ARCH_SPEAR6XX || \
> - ARCH_SPEAR13XX || \
> + (ARCH_SPEAR3XX && !ARCH_MULTIPLATFORM) || \
> + (ARCH_SPEAR6XX && !ARCH_MULTIPLATFORM) || \
> + (ARCH_SPEAR13XX && !ARCH_MULTIPLATFORM) || \
> ARCH_VERSATILE

Removing the SPEAR lines seems correct here, but the lines
you add don't make any sense.

Arnd

2014-04-04 14:02:45

by Daniel Thompson

[permalink] [raw]
Subject: Re: [PATCH] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

On 04/04/14 12:39, Arnd Bergmann wrote:
>> Problem is fixed by only deploying the compatibility options for SPEAr
>> when ARCH_MULTIPLATFORM is not set.
>
> The assumption is actually wrong: SPEAr does not support single
> platform builds any more. The PLAT_SPEAR_SINGLE symbol in Kconfig
> is a leftover from an earlier patch I did that never got merged,
> and we should just remove that.

Thanks. I did make a wrong conclusion based on that symbol.


>> ---
>> arch/arm/Kconfig.debug | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
>> index 0531da8..f10c784 100644
>> --- a/arch/arm/Kconfig.debug
>> +++ b/arch/arm/Kconfig.debug
>> @@ -991,9 +991,9 @@ config DEBUG_LL_INCLUDE
>> config DEBUG_UART_PL01X
>> def_bool ARCH_EP93XX || \
>> ARCH_INTEGRATOR || \
>> - ARCH_SPEAR3XX || \
>> - ARCH_SPEAR6XX || \
>> - ARCH_SPEAR13XX || \
>> + (ARCH_SPEAR3XX && !ARCH_MULTIPLATFORM) || \
>> + (ARCH_SPEAR6XX && !ARCH_MULTIPLATFORM) || \
>> + (ARCH_SPEAR13XX && !ARCH_MULTIPLATFORM) || \
>> ARCH_VERSATILE
>
> Removing the SPEAR lines seems correct here, but the lines
> you add don't make any sense.

Will fix.

2014-04-04 14:14:09

by Paul Bolle

[permalink] [raw]
Subject: Re: [PATCH] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

On Fri, 2014-04-04 at 13:39 +0200, Arnd Bergmann wrote:
> The PLAT_SPEAR_SINGLE symbol in Kconfig
> is a leftover from an earlier patch I did that never got merged,
> and we should just remove that.

Correct, see http://thread.gmane.org/gmane.linux.kernel/1646112 . It
seems nothing happened after that. I'm planning on sending a reminder if
PLAT_SPEAR_SINGLE is still mentioned in v3.15-rc1.


Paul Bolle

2014-04-04 14:41:42

by Russell King - ARM Linux

[permalink] [raw]
Subject: Re: [PATCH] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

On Fri, Apr 04, 2014 at 12:17:49PM +0100, Daniel Thompson wrote:
> When building a multi_v7_defconfig kernel it is not possible to configure
> DEBUG_LL to use any serial device except a ARM Primecell PL01X, or more
> accurately and worse, it is possible to configure a different serial
> device but KConfig does not honour this request.
>
> The happens because the multi-platform mode may include ARCH_SPEAR13XX
> and this forcibly engages DEBUG_UART_PL01X to provide some kind of
> compatibility with single platform builds (SPEAr supports both single and
> multi-platform). This in turn causes DEBUG_LL_INCLUDE to wedge at
> debug/pl01x.S.
>
> Problem is fixed by only deploying the compatibility options for SPEAr
> when ARCH_MULTIPLATFORM is not set.

I think it's probably about time we killed the def_bool and just made
this a plain 'bool'. The affected platforms should be using
DEBUG_LL_UART_PL01X by now.

--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

2014-04-04 14:47:47

by Daniel Thompson

[permalink] [raw]
Subject: [PATCH v2] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

When building a multi_v7_defconfig kernel it is not possible to configure
DEBUG_LL to use any serial device except a ARM Primecell PL01X, or more
accurately and worse, it is possible to configure a different serial
device but KConfig does not honour this request.

This happens because DEBUG_UART_PL01X, which is intended to provide some
kind of compatibility with single platform builds, spuriously depends upon
ARCH_SPEAR13XX (and similar SPEAr options).

Problem is fixed by removing problematic dependancies.

Signed-off-by: Daniel Thompson <[email protected]>
---

Notes:
v2: Remove pointless single platform support (thanks Arnd Bergmann)

arch/arm/Kconfig.debug | 3 ---
1 file changed, 3 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 0531da8..e554d35 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -991,9 +991,6 @@ config DEBUG_LL_INCLUDE
config DEBUG_UART_PL01X
def_bool ARCH_EP93XX || \
ARCH_INTEGRATOR || \
- ARCH_SPEAR3XX || \
- ARCH_SPEAR6XX || \
- ARCH_SPEAR13XX || \
ARCH_VERSATILE

# Compatibility options for 8250
--
1.9.0

2014-04-04 14:52:21

by Paul Bolle

[permalink] [raw]
Subject: Re: [PATCH] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

On Fri, 2014-04-04 at 16:14 +0200, Paul Bolle wrote:
> Correct, see http://thread.gmane.org/gmane.linux.kernel/1646112 . It
> seems nothing happened after that. I'm planning on sending a reminder if
> PLAT_SPEAR_SINGLE is still mentioned in v3.15-rc1.

It turns out my patch was incorrect. This chunk

@@ -95,7 +94,6 @@ config MACH_SPEAR600
Supports ST SPEAr600 boards configured via the device-treesource "arch/arm/mach-spear6xx/Kconfig"

config ARCH_SPEAR_AUTO
- def_bool PLAT_SPEAR_SINGLE
depends on !ARCH_SPEAR13XX && !ARCH_SPEAR6XX
select ARCH_SPEAR3XX


is bogus. It leaves ARCH_SPEAR_AUTO without a type. So I'll have to
redo, but I'll wait until v3.15-rc1.


Paul Bolle

2014-04-04 15:18:21

by Daniel Thompson

[permalink] [raw]
Subject: Re: [PATCH] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

On 04/04/14 15:41, Russell King - ARM Linux wrote:
>> The happens because the multi-platform mode may include ARCH_SPEAR13XX
>> and this forcibly engages DEBUG_UART_PL01X to provide some kind of
>> compatibility with single platform builds (SPEAr supports both single and
>> multi-platform). This in turn causes DEBUG_LL_INCLUDE to wedge at
>> debug/pl01x.S.
>>
>> Problem is fixed by only deploying the compatibility options for SPEAr
>> when ARCH_MULTIPLATFORM is not set.
>
> I think it's probably about time we killed the def_bool and just made
> this a plain 'bool'. The affected platforms should be using
> DEBUG_LL_UART_PL01X by now.

Ok.

Looking closely I think this will actually be better even for the single
platforms since today KConfig will not honour targeting DEBUG_LL at
EmbeddedICE or semihosting on the platforms that remain in the list.

Expect a v3...



Daniel.

2014-04-04 15:42:12

by Daniel Thompson

[permalink] [raw]
Subject: [PATCH v3] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

When building a multi_v7_defconfig kernel it is not possible to configure
DEBUG_LL to use any serial device except a ARM Primecell PL01X, or more
accurately and worse, it is possible to configure a different serial
device but KConfig does not honour this request. In fact this also
overrides the user selection for some of the single platform kernels, for
example I don't think DEBUG_LL can be targetted at ICE or semihosted
supervisor for ARCH_VERSATILE.

This happens because DEBUG_UART_PL01X is automatically enabled by
some architectures and this means user decisions made regarding
the DEBUG_LL backend will be overriden. Problem is fixed by removing the
automatic enabling of this option.

Signed-off-by: Daniel Thompson <[email protected]>
---

Notes:
v3: Switch from def_bool to bool (thanks Russell King)
v2: Remove pointless single platform support (thanks Arnd Bergmann)

arch/arm/Kconfig.debug | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 0531da8..7e19c94 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -989,12 +989,7 @@ config DEBUG_LL_INCLUDE

# Compatibility options for PL01x
config DEBUG_UART_PL01X
- def_bool ARCH_EP93XX || \
- ARCH_INTEGRATOR || \
- ARCH_SPEAR3XX || \
- ARCH_SPEAR6XX || \
- ARCH_SPEAR13XX || \
- ARCH_VERSATILE
+ bool

# Compatibility options for 8250
config DEBUG_UART_8250
--
1.9.0

2014-04-07 12:48:19

by Daniel Thompson

[permalink] [raw]
Subject: Re: [PATCH v3] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

On 04/04/14 16:41, Daniel Thompson wrote:
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 0531da8..7e19c94 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -989,12 +989,7 @@ config DEBUG_LL_INCLUDE
>
> # Compatibility options for PL01x
> config DEBUG_UART_PL01X
> - def_bool ARCH_EP93XX || \
> - ARCH_INTEGRATOR || \
> - ARCH_SPEAR3XX || \
> - ARCH_SPEAR6XX || \
> - ARCH_SPEAR13XX || \
> - ARCH_VERSATILE
> + bool

NACK!

Sorry. I've got my posting-a-patch and my testing in the wrong order!

This patch regresses the build for (at least) the versatile. Expect v4
in due course (after I have improved my build automation).


Daniel.

2014-04-07 15:54:43

by Daniel Thompson

[permalink] [raw]
Subject: [PATCH v4 0/5] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

This patchset removes some single-platform compatibility tricks related
to DEBUG_LL and, as a result, allows multi_v7_defconfig derived builds
to enable DEBUG_LL without forcing the selection of the PL01X
implementation.

- Tidy a couple of existing defconfig's so they continue to issue
DEBUG_LL messages to PL01X when subsequent changes come along.
- Limit DEBUG_LL_UART_NONE to platforms that support it
- Fix a potential build problem on EP93XX
- Get rid of the compatibility code that causes us to forcibly enable
DEBUG_UART_PL01X

Changes since v3:

- Converted from a single patch to a series.
- Tested defconfig builds of all impacted platforms.

Changes since v2:

- Switch from def_bool to bool (thanks Russell King)

Changes since v1:

- Remove pointless single platform support (thanks Arnd Bergmann)

Daniel Thompson (5):
ARM: versatile: Enable DEBUG_LL_UART_PL01X
ARM: ep93xx: Enable DEBUG_LL_UART_PL01X
ARM: Conceal DEBUG_LL_UART_NONE from unsupported platforms
arm: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX
arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

arch/arm/Kconfig.debug | 23 +++++++++++++++--------
arch/arm/configs/ep93xx_defconfig | 1 +
arch/arm/configs/versatile_defconfig | 1 +
3 files changed, 17 insertions(+), 8 deletions(-)

--
1.9.0

2014-04-07 15:54:59

by Daniel Thompson

[permalink] [raw]
Subject: [PATCH v4 1/5] ARM: versatile: Enable DEBUG_LL_UART_PL01X

This defconfig already enables DEBUG_LL and by default DEBUG_LL_UART_NONE
will be selected (but due to some back compability magic I'd like to
remove is not actually honoured). DEBUG_LL_UART_PL01X is a much saner
default.

Signed-off-by: Daniel Thompson <[email protected]>
---
arch/arm/configs/versatile_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig
index 073541a..5a51397 100644
--- a/arch/arm/configs/versatile_defconfig
+++ b/arch/arm/configs/versatile_defconfig
@@ -79,5 +79,6 @@ CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_UART_PL01X=y
CONFIG_FONTS=y
CONFIG_FONT_ACORN_8x8=y
--
1.9.0

2014-04-07 15:55:41

by Daniel Thompson

[permalink] [raw]
Subject: [PATCH v4 2/5] ARM: ep93xx: Enable DEBUG_LL_UART_PL01X

This defconfig already enables DEBUG_LL and by default DEBUG_LL_UART_NONE
will be selected (but due to some back compability magic I'd like to
remove is not actually honoured). DEBUG_LL_UART_PL01X is a much saner
default.

Signed-off-by: Daniel Thompson <[email protected]>
---
arch/arm/configs/ep93xx_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/ep93xx_defconfig b/arch/arm/configs/ep93xx_defconfig
index 6ac5ea7..ff70784 100644
--- a/arch/arm/configs/ep93xx_defconfig
+++ b/arch/arm/configs/ep93xx_defconfig
@@ -108,5 +108,6 @@ CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_UART_PL01X=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_LIBCRC32C=y
--
1.9.0

2014-04-07 15:55:48

by Daniel Thompson

[permalink] [raw]
Subject: [PATCH v4 3/5] ARM: Conceal DEBUG_LL_UART_NONE from unsupported platforms

Only a small handful of platforms support DEBUG_LL_UART_NONE but it
lurks in the menus of every single platform config ready to break the
build. This is an especial problem for defconfigs since it is often
selected by default.

This patch limit this choice only to platforms capable of supporting it.

Signed-off-by: Daniel Thompson <[email protected]>
---
arch/arm/Kconfig.debug | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 0531da8..0702d6d 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -846,7 +846,18 @@ choice

config DEBUG_LL_UART_NONE
bool "No low-level debugging UART"
- depends on !ARCH_MULTIPLATFORM
+ depends on ARCH_AT91 || \
+ ARCH_CLPS711X || \
+ ARCH_FOOTBRIDGE || \
+ ARCH_KS8695 || \
+ ARCH_NETX || \
+ ARCH_OMAP1 || \
+ ARCH_SA1100 || \
+ ARCH_S3C24XX || \
+ ARCH_S3C64XX || \
+ ARCH_S5P64X0 || \
+ ARCH_S5PC100 || \
+ ARCH_S5PV210
help
Say Y here if your platform doesn't provide a UART option
above. This relies on your platform choosing the right UART
--
1.9.0

2014-04-07 15:55:59

by Daniel Thompson

[permalink] [raw]
Subject: [PATCH v4 4/5] arm: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX

On EP93XX uncompress.h uses CONFIG_DEBUG_UART_PHYS instead of a hard
coded serial port. This means the build breaks when DEBUG_LL
(and DEBUG_LL_UART_PL01X) is not enabled.

This is fixed by adding a new dependancy.

Signed-off-by: Daniel Thompson <[email protected]>
---

Notes:
Having ARCH_EP93XX on its own here looks somewhat anomalous but
I have searched for other users of CONFIG_DEBUG_UART_PHYS/VIRT
(outside of DEBUG_LL) but I think the EP93XX really is unique
here.

arch/arm/Kconfig.debug | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 0702d6d..50fdc86 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1073,7 +1073,8 @@ config DEBUG_UART_PHYS
default 0xfffff700 if ARCH_IOP33X
depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
DEBUG_LL_UART_EFM32 || \
- DEBUG_UART_8250 || DEBUG_UART_PL01X
+ DEBUG_UART_8250 || DEBUG_UART_PL01X || \
+ ARCH_EP93XX

config DEBUG_UART_VIRT
hex "Virtual base address of debug UART"
--
1.9.0

2014-04-07 15:56:09

by Daniel Thompson

[permalink] [raw]
Subject: [PATCH v4 5/5] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

When building a multi_v7_defconfig kernel it is not possible to configure
DEBUG_LL to use any serial device except a ARM Primecell PL01X, or more
accurately and worse, it is possible to configure a different serial
device but KConfig does not honour this request. In fact this also
overrides the user selection for some of the single platform kernels, for
example I don't think DEBUG_LL can be targetted at ICE or semihosted
supervisor for ARCH_VERSATILE.

This happens because DEBUG_UART_PL01X is automatically enabled by
some architectures and this means user decisions made regarding
the DEBUG_LL backend will be overriden. Problem is fixed by removing the
automatic enabling of this option.

Signed-off-by: Daniel Thompson <[email protected]>
---
arch/arm/Kconfig.debug | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 50fdc86..0a4ebf0 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1000,12 +1000,7 @@ config DEBUG_LL_INCLUDE

# Compatibility options for PL01x
config DEBUG_UART_PL01X
- def_bool ARCH_EP93XX || \
- ARCH_INTEGRATOR || \
- ARCH_SPEAR3XX || \
- ARCH_SPEAR6XX || \
- ARCH_SPEAR13XX || \
- ARCH_VERSATILE
+ bool

# Compatibility options for 8250
config DEBUG_UART_8250
--
1.9.0

2014-04-24 16:01:26

by Daniel Thompson

[permalink] [raw]
Subject: [RESEND PATCH v5 1/5] ARM: versatile: Enable DEBUG_LL_UART_PL01X

This defconfig already enables DEBUG_LL and by default DEBUG_LL_UART_NONE
will be selected (but due to some back compability magic I'd like to
remove is not actually honoured). DEBUG_LL_UART_PL01X is a much saner
default.

Signed-off-by: Daniel Thompson <[email protected]>
---
arch/arm/configs/versatile_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig
index 073541a..5a51397 100644
--- a/arch/arm/configs/versatile_defconfig
+++ b/arch/arm/configs/versatile_defconfig
@@ -79,5 +79,6 @@ CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_UART_PL01X=y
CONFIG_FONTS=y
CONFIG_FONT_ACORN_8x8=y
--
1.9.0

2014-04-24 16:01:37

by Daniel Thompson

[permalink] [raw]
Subject: [RESEND PATCH v5 4/5] arm: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX

On EP93XX uncompress.h uses CONFIG_DEBUG_UART_PHYS instead of a hard
coded serial port. This means the build breaks when DEBUG_LL
(and DEBUG_LL_UART_PL01X) is not enabled.

This is fixed by adding a new dependancy.

Signed-off-by: Daniel Thompson <[email protected]>
---

Notes:
Having ARCH_EP93XX on its own here looks somewhat anomalous but
I have searched for other users of CONFIG_DEBUG_UART_PHYS/VIRT
(outside of DEBUG_LL) but I think the EP93XX really is unique
here.

arch/arm/Kconfig.debug | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 450e6f7..2612dd0 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1069,7 +1069,8 @@ config DEBUG_UART_PHYS
default 0xfffff700 if ARCH_IOP33X
depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
DEBUG_LL_UART_EFM32 || \
- DEBUG_UART_8250 || DEBUG_UART_PL01X
+ DEBUG_UART_8250 || DEBUG_UART_PL01X || \
+ ARCH_EP93XX

config DEBUG_UART_VIRT
hex "Virtual base address of debug UART"
--
1.9.0

2014-04-24 16:01:33

by Daniel Thompson

[permalink] [raw]
Subject: [RESEND PATCH v5 5/5] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

When building a multi_v7_defconfig kernel it is not possible to configure
DEBUG_LL to use any serial device except a ARM Primecell PL01X, or more
accurately and worse, it is possible to configure a different serial
device but KConfig does not honour this request. In fact this also
overrides the user selection for some of the single platform kernels, for
example I don't think DEBUG_LL can be targetted at ICE or semihosted
supervisor for ARCH_VERSATILE.

This happens because DEBUG_UART_PL01X is automatically enabled by
some architectures and this means user decisions made regarding
the DEBUG_LL backend will be overriden. Problem is fixed by removing the
automatic enabling of this option.

Signed-off-by: Daniel Thompson <[email protected]>
---
arch/arm/Kconfig.debug | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 2612dd0..ca9a01c 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -996,12 +996,7 @@ config DEBUG_LL_INCLUDE

# Compatibility options for PL01x
config DEBUG_UART_PL01X
- def_bool ARCH_EP93XX || \
- ARCH_INTEGRATOR || \
- ARCH_SPEAR3XX || \
- ARCH_SPEAR6XX || \
- ARCH_SPEAR13XX || \
- ARCH_VERSATILE
+ bool

# Compatibility options for 8250
config DEBUG_UART_8250
--
1.9.0

2014-04-24 16:03:05

by Daniel Thompson

[permalink] [raw]
Subject: [RESEND PATCH v5 3/5] ARM: Conceal DEBUG_LL_UART_NONE from unsupported platforms

Only a small handful of platforms support DEBUG_LL_UART_NONE but it
lurks in the menus of every single platform config ready to break the
build. This is an especial problem for defconfigs since it is often
selected by default.

This patch limit this choice only to platforms capable of supporting it.

Signed-off-by: Daniel Thompson <[email protected]>
---
arch/arm/Kconfig.debug | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 4a2fc0b..450e6f7 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -842,7 +842,18 @@ choice

config DEBUG_LL_UART_NONE
bool "No low-level debugging UART"
- depends on !ARCH_MULTIPLATFORM
+ depends on ARCH_AT91 || \
+ ARCH_CLPS711X || \
+ ARCH_FOOTBRIDGE || \
+ ARCH_KS8695 || \
+ ARCH_NETX || \
+ ARCH_OMAP1 || \
+ ARCH_SA1100 || \
+ ARCH_S3C24XX || \
+ ARCH_S3C64XX || \
+ ARCH_S5P64X0 || \
+ ARCH_S5PC100 || \
+ ARCH_S5PV210
help
Say Y here if your platform doesn't provide a UART option
above. This relies on your platform choosing the right UART
--
1.9.0

2014-04-24 16:14:45

by Daniel Thompson

[permalink] [raw]
Subject: [RESEND PATCH v5 2/5] ARM: ep93xx: Enable DEBUG_LL_UART_PL01X

This defconfig already enables DEBUG_LL and by default DEBUG_LL_UART_NONE
will be selected (but due to some back compability magic I'd like to
remove is not actually honoured). DEBUG_LL_UART_PL01X is a much saner
default.

Signed-off-by: Daniel Thompson <[email protected]>
---
arch/arm/configs/ep93xx_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/ep93xx_defconfig b/arch/arm/configs/ep93xx_defconfig
index 6ac5ea7..ff70784 100644
--- a/arch/arm/configs/ep93xx_defconfig
+++ b/arch/arm/configs/ep93xx_defconfig
@@ -108,5 +108,6 @@ CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_UART_PL01X=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_LIBCRC32C=y
--
1.9.0

2014-04-24 16:16:10

by Daniel Thompson

[permalink] [raw]
Subject: [RESEND PATCH v5 0/5] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

This patchset removes some single-platform compatibility tricks related
to DEBUG_LL and, as a result, allows multi_v7_defconfig derived builds
to enable DEBUG_LL without forcibly selecting of the PL01X's DEBUG_LL
implementation (which doesn't work on some platforms).

- Tidy a couple of existing defconfig's so they continue to issue
DEBUG_LL messages to PL01X when the subsequent changes come along.
- Limit DEBUG_LL_UART_NONE to platforms that support it
- Fix a potential build problem on EP93XX
- Get rid of the compatibility code that causes us to forcibly enable
DEBUG_UART_PL01X

Daniel Thompson (5):
ARM: versatile: Enable DEBUG_LL_UART_PL01X
ARM: ep93xx: Enable DEBUG_LL_UART_PL01X
ARM: Conceal DEBUG_LL_UART_NONE from unsupported platforms
arm: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX
arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)

arch/arm/Kconfig.debug | 23 +++++++++++++++--------
arch/arm/configs/ep93xx_defconfig | 1 +
arch/arm/configs/versatile_defconfig | 1 +
3 files changed, 17 insertions(+), 8 deletions(-)

Changes since v4:

- Rebased to latest mainline (and tested again). No functional changes.

Changes since v3:

- Converted from a single patch to a series.
- Tested defconfig builds of all impacted platforms.

Changes since v2:

- Switch from def_bool to bool (thanks Russell King)

Changes since v1:

- Remove pointless single platform support (thanks Arnd Bergmann)

--
1.9.0