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 daniel.thompson@linaro.org --- 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
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 daniel.thompson@linaro.org
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
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.
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
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
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.
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.
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 daniel.thompson@linaro.org ---
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
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 daniel.thompson@linaro.org ---
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
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.
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(-)
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 daniel.thompson@linaro.org --- 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
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 daniel.thompson@linaro.org --- 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
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 daniel.thompson@linaro.org --- 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
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 daniel.thompson@linaro.org ---
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"
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 daniel.thompson@linaro.org --- 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
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)
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 daniel.thompson@linaro.org --- 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
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 daniel.thompson@linaro.org --- 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
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 daniel.thompson@linaro.org --- 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
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 daniel.thompson@linaro.org ---
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"
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 daniel.thompson@linaro.org --- 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
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
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)
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(-)
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 daniel.thompson@linaro.org --- 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
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 daniel.thompson@linaro.org --- 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
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 daniel.thompson@linaro.org --- 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 eab8ecb..4c8d7db 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
On Friday 23 May 2014 16:10:17 Daniel Thompson wrote:
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 daniel.thompson@linaro.org
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 eab8ecb..4c8d7db 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 || \
help Say Y here if your platform doesn't provide a UART option above. This relies on your platform choosing the right UARTARCH_S5PV210
ARCH_S3C24XX has been moved over in linux-next to use debug/s3c24xx.S. A few others will likely move soon (AT91, CLPS711x, S5PV210), as the platforms get moved to ARCH_MULTIPLATFORM.
As an alternative to your patch, we could decide to move the remaining files as well.
Arnd
On Friday 23 May 2014 17:35:34 Arnd Bergmann wrote:
On Friday 23 May 2014 16:10:17 Daniel Thompson wrote:
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 daniel.thompson@linaro.org
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 eab8ecb..4c8d7db 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
ARCH_S3C24XX has been moved over in linux-next to use debug/s3c24xx.S. A few others will likely move soon (AT91, CLPS711x, S5PV210), as the platforms get moved to ARCH_MULTIPLATFORM.
As an alternative to your patch, we could decide to move the remaining files as well.
Follow-up: I also noticed that AT91, CLPS711X, FOOTBRIDGE and all the SAMSUNG platforms already have an entry in the list, so DEBUG_LL_UART_NONE is redundant for them. The below change should be enough.
For AT91 this is actually better because the old AT91X40 support doesn't have working DEBUG_LL support. This gets handled correctly by AT91_DEBUG_LL_DBGU0/AT91_DEBUG_LL_DBGU1, but not DEBUG_LL_UART_NONE.
Arnd
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index fd127d6..cae828a 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -864,7 +864,8 @@ choice
config DEBUG_LL_UART_NONE bool "No low-level debugging UART" - depends on !ARCH_MULTIPLATFORM + depends on ARCH_KS8695 || ARCH_NETX || ARCH_OMAP1 || ARCH_SA1100 help Say Y here if your platform doesn't provide a UART option above. This relies on your platform choosing the right UART
On 26/05/14 14:39, Arnd Bergmann wrote:
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index eab8ecb..4c8d7db 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
ARCH_S3C24XX has been moved over in linux-next to use debug/s3c24xx.S. A few others will likely move soon (AT91, CLPS711x, S5PV210), as the platforms get moved to ARCH_MULTIPLATFORM.
The list in my patch came from:
sundance$ find arch/arm -name "debug-macro.S" arch/arm/mach-at91/include/mach/debug-macro.S arch/arm/mach-clps711x/include/mach/debug-macro.S arch/arm/mach-footbridge/include/mach/debug-macro.S arch/arm/mach-ks8695/include/mach/debug-macro.S arch/arm/mach-netx/include/mach/debug-macro.S arch/arm/mach-omap1/include/mach/debug-macro.S arch/arm/mach-s3c64xx/include/mach/debug-macro.S arch/arm/mach-s5p64x0/include/mach/debug-macro.S arch/arm/mach-s5pc100/include/mach/debug-macro.S arch/arm/mach-s5pv210/include/mach/debug-macro.S arch/arm/mach-sa1100/include/mach/debug-macro.S
In other words this patch lists of all platforms where DEBUG_LL_UART_NONE should not result in failure to compile the kernel.
This list doesn't seem to have changed in linux-next.
As an alternative to your patch, we could decide to move the remaining files as well.
Follow-up: I also noticed that AT91, CLPS711X, FOOTBRIDGE and all the SAMSUNG platforms already have an entry in the list, so DEBUG_LL_UART_NONE is redundant for them. The below change should be enough.
For AT91 this is actually better because the old AT91X40 support doesn't have working DEBUG_LL support. This gets handled correctly by AT91_DEBUG_LL_DBGU0/AT91_DEBUG_LL_DBGU1, but not DEBUG_LL_UART_NONE.
I'm very happy to update my patch to follow this one. However since it will render the corresponding debug-macro.S unreachable by KBuild I like to nuke the file as well. Good idea?
Daniel.
On Tuesday 27 May 2014 14:13:32 Daniel Thompson wrote:
On 26/05/14 14:39, Arnd Bergmann wrote:
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index eab8ecb..4c8d7db 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
ARCH_S3C24XX has been moved over in linux-next to use debug/s3c24xx.S. A few others will likely move soon (AT91, CLPS711x, S5PV210), as the platforms get moved to ARCH_MULTIPLATFORM.
The list in my patch came from:
sundance$ find arch/arm -name "debug-macro.S" arch/arm/mach-at91/include/mach/debug-macro.S arch/arm/mach-clps711x/include/mach/debug-macro.S arch/arm/mach-footbridge/include/mach/debug-macro.S arch/arm/mach-ks8695/include/mach/debug-macro.S arch/arm/mach-netx/include/mach/debug-macro.S arch/arm/mach-omap1/include/mach/debug-macro.S arch/arm/mach-s3c64xx/include/mach/debug-macro.S arch/arm/mach-s5p64x0/include/mach/debug-macro.S arch/arm/mach-s5pc100/include/mach/debug-macro.S arch/arm/mach-s5pv210/include/mach/debug-macro.S arch/arm/mach-sa1100/include/mach/debug-macro.S
In other words this patch lists of all platforms where DEBUG_LL_UART_NONE should not result in failure to compile the kernel.
I see the same list, this is only half the story though.
This list doesn't seem to have changed in linux-next.
As an alternative to your patch, we could decide to move the remaining files as well.
Follow-up: I also noticed that AT91, CLPS711X, FOOTBRIDGE and all the SAMSUNG platforms already have an entry in the list, so DEBUG_LL_UART_NONE is redundant for them. The below change should be enough.
For AT91 this is actually better because the old AT91X40 support doesn't have working DEBUG_LL support. This gets handled correctly by AT91_DEBUG_LL_DBGU0/AT91_DEBUG_LL_DBGU1, but not DEBUG_LL_UART_NONE.
I'm very happy to update my patch to follow this one. However since it will render the corresponding debug-macro.S unreachable by KBuild I like to nuke the file as well. Good idea?
No. See the description under config DEBUG_LL_UART_NONE:
Say Y here if your platform doesn't provide a UART option above. This relies on your platform choosing the right UART definition internally in order for low-level debugging to work.
The platforms I listed do have "a UART option above", e.g.
config AT91_DEBUG_LL_DBGU0 bool "Kernel low-level debugging on rm9200, 9260/9g20, 9261/9g10 and 9rl" depends on HAVE_AT91_DBGU0
Most of the platforms that have an option like this put the file into include/debug, as is required for ARCH_MULTIPLATFORM. The ones that are not converted to ARCH_MULTIPLATFORM can have it in either place, see
config DEBUG_LL_INCLUDE string default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250 default "debug/pl01x.S" if DEBUG_LL_UART_PL01X || DEBUG_UART_PL01X ... default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 default "mach/debug-macro.S"
Anything that is not explicitly listed under DEBUG_LL_INCLUDE will default to "mach/debug-macro.S", and the list does not (have to) match the choice statements in "Kernel low-level debugging port".
Arnd
On 27/05/14 14:37, Arnd Bergmann wrote:
I'm very happy to update my patch to follow this one. However since it will render the corresponding debug-macro.S unreachable by KBuild I like to nuke the file as well. Good idea?
No. See the description under config DEBUG_LL_UART_NONE:
Say Y here if your platform doesn't provide a UART option above. This relies on your platform choosing the right UART definition internally in order for low-level debugging to work.
The platforms I listed do have "a UART option above", e.g.
config AT91_DEBUG_LL_DBGU0 bool "Kernel low-level debugging on rm9200, 9260/9g20, 9261/9g10 and 9rl" depends on HAVE_AT91_DBGU0
Most of the platforms that have an option like this put the file into include/debug, as is required for ARCH_MULTIPLATFORM. The ones that are not converted to ARCH_MULTIPLATFORM can have it in either place, see
config DEBUG_LL_INCLUDE string default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250 default "debug/pl01x.S" if DEBUG_LL_UART_PL01X || DEBUG_UART_PL01X ... default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 default "mach/debug-macro.S"
Anything that is not explicitly listed under DEBUG_LL_INCLUDE will default to "mach/debug-macro.S", and the list does not (have to) match the choice statements in "Kernel low-level debugging port".
Ok. Thanks.
I'll refresh the patch shortly.
Daniel.
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 daniel.thompson@linaro.org --- 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 4c8d7db..468cb3b 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"
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 daniel.thompson@linaro.org --- 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 468cb3b..6a2bcfd 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
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
Changes since v5:
- Shortened the list of platforms that can select DEBUG_LL_UART_NONE (changes Arnd Bergmann) - Rebased on latest mainline (v3.15rc7).
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)
Daniel Thompson (5): ARM: versatile: Enable DEBUG_LL_UART_PL01X ARM: ep93xx: Enable DEBUG_LL_UART_PL01X ARM: Hide 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 | 12 ++++-------- arch/arm/configs/ep93xx_defconfig | 1 + arch/arm/configs/versatile_defconfig | 1 + 3 files changed, 6 insertions(+), 8 deletions(-)
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 daniel.thompson@linaro.org --- 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
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 daniel.thompson@linaro.org --- 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
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 limits this choice only to platforms which offer no other means to use DEBUG_LL.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org --- arch/arm/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index eab8ecb..33f0b38 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -842,7 +842,7 @@ choice
config DEBUG_LL_UART_NONE bool "No low-level debugging UART" - depends on !ARCH_MULTIPLATFORM + depends on ARCH_KS8695 || ARCH_NETX || ARCH_OMAP1 || ARCH_SA1100 help Say Y here if your platform doesn't provide a UART option above. This relies on your platform choosing the right UART
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 daniel.thompson@linaro.org --- 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 33f0b38..9a391f7 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1058,7 +1058,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"
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 daniel.thompson@linaro.org --- 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 9a391f7..de67f7e 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -985,12 +985,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
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. Currently the user selected kbuild setting is ignored and the PL01X's DEBUG_LL stub is silently selected instead. This is a pain if your hardware doesn't have this cell, not least because it takes a little time to figure out that kbuild built the wrong code.
Changes since v6: - Removed a patch to limit DEBUG_LL_UART_NONE to platforms that support it because it almost time to drop DEBUG_LL_UART_NONE anyway (only four platforms still use it). - Rebased on latest mainline (v3.16rc3).
Changes since v5:
- Shortened the list of platforms that can select DEBUG_LL_UART_NONE (changes Arnd Bergmann) - Rebased on latest mainline (v3.15rc7).
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)
Daniel Thompson (4): ARM: versatile: Enable DEBUG_LL_UART_PL01X ARM: ep93xx: Enable DEBUG_LL_UART_PL01X arm: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)
arch/arm/Kconfig.debug | 10 +++------- arch/arm/configs/ep93xx_defconfig | 1 + arch/arm/configs/versatile_defconfig | 1 + 3 files changed, 5 insertions(+), 7 deletions(-)
-- 1.9.3
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 daniel.thompson@linaro.org --- 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 d52b4ff..ea49d37 100644 --- a/arch/arm/configs/versatile_defconfig +++ b/arch/arm/configs/versatile_defconfig @@ -82,5 +82,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
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 daniel.thompson@linaro.org --- 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 1b650c8..72233b9 100644 --- a/arch/arm/configs/ep93xx_defconfig +++ b/arch/arm/configs/ep93xx_defconfig @@ -107,5 +107,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
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 daniel.thompson@linaro.org --- 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 11db37e..459c7f9 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1114,7 +1114,8 @@ config DEBUG_UART_PHYS depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_LL_UART_EFM32 || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ - DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART + DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \ + ARCH_EP93XX
config DEBUG_UART_VIRT hex "Virtual base address of debug UART"
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 daniel.thompson@linaro.org --- 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 459c7f9..26536f7 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1032,12 +1032,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
On Monday 30 June 2014 12:30:51 Daniel Thompson wrote:
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. Currently the user selected kbuild setting is ignored and the PL01X's DEBUG_LL stub is silently selected instead. This is a pain if your hardware doesn't have this cell, not least because it takes a little time to figure out that kbuild built the wrong code.
Looks fine to me.
Acked-by: Arnd Bergmann arnd@arndb.de
On Mon, Jun 30, 2014 at 12:30:51PM +0100, Daniel Thompson wrote:
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. Currently the user selected kbuild setting is ignored and the PL01X's DEBUG_LL stub is silently selected instead. This is a pain if your hardware doesn't have this cell, not least because it takes a little time to figure out that kbuild built the wrong code.
I don't think this is quite right, because I'm now seeing randconfig finding build errors with this. We can end up with this configuration:
CONFIG_DEBUG_LL=y CONFIG_DEBUG_LL_UART_NONE=y # CONFIG_DEBUG_ICEDCC is not set # CONFIG_DEBUG_SEMIHOSTING is not set # CONFIG_DEBUG_LL_UART_8250 is not set # CONFIG_DEBUG_LL_UART_PL01X is not set CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" # CONFIG_DEBUG_UART_8250 is not set
which results in:
arch/arm/kernel/debug.S:24:33: fatal error: mach/debug-macro.S: No such file or directory make[2]: *** [arch/arm/kernel/debug.o] Error 1 arch/arm/kernel/head.S:27:33: fatal error: mach/debug-macro.S: No such file or directory make[2]: *** [arch/arm/kernel/head.o] Error 1
Full config file: http://www.arm.linux.org.uk/developer/build/file.php?lid=11023
On Sat, Jul 12, 2014 at 11:16:02AM +0100, Russell King - ARM Linux wrote:
On Mon, Jun 30, 2014 at 12:30:51PM +0100, Daniel Thompson wrote:
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. Currently the user selected kbuild setting is ignored and the PL01X's DEBUG_LL stub is silently selected instead. This is a pain if your hardware doesn't have this cell, not least because it takes a little time to figure out that kbuild built the wrong code.
I don't think this is quite right, because I'm now seeing randconfig finding build errors with this. We can end up with this configuration:
CONFIG_DEBUG_LL=y CONFIG_DEBUG_LL_UART_NONE=y # CONFIG_DEBUG_ICEDCC is not set # CONFIG_DEBUG_SEMIHOSTING is not set # CONFIG_DEBUG_LL_UART_8250 is not set # CONFIG_DEBUG_LL_UART_PL01X is not set CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" # CONFIG_DEBUG_UART_8250 is not set
which results in:
arch/arm/kernel/debug.S:24:33: fatal error: mach/debug-macro.S: No such file or directory make[2]: *** [arch/arm/kernel/debug.o] Error 1 arch/arm/kernel/head.S:27:33: fatal error: mach/debug-macro.S: No such file or directory make[2]: *** [arch/arm/kernel/head.o] Error 1
Full config file: http://www.arm.linux.org.uk/developer/build/file.php?lid=11023
Note that this also breaks building versatile as an oldconfig. I'll drop the patch series from my tree for the time being.
On 12/07/14 12:10, Russell King - ARM Linux wrote:
On Sat, Jul 12, 2014 at 11:16:02AM +0100, Russell King - ARM Linux wrote:
On Mon, Jun 30, 2014 at 12:30:51PM +0100, Daniel Thompson wrote:
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. Currently the user selected kbuild setting is ignored and the PL01X's DEBUG_LL stub is silently selected instead. This is a pain if your hardware doesn't have this cell, not least because it takes a little time to figure out that kbuild built the wrong code.
I don't think this is quite right, because I'm now seeing randconfig finding build errors with this. We can end up with this configuration:
CONFIG_DEBUG_LL=y CONFIG_DEBUG_LL_UART_NONE=y # CONFIG_DEBUG_ICEDCC is not set # CONFIG_DEBUG_SEMIHOSTING is not set # CONFIG_DEBUG_LL_UART_8250 is not set # CONFIG_DEBUG_LL_UART_PL01X is not set CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" # CONFIG_DEBUG_UART_8250 is not set
which results in:
arch/arm/kernel/debug.S:24:33: fatal error: mach/debug-macro.S: No such file or directory make[2]: *** [arch/arm/kernel/debug.o] Error 1 arch/arm/kernel/head.S:27:33: fatal error: mach/debug-macro.S: No such file or directory make[2]: *** [arch/arm/kernel/head.o] Error 1 Full config file: http://www.arm.linux.org.uk/developer/build/file.php?lid=11023
Thanks. I will look at this.
Problem is that by making the build system honour the user choice we end up breaking the build when the user makes a bad choice (albeit a bad choice that they should not have been given in the first place).
I guess the best fix is to get rid of CONFIG_DEBUG_LL_UART_NONE altogether.
Note that this also breaks building versatile as an oldconfig. I'll drop the patch series from my tree for the time being.
There is a difficult problem with oldconfig.
Today DEBUG_LL only works on versatile defconfigs (and oldconfig upgrades from there) because although CONFIG_DEBUG_LL_UART_NONE is selected the build system does not honour this and behaves as though the use selected CONFIG_DEBUG_LL_UART_PL01X instead.
Unfortunately if we fix this and remove CONFIG_DEBUG_LL_UART_NONE as proposed above then the oldconfig will silently select CONFIG_DEBUG_SEMIHOSTING.
In other words I will be able to offer a patch so that oldconfig *compiles* but I don't know how to get it to preserve behaviour (or whether this matters).
Hints about what to do would be very welcome.
Daniel.
On 14/07/14 10:05, Daniel Thompson wrote:
On 12/07/14 12:10, Russell King - ARM Linux wrote:
On Sat, Jul 12, 2014 at 11:16:02AM +0100, Russell King - ARM Linux wrote:
On Mon, Jun 30, 2014 at 12:30:51PM +0100, Daniel Thompson wrote:
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. Currently the user selected kbuild setting is ignored and the PL01X's DEBUG_LL stub is silently selected instead. This is a pain if your hardware doesn't have this cell, not least because it takes a little time to figure out that kbuild built the wrong code.
I don't think this is quite right, because I'm now seeing randconfig finding build errors with this. We can end up with this configuration:
CONFIG_DEBUG_LL=y CONFIG_DEBUG_LL_UART_NONE=y # CONFIG_DEBUG_ICEDCC is not set # CONFIG_DEBUG_SEMIHOSTING is not set # CONFIG_DEBUG_LL_UART_8250 is not set # CONFIG_DEBUG_LL_UART_PL01X is not set CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" # CONFIG_DEBUG_UART_8250 is not set
which results in:
arch/arm/kernel/debug.S:24:33: fatal error: mach/debug-macro.S: No such file or directory make[2]: *** [arch/arm/kernel/debug.o] Error 1 arch/arm/kernel/head.S:27:33: fatal error: mach/debug-macro.S: No such file or directory make[2]: *** [arch/arm/kernel/head.o] Error 1 Full config file: http://www.arm.linux.org.uk/developer/build/file.php?lid=11023
Thanks. I will look at this.
Problem is that by making the build system honour the user choice we end up breaking the build when the user makes a bad choice (albeit a bad choice that they should not have been given in the first place).
I guess the best fix is to get rid of CONFIG_DEBUG_LL_UART_NONE altogether.
Note that this also breaks building versatile as an oldconfig. I'll drop the patch series from my tree for the time being.
There is a difficult problem with oldconfig.
Today DEBUG_LL only works on versatile defconfigs (and oldconfig upgrades from there) because although CONFIG_DEBUG_LL_UART_NONE is selected the build system does not honour this and behaves as though the use selected CONFIG_DEBUG_LL_UART_PL01X instead.
Unfortunately if we fix this and remove CONFIG_DEBUG_LL_UART_NONE as proposed above then the oldconfig will silently select CONFIG_DEBUG_SEMIHOSTING.
In other words I will be able to offer a patch so that oldconfig *compiles* but I don't know how to get it to preserve behaviour (or whether this matters).
Hints about what to do would be very welcome.
Russell,
Out of interest, would you accept the much less ambitious older version of this patch for the upcoming merge window: http://thread.gmane.org/gmane.linux.kernel/1678055
The version linked above solves the problems for multi-platform kernel users (which were caused by SPEARr being enabled in the default multi-platform builds) but doesn't seek to fix things like ICEDCC and semihosting for the remaining single platform kernels.
Daniel.
On Monday 14 July 2014 10:05:35 Daniel Thompson wrote:
On 12/07/14 12:10, Russell King - ARM Linux wrote:
On Sat, Jul 12, 2014 at 11:16:02AM +0100, Russell King - ARM Linux wrote:
On Mon, Jun 30, 2014 at 12:30:51PM +0100, Daniel Thompson wrote:
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. Currently the user selected kbuild setting is ignored and the PL01X's DEBUG_LL stub is silently selected instead. This is a pain if your hardware doesn't have this cell, not least because it takes a little time to figure out that kbuild built the wrong code.
I don't think this is quite right, because I'm now seeing randconfig finding build errors with this. We can end up with this configuration:
CONFIG_DEBUG_LL=y CONFIG_DEBUG_LL_UART_NONE=y # CONFIG_DEBUG_ICEDCC is not set # CONFIG_DEBUG_SEMIHOSTING is not set # CONFIG_DEBUG_LL_UART_8250 is not set # CONFIG_DEBUG_LL_UART_PL01X is not set CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" # CONFIG_DEBUG_UART_8250 is not set
which results in:
arch/arm/kernel/debug.S:24:33: fatal error: mach/debug-macro.S: No such file or directory make[2]: *** [arch/arm/kernel/debug.o] Error 1 arch/arm/kernel/head.S:27:33: fatal error: mach/debug-macro.S: No such file or directory make[2]: *** [arch/arm/kernel/head.o] Error 1 Full config file: http://www.arm.linux.org.uk/developer/build/file.php?lid=11023
Thanks. I will look at this.
Problem is that by making the build system honour the user choice we end up breaking the build when the user makes a bad choice (albeit a bad choice that they should not have been given in the first place).
I guess the best fix is to get rid of CONFIG_DEBUG_LL_UART_NONE altogether.
Yes, that seems like the best plan forward. I think my analysis is still correct that DEBUG_LL_UART_NONE is only used on ARCH_KS8695, ARCH_NETX, ARCH_OMAP1, and ARCH_SA1100 today.
Note that this also breaks building versatile as an oldconfig. I'll drop the patch series from my tree for the time being.
There is a difficult problem with oldconfig.
Today DEBUG_LL only works on versatile defconfigs (and oldconfig upgrades from there) because although CONFIG_DEBUG_LL_UART_NONE is selected the build system does not honour this and behaves as though the use selected CONFIG_DEBUG_LL_UART_PL01X instead.
It took me a while to understand what you mean here. It's the DEBUG_UART_PL01X/DEBUG_UART_8250 options getting triggered for some platforms when CONFIG_DEBUG_LL_UART_NONE is set, rather than the DEBUG_LL_UART_PL01X/DEBUG_LL_UART_8250 options.
Unfortunately if we fix this and remove CONFIG_DEBUG_LL_UART_NONE as proposed above then the oldconfig will silently select CONFIG_DEBUG_SEMIHOSTING.
In other words I will be able to offer a patch so that oldconfig *compiles* but I don't know how to get it to preserve behaviour (or whether this matters).
Hints about what to do would be very welcome.
For a 'choice' statement, 'oldconfig' will always pick what is listed as the 'default' option, and in the absence of that will pick the first option it finds.
We could do it for one of pl01x or 8250 by rearranging the order, but not for both. I think something like this would work, but I don't know if that's the nicest solution. I'm also getting a few simple merge conflicts because of the mach-kirkwood removal.
This patch introduces separate options for all users of DEBUG_UART_PL01X and some that use DEBUG_UART_8250. It still leaves the ones that use 8250 but will never be multiplatform as far as I can tell, (strongarm, ixp and pxa).
Signed-off-by: Arnd Bergmann arnd@arndb.de
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 8f90595069a1..0f89d1b84524 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -200,6 +200,14 @@ choice Say Y here if you want the debug print routines to direct their output to the serial port in the DC21285 (Footbridge).
+ config DEBUG_EP93XX + bool "Kernel low-level debugging messages via ep93xx UART" + depends on ARCH_EP93XX + select DEBUG_UART_PL01X + help + Say Y here if you want kernel low-level debugging support + on Cirrus Logic EP93xx based platforms. + config DEBUG_FOOTBRIDGE_COM1 bool "Kernel low-level debugging messages via footbridge 8250 at PCI COM1" depends on FOOTBRIDGE @@ -207,6 +215,14 @@ choice Say Y here if you want the debug print routines to direct their output to the 8250 at PCI COM1.
+ config DEBUG_GEMINI + bool "Kernel low-level debugging messages via Cortina Systems Gemini UART" + depends on ARCH_GEMINI + select DEBUG_UART_8250 + help + Say Y here if you want kernel low-level debugging support + on Cirrus Logic EP93xx based platforms. + config DEBUG_HI3620_UART bool "Hisilicon HI3620 Debug UART" depends on ARCH_HI3xxx @@ -324,6 +340,14 @@ choice Say Y here if you want kernel low-level debugging support on i.MX6SX.
+ config DEBUG_INTEGRATOR + bool "Kernel low-level debugging messages via ARM Integrator UART" + depends on ARCH_INTEGRATOR + select DEBUG_UART_PL01X + help + Say Y here if you want kernel low-level debugging support + on Cirrus Logic EP93xx based platforms. + config DEBUG_KEYSTONE_UART0 bool "Kernel low-level debugging on KEYSTONE2 using UART0" depends on ARCH_KEYSTONE @@ -340,6 +364,14 @@ choice Say Y here if you want the debug print routines to direct their output to UART1 serial port on KEYSTONE2 devices.
+ config DEBUG_LPC32XX + bool "Kernel low-level debugging messages via NXP LPC32xx UART" + depends on ARCH_LPC32XX + select DEBUG_UART_8250 + help + Say Y here if you want kernel low-level debugging support + on Cirrus Logic EP93xx based platforms. + config DEBUG_MMP_UART2 bool "Kernel low-level debugging message via MMP UART2" depends on ARCH_MMP @@ -393,7 +425,7 @@ choice
config DEBUG_MVEBU_UART bool "Kernel low-level debugging messages via MVEBU UART (old bootloaders)" - depends on ARCH_MVEBU + depends on ARCH_MVEBU && CPU_V7 select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support @@ -406,20 +438,27 @@ choice Plathome OpenBlocks AX3, when using the original bootloader.
+ This option will not work on older Marvell platforms + (Kirkwood, Dove, MV78xx0, Orion5x), which should piock + the "new bootloader" variant. + If the wrong DEBUG_MVEBU_UART* option is selected, when u-boot hands over to the kernel, the system silently crashes, with no serial output at all.
config DEBUG_MVEBU_UART_ALTERNATE bool "Kernel low-level debugging messages via MVEBU UART (new bootloaders)" - depends on ARCH_MVEBU + depends on ARCH_MVEBU || ARCH_DOVE || ARCH_KIRKWOOD || ARCH_MV78XX0 || ARCH_ORION5X select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support - on MVEBU based platforms. + on MVEBU based platforms (Armada XP, Armada 3xx, Kirkwood, + Dove, MV78xx0, Orion5x).
This option should be used with the new bootloaders that remap the internal registers at 0xf1000000. + All of the older (pre Armada XP/370) platforms also use + this address, regardless of the boot loader version.
If the wrong DEBUG_MVEBU_UART* option is selected, when u-boot hands over to the kernel, the system @@ -781,6 +820,22 @@ choice Say Y here if you want the debug print routines to direct their output to the uart1 port on SiRFmarco devices.
+ config DEBUG_SPEAR3XX + bool "Kernel low-level debugging messages via ST SPEAr 3xx/6xx UART" + depends on ARCH_SPEAR3XX || ARCH_SPEAR6XX + select DEBUG_UART_PL01X + help + Say Y here if you want kernel low-level debugging support + on Cirrus Logic EP93xx based platforms. + + config DEBUG_SPEAR13XX + bool "Kernel low-level debugging messages via ST SPEAr 13xx UART" + depends on ARCH_SPEAR13XX + select DEBUG_UART_PL01X + help + Say Y here if you want kernel low-level debugging support + on Cirrus Logic EP93xx based platforms. + config STIH41X_DEBUG_ASC2 bool "Use StiH415/416 ASC2 UART for low-level debug" depends on ARCH_STI @@ -818,6 +873,14 @@ choice Say Y here if you want kernel low-level debugging support on Ux500 based platforms.
+ config DEBUG_VERSATILE + bool "Kernel low-level debugging messages via ARM Versatile UART" + depends on ARCH_VERSATILE + select DEBUG_UART_PL01X + help + Say Y here if you want kernel low-level debugging support + on Cirrus Logic EP93xx based platforms. + config DEBUG_VEXPRESS_UART0_DETECT bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" depends on ARCH_VEXPRESS && CPU_CP15_MMU @@ -1021,20 +1084,13 @@ 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 - def_bool ARCH_DOVE || ARCH_EBSA110 || \ - (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \ - ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \ - ARCH_IOP33X || ARCH_IXP4XX || ARCH_KIRKWOOD || \ - ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC + def_bool ARCH_EBSA110 || (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \ + ARCH_IOP13XX || ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX || \ + ARCH_RPC
config DEBUG_UART_PHYS hex "Physical base address of debug UART" @@ -1051,9 +1107,9 @@ config DEBUG_UART_PHYS default 0x1010c000 if DEBUG_REALVIEW_PB1176_PORT default 0x10124000 if DEBUG_RK3X_UART0 default 0x10126000 if DEBUG_RK3X_UART1 - default 0x101f1000 if ARCH_VERSATILE + default 0x101f1000 if DEBUG_VERSATILE default 0x101fb000 if DEBUG_NOMADIK_UART - default 0x16000000 if ARCH_INTEGRATOR + default 0x16000000 if DEBUG_INTEGRATOR default 0x18000300 if DEBUG_BCM_5301X default 0x1c090000 if DEBUG_VEXPRESS_UART0_RS1 default 0x20060000 if DEBUG_RK29_UART0 @@ -1062,9 +1118,9 @@ config DEBUG_UART_PHYS default 0x20201000 if DEBUG_BCM2835 default 0x3e000000 if DEBUG_BCM_KONA_UART default 0x4000e400 if DEBUG_LL_UART_EFM32 - default 0x40090000 if ARCH_LPC32XX + default 0x40090000 if DEBUG_LPC32XX default 0x40100000 if DEBUG_PXA_UART1 - default 0x42000000 if ARCH_GEMINI + default 0x42000000 if DEBUG_GEMINI default 0x50000000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART0 || \ DEBUG_S3C2410_UART0) default 0x50004000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART1 || \ @@ -1075,22 +1131,20 @@ config DEBUG_UART_PHYS default 0x80070000 if DEBUG_IMX23_UART default 0x80074000 if DEBUG_IMX28_UART default 0x80230000 if DEBUG_PICOXCELL_UART - default 0x808c0000 if ARCH_EP93XX + default 0x808c0000 if DEBUG_EP93XX default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART default 0xa9a00000 if DEBUG_MSM_UART default 0xb0090000 if DEBUG_VEXPRESS_UART0_CRX default 0xc0013000 if DEBUG_U300_UART default 0xc8000000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN default 0xc8000003 if ARCH_IXP4XX && CPU_BIG_ENDIAN - default 0xd0000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX + default 0xd0000000 if DEBUG_SPEAR3XX default 0xd0012000 if DEBUG_MVEBU_UART default 0xd4017000 if DEBUG_MMP_UART2 default 0xd4018000 if DEBUG_MMP_UART3 - default 0xe0000000 if ARCH_SPEAR13XX + default 0xe0000000 if DEBUG_SPEAR13XX default 0xf0000be0 if ARCH_EBSA110 default 0xf1012000 if DEBUG_MVEBU_UART_ALTERNATE - default 0xf1012000 if ARCH_DOVE || ARCH_KIRKWOOD || ARCH_MV78XX0 || \ - ARCH_ORION5X default 0xf7fc9000 if DEBUG_BERLIN_UART default 0xf8b00000 if DEBUG_HI3716_UART default 0xf991e000 if DEBUG_QCOM_UARTDM @@ -1114,13 +1168,13 @@ config DEBUG_UART_VIRT default 0xf01fb000 if DEBUG_NOMADIK_UART default 0xf0201000 if DEBUG_BCM2835 default 0xf1000300 if DEBUG_BCM_5301X - default 0xf11f1000 if ARCH_VERSATILE - default 0xf1600000 if ARCH_INTEGRATOR + default 0xf11f1000 if DEBUG_VERSATILE + default 0xf1600000 if DEBUG_INTEGRATOR default 0xf1c28000 if DEBUG_SUNXI_UART0 default 0xf1c28400 if DEBUG_SUNXI_UART1 default 0xf2100000 if DEBUG_PXA_UART1 - default 0xf4090000 if ARCH_LPC32XX - default 0xf4200000 if ARCH_GEMINI + default 0xf4090000 if DEBUG_LPC32XX + default 0xf4200000 if DEBUG_GEMINI default 0xf7000000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART0 || \ DEBUG_S3C2410_UART0) default 0xf7004000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART1 || \ @@ -1133,11 +1187,10 @@ config DEBUG_UART_VIRT default 0xfa71e000 if DEBUG_QCOM_UARTDM default 0xfb009000 if DEBUG_REALVIEW_STD_PORT default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT - default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX - default 0xfd000000 if ARCH_SPEAR13XX - default 0xfd012000 if ARCH_MV78XX0 - default 0xfde12000 if ARCH_DOVE - default 0xfe012000 if ARCH_ORION5X + default 0xfd000000 if DEBUG_SPEAR3XX || DEBUG_SPEAR13XX + default 0xfd012000 if DEBUG_MVEBU_UART_ALTERNATE && ARCH_MV78XX0 + default 0xfde12000 if DEBUG_MVEBU_UART_ALTERNATE && ARCH_DOVE + default 0xfe012000 if DEBUG_MVEBU_UART_ALTERNATE && ARCH_ORION5X default 0xfe017000 if DEBUG_MMP_UART2 default 0xfe018000 if DEBUG_MMP_UART3 default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART @@ -1154,11 +1207,11 @@ config DEBUG_UART_VIRT default 0xfec20000 if DEBUG_DAVINCI_DMx_UART0 default 0xfed0c000 if DEBUG_DAVINCI_DA8XX_UART1 default 0xfed0d000 if DEBUG_DAVINCI_DA8XX_UART2 - default 0xfed12000 if ARCH_KIRKWOOD + default 0xfed12000 if DEBUG_MVEBU_UART_ALTERNATE && ARCH_KIRKWOOD default 0xfed60000 if DEBUG_RK29_UART0 default 0xfed64000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2 default 0xfed68000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3 - default 0xfedc0000 if ARCH_EP93XX + default 0xfedc0000 if DEBUG_EP93XX default 0xfee003f8 if FOOTBRIDGE default 0xfee20000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART default 0xfee82340 if ARCH_IOP13XX @@ -1191,7 +1244,7 @@ config DEBUG_UART_8250_WORD config DEBUG_UART_8250_FLOW_CONTROL bool "Enable flow control for 8250 UART" depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 - default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_GEMINI || ARCH_RPC + default y if ARCH_EBSA110 || FOOTBRIDGE || DEBUG_GEMINI || ARCH_RPC
config DEBUG_UNCOMPRESS bool
On Monday 14 July 2014 17:27:49 Arnd Bergmann wrote:
Signed-off-by: Arnd Bergmann arnd@arndb.de
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 8f90595069a1..0f89d1b84524 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -200,6 +200,14 @@ choice Say Y here if you want the debug print routines to direct their output to the serial port in the DC21285 (Footbridge).
- config DEBUG_EP93XX
bool "Kernel low-level debugging messages via ep93xx UART"
depends on ARCH_EP93XX
select DEBUG_UART_PL01X
help
Say Y here if you want kernel low-level debugging support
on Cirrus Logic EP93xx based platforms.
FWIW, this part was broken, fixup below. The problem is that the decompress.h for ep93xx uses CONFIG_DEBUG_UART_PHYS even when DEBUG_LL is disabled.
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 362d764cd358..a99b28029983 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1139,7 +1139,7 @@ config DEBUG_UART_PHYS default 0x80070000 if DEBUG_IMX23_UART default 0x80074000 if DEBUG_IMX28_UART default 0x80230000 if DEBUG_PICOXCELL_UART - default 0x808c0000 if DEBUG_EP93XX + default 0x808c0000 if DEBUG_EP93XX || ARCH_EP93XX default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART default 0xa9a00000 if DEBUG_MSM_UART default 0xb0090000 if DEBUG_VEXPRESS_UART0_CRX @@ -1166,7 +1166,8 @@ config DEBUG_UART_PHYS depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_LL_UART_EFM32 || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ - DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART + DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \ + ARCH_EP93XX
config DEBUG_UART_VIRT hex "Virtual base address of debug UART"
On 15/07/14 11:32, Arnd Bergmann wrote:
On Monday 14 July 2014 17:27:49 Arnd Bergmann wrote:
Signed-off-by: Arnd Bergmann arnd@arndb.de
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 8f90595069a1..0f89d1b84524 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -200,6 +200,14 @@ choice Say Y here if you want the debug print routines to direct their output to the serial port in the DC21285 (Footbridge).
- config DEBUG_EP93XX
bool "Kernel low-level debugging messages via ep93xx UART"
depends on ARCH_EP93XX
select DEBUG_UART_PL01X
help
Say Y here if you want kernel low-level debugging support
on Cirrus Logic EP93xx based platforms.
FWIW, this part was broken, fixup below. The problem is that the decompress.h for ep93xx uses CONFIG_DEBUG_UART_PHYS even when DEBUG_LL is disabled.
Thanks (this fix is already in my patchset but your proposal means it needs changing slightly).
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 362d764cd358..a99b28029983 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1139,7 +1139,7 @@ config DEBUG_UART_PHYS default 0x80070000 if DEBUG_IMX23_UART default 0x80074000 if DEBUG_IMX28_UART default 0x80230000 if DEBUG_PICOXCELL_UART
- default 0x808c0000 if DEBUG_EP93XX
- default 0x808c0000 if DEBUG_EP93XX || ARCH_EP93XX default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART default 0xa9a00000 if DEBUG_MSM_UART default 0xb0090000 if DEBUG_VEXPRESS_UART0_CRX
@@ -1166,7 +1166,8 @@ config DEBUG_UART_PHYS depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_LL_UART_EFM32 || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \
DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART
DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \
ARCH_EP93XX
config DEBUG_UART_VIRT hex "Virtual base address of debug UART"
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. Currently the user selected kbuild setting is ignored and the PL01X's DEBUG_LL stub is silently selected instead. This is a pain if your hardware doesn't have this cell, not least because it takes a little time to figure out that kbuild built the wrong code.
Warning:
silentoldconfig on PL011 single platforms will result in DEBUG_LL being directed at ICEDCC rather than PL011. This should only affect silentoldconfig since oldconfig prompts and the defconfigs have been updated to avoid this problem.
Changes since v7: - Killed DEBUG_LL_UART_NONE completely and migrated over the four remaining platforms that relied on this (Arnd Bergmann, Russell King). This fixes some problems with oldconfig builds. - Rebased on latest mainline (v3.17rc1).
Changes since v6: - Removed a patch to limit DEBUG_LL_UART_NONE to platforms that support it because it almost time to drop DEBUG_LL_UART_NONE anyway (only four platforms still use it). - Rebased on latest mainline (v3.16rc3).
Changes since v5:
- Shortened the list of platforms that can select DEBUG_LL_UART_NONE (changes Arnd Bergmann) - Rebased on latest mainline (v3.15rc7).
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)
Daniel Thompson (9): arm: versatile: Enable DEBUG_LL_UART_PL01X arm: ep93xx: Enable DEBUG_LL_UART_PL01X arm: Remove DEBUG_LL_UART_NONE arm: ks8695: Migrate debug_ll macros to shared directory arm: omap1: Migrate debug_ll macros to use 8250.S arm: netx: Migrate DEBUG_LL macros to shared directory arm: sa1100: Migrate DEBUG_LL macros to shared directory arm: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)
arch/arm/Kconfig.debug | 138 ++++++++++++++++++++---- arch/arm/configs/ep93xx_defconfig | 1 + arch/arm/configs/versatile_defconfig | 1 + arch/arm/include/debug/ks8695.S | 40 +++++++ arch/arm/include/debug/netx.S | 36 +++++++ arch/arm/include/debug/sa1100.S | 37 +++++++ arch/arm/mach-ks8695/include/mach/debug-macro.S | 36 ------- arch/arm/mach-netx/include/mach/debug-macro.S | 36 ------- arch/arm/mach-omap1/include/mach/debug-macro.S | 101 ----------------- arch/arm/mach-sa1100/include/mach/debug-macro.S | 62 ----------- 10 files changed, 233 insertions(+), 255 deletions(-) create mode 100644 arch/arm/include/debug/ks8695.S create mode 100644 arch/arm/include/debug/netx.S create mode 100644 arch/arm/include/debug/sa1100.S delete mode 100644 arch/arm/mach-ks8695/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-netx/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-omap1/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-sa1100/include/mach/debug-macro.S
-- 1.9.3
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 daniel.thompson@linaro.org Acked-by: Arnd Bergmann arnd@arndb.de --- 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 d52b4ff..ea49d37 100644 --- a/arch/arm/configs/versatile_defconfig +++ b/arch/arm/configs/versatile_defconfig @@ -82,5 +82,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
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 daniel.thompson@linaro.org Acked-by: Arnd Bergmann arnd@arndb.de --- 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 1b650c8..72233b9 100644 --- a/arch/arm/configs/ep93xx_defconfig +++ b/arch/arm/configs/ep93xx_defconfig @@ -107,5 +107,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
Only a very 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 defconfig/oldconfig since it is often selected by default.
This patch solves the problem by removing this option. Any platforms still depending upon this option must be migrated.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk --- arch/arm/Kconfig.debug | 9 --------- 1 file changed, 9 deletions(-)
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index b11ad54..9c46729 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -877,15 +877,6 @@ choice This option selects UART0 on VIA/Wondermedia System-on-a-chip devices, including VT8500, WM8505, WM8650 and WM8850.
- config DEBUG_LL_UART_NONE - bool "No low-level debugging UART" - depends on !ARCH_MULTIPLATFORM - help - Say Y here if your platform doesn't provide a UART option - above. This relies on your platform choosing the right UART - definition internally in order for low-level debugging to - work. - config DEBUG_ICEDCC bool "Kernel low-level debugging via EmbeddedICE DCC channel" help
As part of the migration a couple of uart definitions have been copied from of the platform specific header files.
Note that, in order to keep oldconfig working nicely we must defer the removal of arch/arm/mach-ks8695/include/mach/debug-macro.S until DEBUG_LL_UART_NONE has been removed.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk Cc: Greg Ungerer gerg@uclinux.org Cc: Arnd Bergmann arnd.bergmann@linaro.org --- arch/arm/Kconfig.debug | 8 +++++ arch/arm/include/debug/ks8695.S | 40 +++++++++++++++++++++++++ arch/arm/mach-ks8695/include/mach/debug-macro.S | 36 ---------------------- 3 files changed, 48 insertions(+), 36 deletions(-) create mode 100644 arch/arm/include/debug/ks8695.S delete mode 100644 arch/arm/mach-ks8695/include/mach/debug-macro.S
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 9c46729..97c3058 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -348,6 +348,13 @@ choice Say Y here if you want the debug print routines to direct their output to UART1 serial port on KEYSTONE2 devices.
+ config DEBUG_KS8695_UART + bool "KS8695 Debug UART" + depends on ARCH_KS8695 + help + Say Y here if you want kernel low-level debugging support + on KS8695. + config DEBUG_MMP_UART2 bool "Kernel low-level debugging message via MMP UART2" depends on ARCH_MMP @@ -1017,6 +1024,7 @@ config DEBUG_LL_INCLUDE DEBUG_IMX6Q_UART || \ DEBUG_IMX6SL_UART || \ DEBUG_IMX6SX_UART + default "debug/ks8695.S" if DEBUG_KS8695_UART default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART diff --git a/arch/arm/include/debug/ks8695.S b/arch/arm/include/debug/ks8695.S new file mode 100644 index 0000000..961da1f --- /dev/null +++ b/arch/arm/include/debug/ks8695.S @@ -0,0 +1,40 @@ +/* + * arch/arm/include/debug/ks8695.S + * + * Copyright (C) 2006 Ben Dooks ben@simtec.co.uk + * Copyright (C) 2006 Simtec Electronics + * + * KS8695 - Debug macros + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#define KS8695_UART_PA 0x03ffe000 +#define KS8695_UART_VA 0xf00fe000 +#define KS8695_URTH (0x04) +#define KS8695_URLS (0x14) +#define URLS_URTE (1 << 6) +#define URLS_URTHRE (1 << 5) + + .macro addruart, rp, rv, tmp + ldr \rp, =KS8695_UART_PA @ physical base address + ldr \rv, =KS8695_UART_VA @ virtual base address + .endm + + .macro senduart, rd, rx + str \rd, [\rx, #KS8695_URTH] @ Write to Transmit Holding Register + .endm + + .macro busyuart, rd, rx +1001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register + tst \rd, #URLS_URTE @ Holding & Shift registers empty? + beq 1001b + .endm + + .macro waituart, rd, rx +1001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register + tst \rd, #URLS_URTHRE @ Holding Register empty? + beq 1001b + .endm diff --git a/arch/arm/mach-ks8695/include/mach/debug-macro.S b/arch/arm/mach-ks8695/include/mach/debug-macro.S deleted file mode 100644 index a79e489..0000000 --- a/arch/arm/mach-ks8695/include/mach/debug-macro.S +++ /dev/null @@ -1,36 +0,0 @@ -/* - * arch/arm/mach-ks8695/include/mach/debug-macro.S - * - * Copyright (C) 2006 Ben Dooks ben@simtec.co.uk - * Copyright (C) 2006 Simtec Electronics - * - * KS8695 - Debug macros - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <mach/hardware.h> -#include <mach/regs-uart.h> - - .macro addruart, rp, rv, tmp - ldr \rp, =KS8695_UART_PA @ physical base address - ldr \rv, =KS8695_UART_VA @ virtual base address - .endm - - .macro senduart, rd, rx - str \rd, [\rx, #KS8695_URTH] @ Write to Transmit Holding Register - .endm - - .macro busyuart, rd, rx -1001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register - tst \rd, #URLS_URTE @ Holding & Shift registers empty? - beq 1001b - .endm - - .macro waituart, rd, rx -1001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register - tst \rd, #URLS_URTHRE @ Holding Register empty? - beq 1001b - .endm
The omap1's debug-macro.S is similar to the generic 8250 code. Compared to the 8520 code the omap1 macro automatically determines what UART to use based on breadcrumbs left by the bootloader and automatically copes with the eccentric register layout on OMAP7XX.
This patch drops both these features and relies instead on the generic 8250 macros:
1. Dropping support for the bootloader breadcrumbs is identical to the way the migration was handled for OMAP2 (see 808b7e07464d...).
2. Support for OMAP7XX still exists but it must be configured by hand (DEBUG_OMAP7XXUART1/2/3) rather than handled at runtime.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk Cc: linux-arm-kernel@lists.infradead.org Cc: Tony Lindgren tony@atomide.com Cc: Arnd Bergmann arnd.bergmann@linaro.org Cc: linux-omap@vger.kernel.org Tested-by: Aaro Koskinen aaro.koskinen@iki.fi --- arch/arm/Kconfig.debug | 57 +++++++++++++- arch/arm/mach-omap1/include/mach/debug-macro.S | 101 ------------------------- 2 files changed, 56 insertions(+), 102 deletions(-) delete mode 100644 arch/arm/mach-omap1/include/mach/debug-macro.S
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 97c3058..01f4ee2 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -471,6 +471,30 @@ choice Say Y here if you want kernel low-level debugging support on TI-NSPIRE CX models.
+ config DEBUG_OMAP1UART1 + bool "Kernel low-level debugging via OMAP1 UART1" + depends on ARCH_OMAP1 + select DEBUG_UART_8250 + help + Say Y here if you want kernel low-level debugging support + on OMAP1 based platforms (expect OMAP730) on the UART1. + + config DEBUG_OMAP1UART2 + bool "Kernel low-level debugging via OMAP1 UART2" + depends on ARCH_OMAP1 + select DEBUG_UART_8250 + help + Say Y here if you want kernel low-level debugging support + on OMAP1 based platforms (expect OMAP730) on the UART2. + + config DEBUG_OMAP1UART3 + bool "Kernel low-level debugging via OMAP1 UART3" + depends on ARCH_OMAP1 + select DEBUG_UART_8250 + help + Say Y here if you want kernel low-level debugging support + on OMAP1 based platforms (expect OMAP730) on the UART3. + config DEBUG_OMAP2UART1 bool "OMAP2/3/4 UART1 (omap2/3 sdp boards and some omap3 boards)" depends on ARCH_OMAP2PLUS @@ -513,6 +537,30 @@ choice depends on ARCH_OMAP2PLUS select DEBUG_OMAP2PLUS_UART
+ config DEBUG_OMAP7XXUART1 + bool "Kernel low-level debugging via OMAP730 UART1" + depends on ARCH_OMAP730 + select DEBUG_UART_8250 + help + Say Y here if you want kernel low-level debugging support + on OMAP730 based platforms on the UART1. + + config DEBUG_OMAP7XXUART2 + bool "Kernel low-level debugging via OMAP730 UART2" + depends on ARCH_OMAP730 + select DEBUG_UART_8250 + help + Say Y here if you want kernel low-level debugging support + on OMAP730 based platforms on the UART2. + + config DEBUG_OMAP7XXUART3 + bool "Kernel low-level debugging via OMAP730 UART3" + depends on ARCH_OMAP730 + select DEBUG_UART_8250 + help + Say Y here if you want kernel low-level debugging support + on OMAP730 based platforms on the UART3. + config DEBUG_TI81XXUART1 bool "Kernel low-level debugging messages via TI81XX UART1 (ti8148evm)" depends on ARCH_OMAP2PLUS @@ -1120,6 +1168,9 @@ config DEBUG_UART_PHYS default 0xff690000 if DEBUG_RK32_UART2 default 0xffc02000 if DEBUG_SOCFPGA_UART default 0xffd82340 if ARCH_IOP13XX + default 0xfffb0000 if DEBUG_OMAP1UART1 || DEBUG_OMAP7XXUART1 + default 0xfffb0800 if DEBUG_OMAP1UART2 || DEBUG_OMAP7XXUART2 + default 0xfffb9800 if DEBUG_OMAP1UART3 || DEBUG_OMAP7XXUART3 default 0xfff36000 if DEBUG_HIGHBANK_UART default 0xfffff700 if ARCH_IOP33X depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ @@ -1188,6 +1239,9 @@ config DEBUG_UART_VIRT default 0xfef00000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN default 0xfef00003 if ARCH_IXP4XX && CPU_BIG_ENDIAN default 0xfef36000 if DEBUG_HIGHBANK_UART + default 0xfefb0000 if DEBUG_OMAP1UART1 || DEBUG_OMAP7XXUART1 + default 0xfefb0800 if DEBUG_OMAP1UART2 || DEBUG_OMAP7XXUART2 + default 0xfefb9800 if DEBUG_OMAP1UART3 || DEBUG_OMAP7XXUART3 default 0xfefff700 if ARCH_IOP33X default 0xff003000 if DEBUG_U300_UART default DEBUG_UART_PHYS if !MMU @@ -1198,7 +1252,8 @@ config DEBUG_UART_VIRT config DEBUG_UART_8250_SHIFT int "Register offset shift for the 8250 debug UART" depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 - default 0 if FOOTBRIDGE || ARCH_IOP32X + default 0 if FOOTBRIDGE || ARCH_IOP32X || \ + DEBUG_OMAP7XXUART1 || DEBUG_OMAP7XXUART2 || DEBUG_OMAP7XXUART3 default 2
config DEBUG_UART_8250_WORD diff --git a/arch/arm/mach-omap1/include/mach/debug-macro.S b/arch/arm/mach-omap1/include/mach/debug-macro.S deleted file mode 100644 index 5c1a26c..0000000 --- a/arch/arm/mach-omap1/include/mach/debug-macro.S +++ /dev/null @@ -1,101 +0,0 @@ -/* arch/arm/mach-omap1/include/mach/debug-macro.S - * - * Debugging macro include header - * - * Copyright (C) 1994-1999 Russell King - * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * -*/ - -#include <linux/serial_reg.h> - -#include "serial.h" - - .pushsection .data -omap_uart_phys: .word 0x0 -omap_uart_virt: .word 0x0 - .popsection - - /* - * Note that this code won't work if the bootloader passes - * a wrong machine ID number in r1. To debug, just hardcode - * the desired UART phys and virt addresses temporarily into - * the omap_uart_phys and omap_uart_virt above. - */ - .macro addruart, rp, rv, tmp - - /* Use omap_uart_phys/virt if already configured */ -9: adr \rp, 99f @ get effective addr of 99f - ldr \rv, [\rp] @ get absolute addr of 99f - sub \rv, \rv, \rp @ offset between the two - ldr \rp, [\rp, #4] @ abs addr of omap_uart_phys - sub \tmp, \rp, \rv @ make it effective - ldr \rp, [\tmp, #0] @ omap_uart_phys - ldr \rv, [\tmp, #4] @ omap_uart_virt - cmp \rp, #0 @ is port configured? - cmpne \rv, #0 - bne 100f @ already configured - - /* Check the debug UART configuration set in uncompress.h */ - and \rp, pc, #0xff000000 - ldr \rv, =OMAP_UART_INFO_OFS - ldr \rp, [\rp, \rv] - - /* Select the UART to use based on the UART1 scratchpad value */ -10: cmp \rp, #0 @ no port configured? - beq 11f @ if none, try to use UART1 - cmp \rp, #OMAP1UART1 - beq 11f @ configure OMAP1UART1 - cmp \rp, #OMAP1UART2 - beq 12f @ configure OMAP1UART2 - cmp \rp, #OMAP1UART3 - beq 13f @ configure OMAP2UART3 - - /* Configure the UART offset from the phys/virt base */ -11: mov \rp, #0x00fb0000 @ OMAP1UART1 - b 98f -12: mov \rp, #0x00fb0000 @ OMAP1UART1 - orr \rp, \rp, #0x00000800 @ OMAP1UART2 - b 98f -13: mov \rp, #0x00fb0000 @ OMAP1UART1 - orr \rp, \rp, #0x00000800 @ OMAP1UART2 - orr \rp, \rp, #0x00009000 @ OMAP1UART3 - - /* Store both phys and virt address for the uart */ -98: add \rp, \rp, #0xff000000 @ phys base - str \rp, [\tmp, #0] @ omap_uart_phys - sub \rp, \rp, #0xff000000 @ phys base - add \rp, \rp, #0xfe000000 @ virt base - str \rp, [\tmp, #4] @ omap_uart_virt - b 9b - - .align -99: .word . - .word omap_uart_phys - .ltorg - -100: - .endm - - .macro senduart,rd,rx - strb \rd, [\rx] - .endm - - .macro busyuart,rd,rx -1001: ldrb \rd, [\rx, #(UART_LSR << OMAP_PORT_SHIFT)] - and \rd, \rd, #(UART_LSR_TEMT | UART_LSR_THRE) - teq \rd, #(UART_LSR_TEMT | UART_LSR_THRE) - beq 1002f - ldrb \rd, [\rx, #(UART_LSR << OMAP7XX_PORT_SHIFT)] - and \rd, \rd, #(UART_LSR_TEMT | UART_LSR_THRE) - teq \rd, #(UART_LSR_TEMT | UART_LSR_THRE) - bne 1001b -1002: - .endm - - .macro waituart,rd,rx - .endm
As part of the migration we introduce DEBUG_UART_PHYS/DEBUG_UART_VIRT which default to UART1 but allow a user to configure UART2 or UART3. We also introduce symbolic names for the registers and flags.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk Acked-by: Arnd Bergmann arnd.bergmann@linaro.org Cc: linux-arm-kernel@lists.infradead.org --- arch/arm/Kconfig.debug | 17 +++++++++++-- arch/arm/include/debug/netx.S | 36 +++++++++++++++++++++++++++ arch/arm/mach-netx/include/mach/debug-macro.S | 36 --------------------------- 3 files changed, 51 insertions(+), 38 deletions(-) create mode 100644 arch/arm/include/debug/netx.S delete mode 100644 arch/arm/mach-netx/include/mach/debug-macro.S
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 01f4ee2..d71427e 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -447,6 +447,14 @@ choice Say Y here if you want kernel low-level debugging support on Vybrid based platforms.
+ config DEBUG_NETX_UART + bool "Kernel low-level debugging messages via NetX UART" + depends on ARCH_NETX + select DEBUG_UART_NETX + help + Say Y here if you want kernel low-level debugging support + on Hilscher NetX based platforms. + config DEBUG_NOMADIK_UART bool "Kernel low-level debugging messages via NOMADIK UART" depends on ARCH_NOMADIK @@ -1074,6 +1082,7 @@ config DEBUG_LL_INCLUDE DEBUG_IMX6SX_UART default "debug/ks8695.S" if DEBUG_KS8695_UART default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM + default "debug/netx.S" if DEBUG_NETX_UART default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART default "debug/s5pv210.S" if DEBUG_S5PV210_UART @@ -1106,6 +1115,7 @@ config DEBUG_UART_8250
config DEBUG_UART_PHYS hex "Physical base address of debug UART" + default 0x00100a00 if DEBUG_NETX_UART default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0 default 0x01c28000 if DEBUG_SUNXI_UART0 default 0x01c28400 if DEBUG_SUNXI_UART1 @@ -1176,10 +1186,12 @@ config DEBUG_UART_PHYS depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_LL_UART_EFM32 || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ - DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART + DEBUG_MSM_UART || DEBUG_NETX_UART || DEBUG_QCOM_UARTDM || \ + DEBUG_S3C24XX_UART
config DEBUG_UART_VIRT hex "Virtual base address of debug UART" + default 0xe0000a00 if DEBUG_NETX_UART default 0xe0010fe0 if ARCH_RPC default 0xe1000000 if DEBUG_MSM_UART default 0xf0000be0 if ARCH_EBSA110 @@ -1247,7 +1259,8 @@ config DEBUG_UART_VIRT default DEBUG_UART_PHYS if !MMU depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ - DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART + DEBUG_MSM_UART || DEBUG_NETX_UART || DEBUG_QCOM_UARTDM || \ + DEBUG_S3C24XX_UART
config DEBUG_UART_8250_SHIFT int "Register offset shift for the 8250 debug UART" diff --git a/arch/arm/include/debug/netx.S b/arch/arm/include/debug/netx.S new file mode 100644 index 0000000..cf7522a --- /dev/null +++ b/arch/arm/include/debug/netx.S @@ -0,0 +1,36 @@ +/* + * Debugging macro include header + * + * Copyright (C) 1994-1999 Russell King + * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * +*/ + +#define UART_DATA 0 +#define UART_FLAG 0x18 +#define UART_FLAG_BUSY (1 << 3) + + .macro addruart, rp, rv, tmp + ldr \rp, =CONFIG_DEBUG_UART_PHYS + ldr \rp, =CONFIG_DEBUG_UART_VIRT + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #UART_DATA] + .endm + + .macro busyuart,rd,rx +1002: ldr \rd, [\rx, #UART_FLAG] + tst \rd, #UART_FLAG_BUSY + bne 1002b + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #UART_FLAG] + tst \rd, #UART_FLAG_BUSY + bne 1001b + .endm diff --git a/arch/arm/mach-netx/include/mach/debug-macro.S b/arch/arm/mach-netx/include/mach/debug-macro.S deleted file mode 100644 index 247781e..0000000 --- a/arch/arm/mach-netx/include/mach/debug-macro.S +++ /dev/null @@ -1,36 +0,0 @@ -/* arch/arm/mach-netx/include/mach/debug-macro.S - * - * Debugging macro include header - * - * Copyright (C) 1994-1999 Russell King - * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * -*/ - -#include "hardware.h" - - .macro addruart, rp, rv, tmp - mov \rp, #0x00000a00 - orr \rv, \rp, #io_p2v(0x00100000) @ virtual - orr \rp, \rp, #0x00100000 @ physical - .endm - - .macro senduart,rd,rx - str \rd, [\rx, #0] - .endm - - .macro busyuart,rd,rx -1002: ldr \rd, [\rx, #0x18] - tst \rd, #(1 << 3) - bne 1002b - .endm - - .macro waituart,rd,rx -1001: ldr \rd, [\rx, #0x18] - tst \rd, #(1 << 3) - bne 1001b - .endm
On Tue, 2014-08-19 at 15:48 +0100, Daniel Thompson wrote:
As part of the migration we introduce DEBUG_UART_PHYS/DEBUG_UART_VIRT which default to UART1 but allow a user to configure UART2 or UART3. We also introduce symbolic names for the registers and flags.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk Acked-by: Arnd Bergmann arnd.bergmann@linaro.org Cc: linux-arm-kernel@lists.infradead.org
This patch landed in today's linux-next, as 880fa9b6fd73 ("ARM: 8144/1: netx: Migrate DEBUG_LL macros to shared directory").
[...] --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -447,6 +447,14 @@ choice Say Y here if you want kernel low-level debugging support on Vybrid based platforms.
- config DEBUG_NETX_UART
bool "Kernel low-level debugging messages via NetX UART"
depends on ARCH_NETX
select DEBUG_UART_NETX
There's no Kconfig symbol DEBUG_UART_NETX in next-20140915. So in linux-next this is currently a nop. Is this symbol queued somewhere?
help
Say Y here if you want kernel low-level debugging support
on Hilscher NetX based platforms.
- config DEBUG_NOMADIK_UART bool "Kernel low-level debugging messages via NOMADIK UART" depends on ARCH_NOMADIK
Paul Bolle
On 15/09/14 17:34, Paul Bolle wrote:
On Tue, 2014-08-19 at 15:48 +0100, Daniel Thompson wrote:
As part of the migration we introduce DEBUG_UART_PHYS/DEBUG_UART_VIRT which default to UART1 but allow a user to configure UART2 or UART3. We also introduce symbolic names for the registers and flags.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk Acked-by: Arnd Bergmann arnd.bergmann@linaro.org Cc: linux-arm-kernel@lists.infradead.org
This patch landed in today's linux-next, as 880fa9b6fd73 ("ARM: 8144/1: netx: Migrate DEBUG_LL macros to shared directory").
[...] --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -447,6 +447,14 @@ choice Say Y here if you want kernel low-level debugging support on Vybrid based platforms.
- config DEBUG_NETX_UART
bool "Kernel low-level debugging messages via NetX UART"
depends on ARCH_NETX
select DEBUG_UART_NETX
There's no Kconfig symbol DEBUG_UART_NETX in next-20140915. So in linux-next this is currently a nop. Is this symbol queued somewhere?
No. The symbol isn't queued anywhere.
DEBUG_UART_NETX is a config value that existed transiently when I wrote the patch and I didn't clean it up properly. I suspect its visual similarity to DEBUG_NETX_UART means it didn't jump out when I self reviewed.
Thanks for raising this. I will share a patch to remove this.
On 15/09/14 22:47, Daniel Thompson wrote:
On 15/09/14 17:34, Paul Bolle wrote:
On Tue, 2014-08-19 at 15:48 +0100, Daniel Thompson wrote:
As part of the migration we introduce DEBUG_UART_PHYS/DEBUG_UART_VIRT which default to UART1 but allow a user to configure UART2 or UART3. We also introduce symbolic names for the registers and flags.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk Acked-by: Arnd Bergmann arnd.bergmann@linaro.org Cc: linux-arm-kernel@lists.infradead.org
This patch landed in today's linux-next, as 880fa9b6fd73 ("ARM: 8144/1: netx: Migrate DEBUG_LL macros to shared directory").
[...] --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -447,6 +447,14 @@ choice Say Y here if you want kernel low-level debugging support on Vybrid based platforms.
- config DEBUG_NETX_UART
bool "Kernel low-level debugging messages via NetX UART"
depends on ARCH_NETX
select DEBUG_UART_NETX
There's no Kconfig symbol DEBUG_UART_NETX in next-20140915. So in linux-next this is currently a nop. Is this symbol queued somewhere?
No. The symbol isn't queued anywhere.
DEBUG_UART_NETX is a config value that existed transiently when I wrote the patch and I didn't clean it up properly. I suspect its visual similarity to DEBUG_NETX_UART means it didn't jump out when I self reviewed.
Thanks for raising this. I will share a patch to remove this.
I was just finalizing this and, since it was on my screen anyway, took another look at my assembler changes.
They are broken! Rather than initializing \rp and \rv as they are supposed to they set \rp to two different values leaving \rv uninitialized.
This I will also fix.
Daniel.
As part of the migration we copy a few definitions from the mach-sa1100 headers and replace the automatic serial port detectiion with explicit configuration based on DEBUG_UART_PHYS/DEBUG_UART_VIRT.
The removal of the automatic configuration is similar to the way migration was handled for OMAP2 (see 808b7e07464d...).
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk --- arch/arm/Kconfig.debug | 41 ++++++++++++++-- arch/arm/include/debug/sa1100.S | 37 +++++++++++++++ arch/arm/mach-sa1100/include/mach/debug-macro.S | 62 ------------------------- 3 files changed, 75 insertions(+), 65 deletions(-) create mode 100644 arch/arm/include/debug/sa1100.S delete mode 100644 arch/arm/mach-sa1100/include/mach/debug-macro.S
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index d71427e..227ae88 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -762,6 +762,30 @@ choice their output to UART 2. The port must have been initialised by the boot-loader before use.
+ config DEBUG_SA1100_UART1 + depends on ARCH_SA1100 + select DEBUG_SA1100_UART + bool "Kernel low-level debugging messages via SA1100 Ser1" + help + Say Y here if you want kernel low-level debugging support + on SA1100 based platforms. + + config DEBUG_SA1100_UART2 + depends on ARCH_SA1100 + select DEBUG_SA1100_UART + bool "Kernel low-level debugging messages via SA1100 Ser2" + help + Say Y here if you want kernel low-level debugging support + on SA1100 based platforms. + + config DEBUG_SA1100_UART3 + depends on ARCH_SA1100 + select DEBUG_SA1100_UART + bool "Kernel low-level debugging messages via SA1100 Ser3" + help + Say Y here if you want kernel low-level debugging support + on SA1100 based platforms. + config DEBUG_SOCFPGA_UART depends on ARCH_SOCFPGA bool "Use SOCFPGA UART for low-level debug" @@ -1057,6 +1081,10 @@ config DEBUG_TEGRA_UART bool depends on ARCH_TEGRA
+config DEBUG_SA1100_UART + bool + depends on ARCH_SA1100 + config DEBUG_STI_UART bool depends on ARCH_STI @@ -1086,6 +1114,7 @@ config DEBUG_LL_INCLUDE default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART default "debug/s5pv210.S" if DEBUG_S5PV210_UART + default "debug/sa1100.S" if DEBUG_SA1100_UART default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 default "debug/sti.S" if DEBUG_STI_UART default "debug/tegra.S" if DEBUG_TEGRA_UART @@ -1105,7 +1134,7 @@ config DEBUG_UART_PL01X ARCH_SPEAR13XX || \ ARCH_VERSATILE
-# Compatibility options for 8250 +#Compatibility options for 8250 config DEBUG_UART_8250 def_bool ARCH_DOVE || ARCH_EBSA110 || \ (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \ @@ -1151,6 +1180,9 @@ config DEBUG_UART_PHYS default 0x50008000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART2 || \ DEBUG_S3C2410_UART2) default 0x7c0003f8 if FOOTBRIDGE + default 0x80010000 if DEBUG_SA1100_UART1 + default 0x80030000 if DEBUG_SA1100_UART2 + default 0x80050000 if DEBUG_SA1100_UART3 default 0x80070000 if DEBUG_IMX23_UART default 0x80074000 if DEBUG_IMX28_UART default 0x80230000 if DEBUG_PICOXCELL_UART @@ -1187,7 +1219,7 @@ config DEBUG_UART_PHYS DEBUG_LL_UART_EFM32 || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ DEBUG_MSM_UART || DEBUG_NETX_UART || DEBUG_QCOM_UARTDM || \ - DEBUG_S3C24XX_UART + DEBUG_S3C24XX_UART || DEBUG_SA1100_UART
config DEBUG_UART_VIRT hex "Virtual base address of debug UART" @@ -1215,6 +1247,9 @@ config DEBUG_UART_VIRT DEBUG_S3C2410_UART2) default 0xf7fc9000 if DEBUG_BERLIN_UART default 0xf8009000 if DEBUG_VEXPRESS_UART0_CA9 + default 0xf8010000 if DEBUG_SA1100_UART1 + default 0xf8030000 if DEBUG_SA1100_UART2 + default 0xf8050000 if DEBUG_SA1100_UART3 default 0xf8090000 if DEBUG_VEXPRESS_UART0_RS1 default 0xfa71e000 if DEBUG_QCOM_UARTDM default 0xfb009000 if DEBUG_REALVIEW_STD_PORT @@ -1260,7 +1295,7 @@ config DEBUG_UART_VIRT depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ DEBUG_MSM_UART || DEBUG_NETX_UART || DEBUG_QCOM_UARTDM || \ - DEBUG_S3C24XX_UART + DEBUG_S3C24XX_UART || DEBUG_SA1100_UART
config DEBUG_UART_8250_SHIFT int "Register offset shift for the 8250 debug UART" diff --git a/arch/arm/include/debug/sa1100.S b/arch/arm/include/debug/sa1100.S new file mode 100644 index 0000000..6b5e1ce --- /dev/null +++ b/arch/arm/include/debug/sa1100.S @@ -0,0 +1,37 @@ +/* + * Debugging macro include header + * + * Copyright (C) 1994-1999 Russell King + * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * +*/ + +#define UTDR 0x14 +#define UTSR1 0x20 +#define UTSR1_TBY 0x00000001 /* Transmitter BusY (read) */ +#define UTSR1_TNF 0x00000004 /* Transmit FIFO Not Full (read) */ + + .macro addruart, rp, rv, tmp + ldr \rp, =CONFIG_DEBUG_UART_PHYS + ldr \rv, =CONFIG_DEBUG_UART_VIRT + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #UTDR] + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #UTSR1] + tst \rd, #UTSR1_TNF + beq 1001b + .endm + + .macro busyuart,rd,rx +1001: ldr \rd, [\rx, #UTSR1] + tst \rd, #UTSR1_TBY + bne 1001b + .endm diff --git a/arch/arm/mach-sa1100/include/mach/debug-macro.S b/arch/arm/mach-sa1100/include/mach/debug-macro.S deleted file mode 100644 index 530772d..0000000 --- a/arch/arm/mach-sa1100/include/mach/debug-macro.S +++ /dev/null @@ -1,62 +0,0 @@ -/* arch/arm/mach-sa1100/include/mach/debug-macro.S - * - * Debugging macro include header - * - * Copyright (C) 1994-1999 Russell King - * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * -*/ -#include <mach/hardware.h> - - .macro addruart, rp, rv, tmp - mrc p15, 0, \rp, c1, c0 - tst \rp, #1 @ MMU enabled? - moveq \rp, #0x80000000 @ physical base address - movne \rp, #0xf8000000 @ virtual address - - @ We probe for the active serial port here, coherently with - @ the comment in arch/arm/mach-sa1100/include/mach/uncompress.h. - @ We assume r1 can be clobbered. - - @ see if Ser3 is active - add \rp, \rp, #0x00050000 - ldr \rv, [\rp, #UTCR3] - tst \rv, #UTCR3_TXE - - @ if Ser3 is inactive, then try Ser1 - addeq \rp, \rp, #(0x00010000 - 0x00050000) - ldreq \rv, [\rp, #UTCR3] - tsteq \rv, #UTCR3_TXE - - @ if Ser1 is inactive, then try Ser2 - addeq \rp, \rp, #(0x00030000 - 0x00010000) - ldreq \rv, [\rp, #UTCR3] - tsteq \rv, #UTCR3_TXE - - @ clear top bits, and generate both phys and virt addresses - lsl \rp, \rp, #8 - lsr \rp, \rp, #8 - orr \rv, \rp, #0xf8000000 @ virtual - orr \rp, \rp, #0x80000000 @ physical - - .endm - - .macro senduart,rd,rx - str \rd, [\rx, #UTDR] - .endm - - .macro waituart,rd,rx -1001: ldr \rd, [\rx, #UTSR1] - tst \rd, #UTSR1_TNF - beq 1001b - .endm - - .macro busyuart,rd,rx -1001: ldr \rd, [\rx, #UTSR1] - tst \rd, #UTSR1_TBY - bne 1001b - .endm
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 daniel.thompson@linaro.org Acked-by: Arnd Bergmann arnd@arndb.de --- 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 227ae88..f92b98f 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1219,7 +1219,8 @@ config DEBUG_UART_PHYS DEBUG_LL_UART_EFM32 || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ DEBUG_MSM_UART || DEBUG_NETX_UART || DEBUG_QCOM_UARTDM || \ - DEBUG_S3C24XX_UART || DEBUG_SA1100_UART + DEBUG_S3C24XX_UART || DEBUG_SA1100_UART || \ + ARCH_EP93XX
config DEBUG_UART_VIRT hex "Virtual base address of debug UART"
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 daniel.thompson@linaro.org Acked-by: Arnd Bergmann arnd@arndb.de --- 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 f92b98f..537dd04 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1127,12 +1127,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
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. Currently the user selected kbuild setting is ignored and the PL01X's DEBUG_LL stub is silently selected instead. This is a pain if your hardware doesn't have this cell, not least because it takes a little time to figure out that kbuild built the wrong code.
Warning:
silentoldconfig on PL011 single platforms will result in DEBUG_LL being directed at ICEDCC rather than PL011. This should only affect silentoldconfig since oldconfig prompts and the defconfigs have been updated to avoid this problem.
Changes since v8: - Regenerated patch series with --find-renames to properly track code movement.
Changes since v7: - Killed DEBUG_LL_UART_NONE completely and migrated over the four remaining platforms that relied on this (Arnd Bergmann, Russell King). This fixes some problems with oldconfig builds. - Rebased on latest mainline (v3.17rc1).
Changes since v6: - Removed a patch to limit DEBUG_LL_UART_NONE to platforms that support it because it almost time to drop DEBUG_LL_UART_NONE anyway (only four platforms still use it). - Rebased on latest mainline (v3.16rc3).
Changes since v5:
- Shortened the list of platforms that can select DEBUG_LL_UART_NONE (changes Arnd Bergmann) - Rebased on latest mainline (v3.15rc7).
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)
Daniel Thompson (9): arm: versatile: Enable DEBUG_LL_UART_PL01X arm: ep93xx: Enable DEBUG_LL_UART_PL01X arm: Remove DEBUG_LL_UART_NONE arm: ks8695: Migrate debug_ll macros to shared directory arm: omap1: Migrate debug_ll macros to use 8250.S arm: netx: Migrate DEBUG_LL macros to shared directory arm: sa1100: Migrate DEBUG_LL macros to shared directory arm: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX arm: Fix DEBUG_LL for multi-platform kernels (without PL01X)
arch/arm/Kconfig.debug | 138 ++++++++++++++++++--- arch/arm/configs/ep93xx_defconfig | 1 + arch/arm/configs/versatile_defconfig | 1 + .../mach/debug-macro.S => include/debug/ks8695.S} | 10 +- .../mach/debug-macro.S => include/debug/netx.S} | 22 ++-- arch/arm/include/debug/sa1100.S | 37 ++++++ arch/arm/mach-omap1/include/mach/debug-macro.S | 101 --------------- arch/arm/mach-sa1100/include/mach/debug-macro.S | 62 --------- 8 files changed, 175 insertions(+), 197 deletions(-) rename arch/arm/{mach-ks8695/include/mach/debug-macro.S => include/debug/ks8695.S} (80%) rename arch/arm/{mach-netx/include/mach/debug-macro.S => include/debug/netx.S} (62%) create mode 100644 arch/arm/include/debug/sa1100.S delete mode 100644 arch/arm/mach-omap1/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-sa1100/include/mach/debug-macro.S
-- 1.9.3
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 daniel.thompson@linaro.org Acked-by: Arnd Bergmann arnd@arndb.de --- 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 d52b4ff..ea49d37 100644 --- a/arch/arm/configs/versatile_defconfig +++ b/arch/arm/configs/versatile_defconfig @@ -82,5 +82,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
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 daniel.thompson@linaro.org Acked-by: Arnd Bergmann arnd@arndb.de --- 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 1b650c8..72233b9 100644 --- a/arch/arm/configs/ep93xx_defconfig +++ b/arch/arm/configs/ep93xx_defconfig @@ -107,5 +107,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
Only a very 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 defconfig/oldconfig since it is often selected by default.
This patch solves the problem by removing this option. Any platforms still depending upon this option must be migrated.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk --- arch/arm/Kconfig.debug | 9 --------- 1 file changed, 9 deletions(-)
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index b11ad54..9c46729 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -877,15 +877,6 @@ choice This option selects UART0 on VIA/Wondermedia System-on-a-chip devices, including VT8500, WM8505, WM8650 and WM8850.
- config DEBUG_LL_UART_NONE - bool "No low-level debugging UART" - depends on !ARCH_MULTIPLATFORM - help - Say Y here if your platform doesn't provide a UART option - above. This relies on your platform choosing the right UART - definition internally in order for low-level debugging to - work. - config DEBUG_ICEDCC bool "Kernel low-level debugging via EmbeddedICE DCC channel" help
As part of the migration a couple of uart definitions have been copied from of the platform specific header files.
Note that, in order to keep oldconfig working nicely we must defer the removal of arch/arm/mach-ks8695/include/mach/debug-macro.S until DEBUG_LL_UART_NONE has been removed.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk Cc: Greg Ungerer gerg@uclinux.org Cc: Arnd Bergmann arnd.bergmann@linaro.org --- arch/arm/Kconfig.debug | 8 ++++++++ .../include/mach/debug-macro.S => include/debug/ks8695.S} | 10 +++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) rename arch/arm/{mach-ks8695/include/mach/debug-macro.S => include/debug/ks8695.S} (80%)
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 9c46729..97c3058 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -348,6 +348,13 @@ choice Say Y here if you want the debug print routines to direct their output to UART1 serial port on KEYSTONE2 devices.
+ config DEBUG_KS8695_UART + bool "KS8695 Debug UART" + depends on ARCH_KS8695 + help + Say Y here if you want kernel low-level debugging support + on KS8695. + config DEBUG_MMP_UART2 bool "Kernel low-level debugging message via MMP UART2" depends on ARCH_MMP @@ -1017,6 +1024,7 @@ config DEBUG_LL_INCLUDE DEBUG_IMX6Q_UART || \ DEBUG_IMX6SL_UART || \ DEBUG_IMX6SX_UART + default "debug/ks8695.S" if DEBUG_KS8695_UART default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART diff --git a/arch/arm/mach-ks8695/include/mach/debug-macro.S b/arch/arm/include/debug/ks8695.S similarity index 80% rename from arch/arm/mach-ks8695/include/mach/debug-macro.S rename to arch/arm/include/debug/ks8695.S index a79e489..961da1f 100644 --- a/arch/arm/mach-ks8695/include/mach/debug-macro.S +++ b/arch/arm/include/debug/ks8695.S @@ -1,5 +1,5 @@ /* - * arch/arm/mach-ks8695/include/mach/debug-macro.S + * arch/arm/include/debug/ks8695.S * * Copyright (C) 2006 Ben Dooks ben@simtec.co.uk * Copyright (C) 2006 Simtec Electronics @@ -11,8 +11,12 @@ * published by the Free Software Foundation. */
-#include <mach/hardware.h> -#include <mach/regs-uart.h> +#define KS8695_UART_PA 0x03ffe000 +#define KS8695_UART_VA 0xf00fe000 +#define KS8695_URTH (0x04) +#define KS8695_URLS (0x14) +#define URLS_URTE (1 << 6) +#define URLS_URTHRE (1 << 5)
.macro addruart, rp, rv, tmp ldr \rp, =KS8695_UART_PA @ physical base address
Hi Daniel,
On 20/08/14 01:16, Daniel Thompson wrote:
As part of the migration a couple of uart definitions have been copied from of the platform specific header files.
Note that, in order to keep oldconfig working nicely we must defer the removal of arch/arm/mach-ks8695/include/mach/debug-macro.S until DEBUG_LL_UART_NONE has been removed.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk Cc: Greg Ungerer gerg@uclinux.org Cc: Arnd Bergmann arnd.bergmann@linaro.org
arch/arm/Kconfig.debug | 8 ++++++++ .../include/mach/debug-macro.S => include/debug/ks8695.S} | 10 +++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) rename arch/arm/{mach-ks8695/include/mach/debug-macro.S => include/debug/ks8695.S} (80%)
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 9c46729..97c3058 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -348,6 +348,13 @@ choice Say Y here if you want the debug print routines to direct their output to UART1 serial port on KEYSTONE2 devices.
- config DEBUG_KS8695_UART
bool "KS8695 Debug UART"
depends on ARCH_KS8695
help
Say Y here if you want kernel low-level debugging support
on KS8695.
- config DEBUG_MMP_UART2 bool "Kernel low-level debugging message via MMP UART2" depends on ARCH_MMP
@@ -1017,6 +1024,7 @@ config DEBUG_LL_INCLUDE DEBUG_IMX6Q_UART || \ DEBUG_IMX6SL_UART || \ DEBUG_IMX6SX_UART
- default "debug/ks8695.S" if DEBUG_KS8695_UART default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART
diff --git a/arch/arm/mach-ks8695/include/mach/debug-macro.S b/arch/arm/include/debug/ks8695.S similarity index 80% rename from arch/arm/mach-ks8695/include/mach/debug-macro.S rename to arch/arm/include/debug/ks8695.S index a79e489..961da1f 100644 --- a/arch/arm/mach-ks8695/include/mach/debug-macro.S +++ b/arch/arm/include/debug/ks8695.S @@ -1,5 +1,5 @@ /*
- arch/arm/mach-ks8695/include/mach/debug-macro.S
- arch/arm/include/debug/ks8695.S
- Copyright (C) 2006 Ben Dooks ben@simtec.co.uk
- Copyright (C) 2006 Simtec Electronics
@@ -11,8 +11,12 @@
- published by the Free Software Foundation.
*/ -#include <mach/hardware.h> -#include <mach/regs-uart.h> +#define KS8695_UART_PA 0x03ffe000 +#define KS8695_UART_VA 0xf00fe000 +#define KS8695_URTH (0x04) +#define KS8695_URLS (0x14) +#define URLS_URTE (1 << 6) +#define URLS_URTHRE (1 << 5)
Whats the thinking behind moving these definitions here? Is there a plan to move/change regs-uart.h?
Regards Greg
On 21/08/14 12:46, Greg Ungerer wrote:
Hi Daniel,
On 20/08/14 01:16, Daniel Thompson wrote:
As part of the migration a couple of uart definitions have been copied from of the platform specific header files.
Note that, in order to keep oldconfig working nicely we must defer the removal of arch/arm/mach-ks8695/include/mach/debug-macro.S until DEBUG_LL_UART_NONE has been removed.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk Cc: Greg Ungerer gerg@uclinux.org Cc: Arnd Bergmann arnd.bergmann@linaro.org
arch/arm/Kconfig.debug | 8 ++++++++ .../include/mach/debug-macro.S => include/debug/ks8695.S} | 10 +++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) rename arch/arm/{mach-ks8695/include/mach/debug-macro.S => include/debug/ks8695.S} (80%)
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 9c46729..97c3058 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -348,6 +348,13 @@ choice Say Y here if you want the debug print routines to direct their output to UART1 serial port on KEYSTONE2 devices.
- config DEBUG_KS8695_UART
bool "KS8695 Debug UART"
depends on ARCH_KS8695
help
Say Y here if you want kernel low-level debugging support
on KS8695.
config DEBUG_MMP_UART2 bool "Kernel low-level debugging message via MMP UART2" depends on ARCH_MMP
@@ -1017,6 +1024,7 @@ config DEBUG_LL_INCLUDE DEBUG_IMX6Q_UART || \ DEBUG_IMX6SL_UART || \ DEBUG_IMX6SX_UART
- default "debug/ks8695.S" if DEBUG_KS8695_UART default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART
diff --git a/arch/arm/mach-ks8695/include/mach/debug-macro.S b/arch/arm/include/debug/ks8695.S similarity index 80% rename from arch/arm/mach-ks8695/include/mach/debug-macro.S rename to arch/arm/include/debug/ks8695.S index a79e489..961da1f 100644 --- a/arch/arm/mach-ks8695/include/mach/debug-macro.S +++ b/arch/arm/include/debug/ks8695.S @@ -1,5 +1,5 @@ /*
- arch/arm/mach-ks8695/include/mach/debug-macro.S
- arch/arm/include/debug/ks8695.S
- Copyright (C) 2006 Ben Dooks ben@simtec.co.uk
- Copyright (C) 2006 Simtec Electronics
@@ -11,8 +11,12 @@
- published by the Free Software Foundation.
*/ -#include <mach/hardware.h> -#include <mach/regs-uart.h> +#define KS8695_UART_PA 0x03ffe000 +#define KS8695_UART_VA 0xf00fe000 +#define KS8695_URTH (0x04) +#define KS8695_URLS (0x14) +#define URLS_URTE (1 << 6) +#define URLS_URTHRE (1 << 5)
Whats the thinking behind moving these definitions here? Is there a plan to move/change regs-uart.h?
I am trying to move *all* the debug macros into arch/arm/include/debug thus making all the debug macros multi-platform. To do this the macros cannot use headers found in mach-ks8695 because that would not be available on multi-platform builds.
The approach of moving a limited set of definitions into the macro is how other debug macros have been migrated.
To make ks8695 fully multi-platform would likely require regs-uart.h (and any associated driver) to migrate into drivers/tty/serial/ together with a *huge* pile of other work that I doubt anyone has much appetite for. Certainly I have no personal plans to seek further change on ks8695.
To be honest I'm only dabbling in this area at all in order to allow us to remove a nasty KConfig hack for that breaks multi_v7_defconfig+debug_ll on my two favoured test boards.
The omap1's debug-macro.S is similar to the generic 8250 code. Compared to the 8520 code the omap1 macro automatically determines what UART to use based on breadcrumbs left by the bootloader and automatically copes with the eccentric register layout on OMAP7XX.
This patch drops both these features and relies instead on the generic 8250 macros:
1. Dropping support for the bootloader breadcrumbs is identical to the way the migration was handled for OMAP2 (see 808b7e07464d...).
2. Support for OMAP7XX still exists but it must be configured by hand (DEBUG_OMAP7XXUART1/2/3) rather than handled at runtime.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk Cc: linux-arm-kernel@lists.infradead.org Cc: Tony Lindgren tony@atomide.com Cc: Arnd Bergmann arnd.bergmann@linaro.org Cc: linux-omap@vger.kernel.org Tested-by: Aaro Koskinen aaro.koskinen@iki.fi --- arch/arm/Kconfig.debug | 57 +++++++++++++- arch/arm/mach-omap1/include/mach/debug-macro.S | 101 ------------------------- 2 files changed, 56 insertions(+), 102 deletions(-) delete mode 100644 arch/arm/mach-omap1/include/mach/debug-macro.S
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 97c3058..01f4ee2 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -471,6 +471,30 @@ choice Say Y here if you want kernel low-level debugging support on TI-NSPIRE CX models.
+ config DEBUG_OMAP1UART1 + bool "Kernel low-level debugging via OMAP1 UART1" + depends on ARCH_OMAP1 + select DEBUG_UART_8250 + help + Say Y here if you want kernel low-level debugging support + on OMAP1 based platforms (expect OMAP730) on the UART1. + + config DEBUG_OMAP1UART2 + bool "Kernel low-level debugging via OMAP1 UART2" + depends on ARCH_OMAP1 + select DEBUG_UART_8250 + help + Say Y here if you want kernel low-level debugging support + on OMAP1 based platforms (expect OMAP730) on the UART2. + + config DEBUG_OMAP1UART3 + bool "Kernel low-level debugging via OMAP1 UART3" + depends on ARCH_OMAP1 + select DEBUG_UART_8250 + help + Say Y here if you want kernel low-level debugging support + on OMAP1 based platforms (expect OMAP730) on the UART3. + config DEBUG_OMAP2UART1 bool "OMAP2/3/4 UART1 (omap2/3 sdp boards and some omap3 boards)" depends on ARCH_OMAP2PLUS @@ -513,6 +537,30 @@ choice depends on ARCH_OMAP2PLUS select DEBUG_OMAP2PLUS_UART
+ config DEBUG_OMAP7XXUART1 + bool "Kernel low-level debugging via OMAP730 UART1" + depends on ARCH_OMAP730 + select DEBUG_UART_8250 + help + Say Y here if you want kernel low-level debugging support + on OMAP730 based platforms on the UART1. + + config DEBUG_OMAP7XXUART2 + bool "Kernel low-level debugging via OMAP730 UART2" + depends on ARCH_OMAP730 + select DEBUG_UART_8250 + help + Say Y here if you want kernel low-level debugging support + on OMAP730 based platforms on the UART2. + + config DEBUG_OMAP7XXUART3 + bool "Kernel low-level debugging via OMAP730 UART3" + depends on ARCH_OMAP730 + select DEBUG_UART_8250 + help + Say Y here if you want kernel low-level debugging support + on OMAP730 based platforms on the UART3. + config DEBUG_TI81XXUART1 bool "Kernel low-level debugging messages via TI81XX UART1 (ti8148evm)" depends on ARCH_OMAP2PLUS @@ -1120,6 +1168,9 @@ config DEBUG_UART_PHYS default 0xff690000 if DEBUG_RK32_UART2 default 0xffc02000 if DEBUG_SOCFPGA_UART default 0xffd82340 if ARCH_IOP13XX + default 0xfffb0000 if DEBUG_OMAP1UART1 || DEBUG_OMAP7XXUART1 + default 0xfffb0800 if DEBUG_OMAP1UART2 || DEBUG_OMAP7XXUART2 + default 0xfffb9800 if DEBUG_OMAP1UART3 || DEBUG_OMAP7XXUART3 default 0xfff36000 if DEBUG_HIGHBANK_UART default 0xfffff700 if ARCH_IOP33X depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ @@ -1188,6 +1239,9 @@ config DEBUG_UART_VIRT default 0xfef00000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN default 0xfef00003 if ARCH_IXP4XX && CPU_BIG_ENDIAN default 0xfef36000 if DEBUG_HIGHBANK_UART + default 0xfefb0000 if DEBUG_OMAP1UART1 || DEBUG_OMAP7XXUART1 + default 0xfefb0800 if DEBUG_OMAP1UART2 || DEBUG_OMAP7XXUART2 + default 0xfefb9800 if DEBUG_OMAP1UART3 || DEBUG_OMAP7XXUART3 default 0xfefff700 if ARCH_IOP33X default 0xff003000 if DEBUG_U300_UART default DEBUG_UART_PHYS if !MMU @@ -1198,7 +1252,8 @@ config DEBUG_UART_VIRT config DEBUG_UART_8250_SHIFT int "Register offset shift for the 8250 debug UART" depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 - default 0 if FOOTBRIDGE || ARCH_IOP32X + default 0 if FOOTBRIDGE || ARCH_IOP32X || \ + DEBUG_OMAP7XXUART1 || DEBUG_OMAP7XXUART2 || DEBUG_OMAP7XXUART3 default 2
config DEBUG_UART_8250_WORD diff --git a/arch/arm/mach-omap1/include/mach/debug-macro.S b/arch/arm/mach-omap1/include/mach/debug-macro.S deleted file mode 100644 index 5c1a26c..0000000 --- a/arch/arm/mach-omap1/include/mach/debug-macro.S +++ /dev/null @@ -1,101 +0,0 @@ -/* arch/arm/mach-omap1/include/mach/debug-macro.S - * - * Debugging macro include header - * - * Copyright (C) 1994-1999 Russell King - * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * -*/ - -#include <linux/serial_reg.h> - -#include "serial.h" - - .pushsection .data -omap_uart_phys: .word 0x0 -omap_uart_virt: .word 0x0 - .popsection - - /* - * Note that this code won't work if the bootloader passes - * a wrong machine ID number in r1. To debug, just hardcode - * the desired UART phys and virt addresses temporarily into - * the omap_uart_phys and omap_uart_virt above. - */ - .macro addruart, rp, rv, tmp - - /* Use omap_uart_phys/virt if already configured */ -9: adr \rp, 99f @ get effective addr of 99f - ldr \rv, [\rp] @ get absolute addr of 99f - sub \rv, \rv, \rp @ offset between the two - ldr \rp, [\rp, #4] @ abs addr of omap_uart_phys - sub \tmp, \rp, \rv @ make it effective - ldr \rp, [\tmp, #0] @ omap_uart_phys - ldr \rv, [\tmp, #4] @ omap_uart_virt - cmp \rp, #0 @ is port configured? - cmpne \rv, #0 - bne 100f @ already configured - - /* Check the debug UART configuration set in uncompress.h */ - and \rp, pc, #0xff000000 - ldr \rv, =OMAP_UART_INFO_OFS - ldr \rp, [\rp, \rv] - - /* Select the UART to use based on the UART1 scratchpad value */ -10: cmp \rp, #0 @ no port configured? - beq 11f @ if none, try to use UART1 - cmp \rp, #OMAP1UART1 - beq 11f @ configure OMAP1UART1 - cmp \rp, #OMAP1UART2 - beq 12f @ configure OMAP1UART2 - cmp \rp, #OMAP1UART3 - beq 13f @ configure OMAP2UART3 - - /* Configure the UART offset from the phys/virt base */ -11: mov \rp, #0x00fb0000 @ OMAP1UART1 - b 98f -12: mov \rp, #0x00fb0000 @ OMAP1UART1 - orr \rp, \rp, #0x00000800 @ OMAP1UART2 - b 98f -13: mov \rp, #0x00fb0000 @ OMAP1UART1 - orr \rp, \rp, #0x00000800 @ OMAP1UART2 - orr \rp, \rp, #0x00009000 @ OMAP1UART3 - - /* Store both phys and virt address for the uart */ -98: add \rp, \rp, #0xff000000 @ phys base - str \rp, [\tmp, #0] @ omap_uart_phys - sub \rp, \rp, #0xff000000 @ phys base - add \rp, \rp, #0xfe000000 @ virt base - str \rp, [\tmp, #4] @ omap_uart_virt - b 9b - - .align -99: .word . - .word omap_uart_phys - .ltorg - -100: - .endm - - .macro senduart,rd,rx - strb \rd, [\rx] - .endm - - .macro busyuart,rd,rx -1001: ldrb \rd, [\rx, #(UART_LSR << OMAP_PORT_SHIFT)] - and \rd, \rd, #(UART_LSR_TEMT | UART_LSR_THRE) - teq \rd, #(UART_LSR_TEMT | UART_LSR_THRE) - beq 1002f - ldrb \rd, [\rx, #(UART_LSR << OMAP7XX_PORT_SHIFT)] - and \rd, \rd, #(UART_LSR_TEMT | UART_LSR_THRE) - teq \rd, #(UART_LSR_TEMT | UART_LSR_THRE) - bne 1001b -1002: - .endm - - .macro waituart,rd,rx - .endm
* Daniel Thompson daniel.thompson@linaro.org [140819 08:19]:
The omap1's debug-macro.S is similar to the generic 8250 code. Compared to the 8520 code the omap1 macro automatically determines what UART to use based on breadcrumbs left by the bootloader and automatically copes with the eccentric register layout on OMAP7XX.
This patch drops both these features and relies instead on the generic 8250 macros:
Dropping support for the bootloader breadcrumbs is identical to the way the migration was handled for OMAP2 (see 808b7e07464d...).
Support for OMAP7XX still exists but it must be configured by hand (DEBUG_OMAP7XXUART1/2/3) rather than handled at runtime.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk Cc: linux-arm-kernel@lists.infradead.org Cc: Tony Lindgren tony@atomide.com Cc: Arnd Bergmann arnd.bergmann@linaro.org Cc: linux-omap@vger.kernel.org Tested-by: Aaro Koskinen aaro.koskinen@iki.fi
This should be safe to queue together with your other debug_ll patches, so:
Acked-by: Tony Lindgren tony@atomide.com
If you want me to queue this one instead, please let me know.
Regards,
Tony
As part of the migration we introduce DEBUG_UART_PHYS/DEBUG_UART_VIRT which default to UART1 but allow a user to configure UART2 or UART3. We also introduce symbolic names for the registers and flags.
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk Acked-by: Arnd Bergmann arnd.bergmann@linaro.org Cc: linux-arm-kernel@lists.infradead.org --- arch/arm/Kconfig.debug | 17 +++++++++++++++-- .../mach/debug-macro.S => include/debug/netx.S} | 22 +++++++++++----------- 2 files changed, 26 insertions(+), 13 deletions(-) rename arch/arm/{mach-netx/include/mach/debug-macro.S => include/debug/netx.S} (62%)
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 01f4ee2..d71427e 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -447,6 +447,14 @@ choice Say Y here if you want kernel low-level debugging support on Vybrid based platforms.
+ config DEBUG_NETX_UART + bool "Kernel low-level debugging messages via NetX UART" + depends on ARCH_NETX + select DEBUG_UART_NETX + help + Say Y here if you want kernel low-level debugging support + on Hilscher NetX based platforms. + config DEBUG_NOMADIK_UART bool "Kernel low-level debugging messages via NOMADIK UART" depends on ARCH_NOMADIK @@ -1074,6 +1082,7 @@ config DEBUG_LL_INCLUDE DEBUG_IMX6SX_UART default "debug/ks8695.S" if DEBUG_KS8695_UART default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM + default "debug/netx.S" if DEBUG_NETX_UART default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART default "debug/s5pv210.S" if DEBUG_S5PV210_UART @@ -1106,6 +1115,7 @@ config DEBUG_UART_8250
config DEBUG_UART_PHYS hex "Physical base address of debug UART" + default 0x00100a00 if DEBUG_NETX_UART default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0 default 0x01c28000 if DEBUG_SUNXI_UART0 default 0x01c28400 if DEBUG_SUNXI_UART1 @@ -1176,10 +1186,12 @@ config DEBUG_UART_PHYS depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_LL_UART_EFM32 || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ - DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART + DEBUG_MSM_UART || DEBUG_NETX_UART || DEBUG_QCOM_UARTDM || \ + DEBUG_S3C24XX_UART
config DEBUG_UART_VIRT hex "Virtual base address of debug UART" + default 0xe0000a00 if DEBUG_NETX_UART default 0xe0010fe0 if ARCH_RPC default 0xe1000000 if DEBUG_MSM_UART default 0xf0000be0 if ARCH_EBSA110 @@ -1247,7 +1259,8 @@ config DEBUG_UART_VIRT default DEBUG_UART_PHYS if !MMU depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ - DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART + DEBUG_MSM_UART || DEBUG_NETX_UART || DEBUG_QCOM_UARTDM || \ + DEBUG_S3C24XX_UART
config DEBUG_UART_8250_SHIFT int "Register offset shift for the 8250 debug UART" diff --git a/arch/arm/mach-netx/include/mach/debug-macro.S b/arch/arm/include/debug/netx.S similarity index 62% rename from arch/arm/mach-netx/include/mach/debug-macro.S rename to arch/arm/include/debug/netx.S index 247781e..cf7522a 100644 --- a/arch/arm/mach-netx/include/mach/debug-macro.S +++ b/arch/arm/include/debug/netx.S @@ -1,5 +1,4 @@ -/* arch/arm/mach-netx/include/mach/debug-macro.S - * +/* * Debugging macro include header * * Copyright (C) 1994-1999 Russell King @@ -11,26 +10,27 @@ * */
-#include "hardware.h" +#define UART_DATA 0 +#define UART_FLAG 0x18 +#define UART_FLAG_BUSY (1 << 3)
.macro addruart, rp, rv, tmp - mov \rp, #0x00000a00 - orr \rv, \rp, #io_p2v(0x00100000) @ virtual - orr \rp, \rp, #0x00100000 @ physical + ldr \rp, =CONFIG_DEBUG_UART_PHYS + ldr \rp, =CONFIG_DEBUG_UART_VIRT .endm
.macro senduart,rd,rx - str \rd, [\rx, #0] + str \rd, [\rx, #UART_DATA] .endm
.macro busyuart,rd,rx -1002: ldr \rd, [\rx, #0x18] - tst \rd, #(1 << 3) +1002: ldr \rd, [\rx, #UART_FLAG] + tst \rd, #UART_FLAG_BUSY bne 1002b .endm
.macro waituart,rd,rx -1001: ldr \rd, [\rx, #0x18] - tst \rd, #(1 << 3) +1001: ldr \rd, [\rx, #UART_FLAG] + tst \rd, #UART_FLAG_BUSY bne 1001b .endm
As part of the migration we copy a few definitions from the mach-sa1100 headers and replace the automatic serial port detectiion with explicit configuration based on DEBUG_UART_PHYS/DEBUG_UART_VIRT.
The removal of the automatic configuration is similar to the way migration was handled for OMAP2 (see 808b7e07464d...).
Signed-off-by: Daniel Thompson daniel.thompson@linaro.org Cc: Russell King linux@arm.linux.org.uk --- arch/arm/Kconfig.debug | 41 ++++++++++++++-- arch/arm/include/debug/sa1100.S | 37 +++++++++++++++ arch/arm/mach-sa1100/include/mach/debug-macro.S | 62 ------------------------- 3 files changed, 75 insertions(+), 65 deletions(-) create mode 100644 arch/arm/include/debug/sa1100.S delete mode 100644 arch/arm/mach-sa1100/include/mach/debug-macro.S
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index d71427e..227ae88 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -762,6 +762,30 @@ choice their output to UART 2. The port must have been initialised by the boot-loader before use.
+ config DEBUG_SA1100_UART1 + depends on ARCH_SA1100 + select DEBUG_SA1100_UART + bool "Kernel low-level debugging messages via SA1100 Ser1" + help + Say Y here if you want kernel low-level debugging support + on SA1100 based platforms. + + config DEBUG_SA1100_UART2 + depends on ARCH_SA1100 + select DEBUG_SA1100_UART + bool "Kernel low-level debugging messages via SA1100 Ser2" + help + Say Y here if you want kernel low-level debugging support + on SA1100 based platforms. + + config DEBUG_SA1100_UART3 + depends on ARCH_SA1100 + select DEBUG_SA1100_UART + bool "Kernel low-level debugging messages via SA1100 Ser3" + help + Say Y here if you want kernel low-level debugging support + on SA1100 based platforms. + config DEBUG_SOCFPGA_UART depends on ARCH_SOCFPGA bool "Use SOCFPGA UART for low-level debug" @@ -1057,6 +1081,10 @@ config DEBUG_TEGRA_UART bool depends on ARCH_TEGRA
+config DEBUG_SA1100_UART + bool + depends on ARCH_SA1100 + config DEBUG_STI_UART bool depends on ARCH_STI @@ -1086,6 +1114,7 @@ config DEBUG_LL_INCLUDE default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART default "debug/s5pv210.S" if DEBUG_S5PV210_UART + default "debug/sa1100.S" if DEBUG_SA1100_UART default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 default "debug/sti.S" if DEBUG_STI_UART default "debug/tegra.S" if DEBUG_TEGRA_UART @@ -1105,7 +1134,7 @@ config DEBUG_UART_PL01X ARCH_SPEAR13XX || \ ARCH_VERSATILE
-# Compatibility options for 8250 +#Compatibility options for 8250 config DEBUG_UART_8250 def_bool ARCH_DOVE || ARCH_EBSA110 || \ (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \ @@ -1151,6 +1180,9 @@ config DEBUG_UART_PHYS default 0x50008000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART2 || \ DEBUG_S3C2410_UART2) default 0x7c0003f8 if FOOTBRIDGE + default 0x80010000 if DEBUG_SA1100_UART1 + default 0x80030000 if DEBUG_SA1100_UART2 + default 0x80050000 if DEBUG_SA1100_UART3 default 0x80070000 if DEBUG_IMX23_UART default 0x80074000 if DEBUG_IMX28_UART default 0x80230000 if DEBUG_PICOXCELL_UART @@ -1187,7 +1219,7 @@ config DEBUG_UART_PHYS DEBUG_LL_UART_EFM32 || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ DEBUG_MSM_UART || DEBUG_NETX_UART || DEBUG_QCOM_UARTDM || \ - DEBUG_S3C24XX_UART + DEBUG_S3C24XX_UART || DEBUG_SA1100_UART
config DEBUG_UART_VIRT hex "Virtual base address of debug UART" @@ -1215,6 +1247,9 @@ config DEBUG_UART_VIRT DEBUG_S3C2410_UART2) default 0xf7fc9000 if DEBUG_BERLIN_UART default 0xf8009000 if DEBUG_VEXPRESS_UART0_CA9 + default 0xf8010000 if DEBUG_SA1100_UART1 + default 0xf8030000 if DEBUG_SA1100_UART2 + default 0xf8050000 if DEBUG_SA1100_UART3 default 0xf8090000 if DEBUG_VEXPRESS_UART0_RS1 default 0xfa71e000 if DEBUG_QCOM_UARTDM default 0xfb009000 if DEBUG_REALVIEW_STD_PORT @@ -1260,7 +1295,7 @@ config DEBUG_UART_VIRT depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ DEBUG_MSM_UART || DEBUG_NETX_UART || DEBUG_QCOM_UARTDM || \ - DEBUG_S3C24XX_UART + DEBUG_S3C24XX_UART || DEBUG_SA1100_UART
config DEBUG_UART_8250_SHIFT int "Register offset shift for the 8250 debug UART" diff --git a/arch/arm/include/debug/sa1100.S b/arch/arm/include/debug/sa1100.S new file mode 100644 index 0000000..6b5e1ce --- /dev/null +++ b/arch/arm/include/debug/sa1100.S @@ -0,0 +1,37 @@ +/* + * Debugging macro include header + * + * Copyright (C) 1994-1999 Russell King + * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * +*/ + +#define UTDR 0x14 +#define UTSR1 0x20 +#define UTSR1_TBY 0x00000001 /* Transmitter BusY (read) */ +#define UTSR1_TNF 0x00000004 /* Transmit FIFO Not Full (read) */ + + .macro addruart, rp, rv, tmp + ldr \rp, =CONFIG_DEBUG_UART_PHYS + ldr \rv, =CONFIG_DEBUG_UART_VIRT + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #UTDR] + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #UTSR1] + tst \rd, #UTSR1_TNF + beq 1001b + .endm + + .macro busyuart,rd,rx +1001: ldr \rd, [\rx, #UTSR1] + tst \rd, #UTSR1_TBY + bne 1001b + .endm diff --git a/arch/arm/mach-sa1100/include/mach/debug-macro.S b/arch/arm/mach-sa1100/include/mach/debug-macro.S deleted file mode 100644 index 530772d..0000000 --- a/arch/arm/mach-sa1100/include/mach/debug-macro.S +++ /dev/null @@ -1,62 +0,0 @@ -/* arch/arm/mach-sa1100/include/mach/debug-macro.S - * - * Debugging macro include header - * - * Copyright (C) 1994-1999 Russell King - * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * -*/ -#include <mach/hardware.h> - - .macro addruart, rp, rv, tmp - mrc p15, 0, \rp, c1, c0 - tst \rp, #1 @ MMU enabled? - moveq \rp, #0x80000000 @ physical base address - movne \rp, #0xf8000000 @ virtual address - - @ We probe for the active serial port here, coherently with - @ the comment in arch/arm/mach-sa1100/include/mach/uncompress.h. - @ We assume r1 can be clobbered. - - @ see if Ser3 is active - add \rp, \rp, #0x00050000 - ldr \rv, [\rp, #UTCR3] - tst \rv, #UTCR3_TXE - - @ if Ser3 is inactive, then try Ser1 - addeq \rp, \rp, #(0x00010000 - 0x00050000) - ldreq \rv, [\rp, #UTCR3] - tsteq \rv, #UTCR3_TXE - - @ if Ser1 is inactive, then try Ser2 - addeq \rp, \rp, #(0x00030000 - 0x00010000) - ldreq \rv, [\rp, #UTCR3] - tsteq \rv, #UTCR3_TXE - - @ clear top bits, and generate both phys and virt addresses - lsl \rp, \rp, #8 - lsr \rp, \rp, #8 - orr \rv, \rp, #0xf8000000 @ virtual - orr \rp, \rp, #0x80000000 @ physical - - .endm - - .macro senduart,rd,rx - str \rd, [\rx, #UTDR] - .endm - - .macro waituart,rd,rx -1001: ldr \rd, [\rx, #UTSR1] - tst \rd, #UTSR1_TNF - beq 1001b - .endm - - .macro busyuart,rd,rx -1001: ldr \rd, [\rx, #UTSR1] - tst \rd, #UTSR1_TBY - bne 1001b - .endm
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 daniel.thompson@linaro.org Acked-by: Arnd Bergmann arnd@arndb.de --- 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 227ae88..f92b98f 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1219,7 +1219,8 @@ config DEBUG_UART_PHYS DEBUG_LL_UART_EFM32 || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ DEBUG_MSM_UART || DEBUG_NETX_UART || DEBUG_QCOM_UARTDM || \ - DEBUG_S3C24XX_UART || DEBUG_SA1100_UART + DEBUG_S3C24XX_UART || DEBUG_SA1100_UART || \ + ARCH_EP93XX
config DEBUG_UART_VIRT hex "Virtual base address of debug UART"
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 daniel.thompson@linaro.org Acked-by: Arnd Bergmann arnd@arndb.de --- 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 f92b98f..537dd04 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1127,12 +1127,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
linaro-kernel@lists.linaro.org