Clean up debugging support
Subsystems (18)
v2 cover Clean up debugging support
This is the second posting of this series, with a few additional patches on top to go a little further. Changes since the last posting:
- we now provide a couple of generic options to allow the 8250 and PL01x ports to be configured via Kconfig manually. What this means is that I do not expect to see further entries to the debug menu for platforms which have PL01x or 8250 debug ports - use the generic options instead.
- I've converted a bunch of the dependencies to select statements here to clean things up a little more.
- Made the '8250 32-bit access size" option depend on a shift >= 2 (it would be silly to do 32-bit accesses to byte offsets.)
- Made all 8250 options available to the user when 8250 support is selected, allowing full configuration of 8250 options.
- Removed DEBUG_ROCKCHIP_UART which wasn't doing anything after this cleanup.
- Converted Keystone, Davinci, and Spear to also use the generic 8250/PL01x code; these had their own private implementations of the same without using the generic versions for no reason that I could see.
The rest is the same boilerplate from last time with the exception of the diffstat.
This patch series cleans up some aspects of the LL debug support by:
- Removing the multi-level choice madness
- Consolidating the 8250 debug UART support
- Consolidating the PL01x debug UART support
The differences between the various 8250 debug UART implementations are:
- Physical/Virtual addresses
- Register offset shift
- Access size
- Flow control
These are now parameterised in the Kconfig. I've left OMAP because that's a complex case, but it looks like it can be adapted to it if some of the unnecessary complexity is eliminated.
Similar is done with the PL01x implementation, except a few complex cases are left - automatic detection on Versatile Express, and the Ux500 support which looks like it'll take some picking through header files to work out what the base addresses are.
The approach I've taken is to consolidate without losing any information
- what that means it that the Kconfig parameters have rather a lot of dependencies/defaults associated with them, and the main choice statement keeps all its options.
Nevertheless, even avoiding the loss of information, I think the diffstat is quite impressive:
arch/arm/Kconfig.debug | 553 ++++++++++++++------
arch/arm/include/asm/hardware/debug-8250.S | 29 -
arch/arm/include/debug/8250.S | 54 ++
arch/arm/include/debug/8250_32.S | 27 -
arch/arm/include/debug/bcm2835.S | 22 -
arch/arm/include/debug/cns3xxx.S | 19 -
arch/arm/include/debug/highbank.S | 17 -
arch/arm/include/debug/keystone.S | 43 --
arch/arm/include/debug/mvebu.S | 30 -
arch/arm/include/debug/mxs.S | 27 -
arch/arm/include/debug/nomadik.S | 20 -
arch/arm/include/debug/nspire.S | 28 -
arch/arm/include/debug/picoxcell.S | 19 -
.../{asm/hardware/debug-pl01x.S => debug/pl01x.S} | 9 +-
arch/arm/include/debug/pxa.S | 33 --
arch/arm/include/debug/rockchip.S | 42 --
arch/arm/include/debug/socfpga.S | 21 -
arch/arm/include/debug/sunxi.S | 27 -
arch/arm/include/debug/u300.S | 18 -
arch/arm/include/debug/ux500.S | 2 +-
arch/arm/include/debug/vexpress.S | 48 +--
arch/arm/mach-davinci/include/mach/debug-macro.S | 65 ---
arch/arm/mach-dove/include/mach/debug-macro.S | 19 -
arch/arm/mach-ebsa110/include/mach/debug-macro.S | 22 -
arch/arm/mach-ep93xx/include/mach/debug-macro.S | 21 -
.../arm/mach-footbridge/include/mach/debug-macro.S | 15 -
arch/arm/mach-gemini/include/mach/debug-macro.S | 21 -
.../arm/mach-integrator/include/mach/debug-macro.S | 20 -
arch/arm/mach-iop13xx/include/mach/debug-macro.S | 24 -
arch/arm/mach-iop32x/include/mach/debug-macro.S | 21 -
arch/arm/mach-iop33x/include/mach/debug-macro.S | 22 -
arch/arm/mach-ixp4xx/include/mach/debug-macro.S | 26 -
arch/arm/mach-kirkwood/include/mach/debug-macro.S | 19 -
arch/arm/mach-lpc32xx/include/mach/debug-macro.S | 29 -
arch/arm/mach-mv78xx0/include/mach/debug-macro.S | 19 -
arch/arm/mach-orion5x/include/mach/debug-macro.S | 21 -
arch/arm/mach-realview/include/mach/debug-macro.S | 29 -
arch/arm/mach-rpc/include/mach/debug-macro.S | 23 -
arch/arm/mach-spear/include/mach/debug-macro.S | 36 --
arch/arm/mach-spear/include/mach/spear.h | 2 -
arch/arm/mach-versatile/include/mach/debug-macro.S | 21 -
41 files changed, 457 insertions(+), 1106 deletions(-)
delete mode 100644 arch/arm/include/asm/hardware/debug-8250.S
create mode 100644 arch/arm/include/debug/8250.S
delete mode 100644 arch/arm/include/debug/8250_32.S
delete mode 100644 arch/arm/include/debug/bcm2835.S
delete mode 100644 arch/arm/include/debug/cns3xxx.S
delete mode 100644 arch/arm/include/debug/highbank.S
delete mode 100644 arch/arm/include/debug/keystone.S
delete mode 100644 arch/arm/include/debug/mvebu.S
delete mode 100644 arch/arm/include/debug/mxs.S
delete mode 100644 arch/arm/include/debug/nomadik.S
delete mode 100644 arch/arm/include/debug/nspire.S
delete mode 100644 arch/arm/include/debug/picoxcell.S
rename arch/arm/include/{asm/hardware/debug-pl01x.S => debug/pl01x.S} (78%)
delete mode 100644 arch/arm/include/debug/pxa.S
delete mode 100644 arch/arm/include/debug/rockchip.S
delete mode 100644 arch/arm/include/debug/socfpga.S
delete mode 100644 arch/arm/include/debug/sunxi.S
delete mode 100644 arch/arm/include/debug/u300.S
delete mode 100644 arch/arm/mach-davinci/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-dove/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-ebsa110/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-ep93xx/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-gemini/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-integrator/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-iop13xx/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-iop32x/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-iop33x/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-ixp4xx/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-kirkwood/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-lpc32xx/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-mv78xx0/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-orion5x/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-realview/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-rpc/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-spear/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-versatile/include/mach/debug-macro.SRFC PATCH v2 1/14 ARM: debug: fix wording error in DEBUG_LL_UART_NONE option help
The DEBUG_LL_UART_NONE option was moved from the top of the list to the bottom - unfortunately, it still referred to the options "below" rather than "above".
--- arch/arm/Kconfig.debug | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/Kconfig.debug +1 -1
@@ -579,7 +579,7 @@ choice depends on !ARCH_MULTIPLATFORM help Say Y here if your platform doesn't provide a UART option - below. This relies on your platform choosing the right UART + above. This relies on your platform choosing the right UART definition internally in order for low-level debugging to work.
Signature · 1 line
1.7.4.4
RFC PATCH v2 2/14 ARM: debug: clean up low level kernel debugging selection
In reply to Russell King - ARM LinuxIt is silly to bury UART selection under multiple levels of choice statements, where the top level choice statement will only list about four entries when a single SoC is selected. Move the UART selection up into the top level choice statement as it was always intended to be.
--- arch/arm/Kconfig.debug | 328 ++++++++++++++++++++++++++++-------------------- 1 files changed, 191 insertions(+), 137 deletions(-)
arch/arm/Kconfig.debug +191 -137
@@ -376,12 +376,72 @@ choice Say Y here if you want kernel low-level debugging support on TI-NSPIRE CX models. - config DEBUG_OMAP2PLUS_UART - bool "Kernel low-level debugging messages via OMAP2PLUS UART" + config DEBUG_OMAP2UART1 + bool "OMAP2/3/4 UART1 (omap2/3 sdp boards and some omap3 boards)" depends on ARCH_OMAP2PLUS + select DEBUG_OMAP2PLUS_UART help - Say Y here if you want kernel low-level debugging support - on OMAP2PLUS based platforms. + This covers at least h4, 2430sdp, 3430sdp, 3630sdp, + omap3 torpedo and 3530 lv som. + + config DEBUG_OMAP2UART2 + bool "Kernel low-level debugging messages via OMAP2/3/4 UART2" + depends on ARCH_OMAP2PLUS + select DEBUG_OMAP2PLUS_UART + + config DEBUG_OMAP2UART3 + bool "Kernel low-level debugging messages via OMAP2 UART3 (n8x0)" + depends on ARCH_OMAP2PLUS + select DEBUG_OMAP2PLUS_UART + + config DEBUG_OMAP3UART3 + bool "Kernel low-level debugging messages via OMAP3 UART3 (most omap3 boards)" + depends on ARCH_OMAP2PLUS + select DEBUG_OMAP2PLUS_UART + help + This covers at least cm_t3x, beagle, crane, devkit8000, + igep00x0, ldp, n900, n9(50), pandora, overo, touchbook, + and 3517evm. + + config DEBUG_OMAP4UART3 + bool "Kernel low-level debugging messages via OMAP4/5 UART3 (omap4 blaze, panda, omap5 sevm)" + depends on ARCH_OMAP2PLUS + select DEBUG_OMAP2PLUS_UART + + config DEBUG_OMAP3UART4 + bool "Kernel low-level debugging messages via OMAP36XX UART4" + depends on ARCH_OMAP2PLUS + select DEBUG_OMAP2PLUS_UART + + config DEBUG_OMAP4UART4 + bool "Kernel low-level debugging messages via OMAP4/5 UART4" + depends on ARCH_OMAP2PLUS + select DEBUG_OMAP2PLUS_UART + + config DEBUG_TI81XXUART1 + bool "Kernel low-level debugging messages via TI81XX UART1 (ti8148evm)" + depends on ARCH_OMAP2PLUS + select DEBUG_OMAP2PLUS_UART + + config DEBUG_TI81XXUART2 + bool "Kernel low-level debugging messages via TI81XX UART2" + depends on ARCH_OMAP2PLUS + select DEBUG_OMAP2PLUS_UART + + config DEBUG_TI81XXUART3 + bool "Kernel low-level debugging messages via TI81XX UART3 (ti8168evm)" + depends on ARCH_OMAP2PLUS + select DEBUG_OMAP2PLUS_UART + + config DEBUG_AM33XXUART1 + bool "Kernel low-level debugging messages via AM33XX UART1" + depends on ARCH_OMAP2PLUS + select DEBUG_OMAP2PLUS_UART + + config DEBUG_ZOOM_UART + bool "Kernel low-level debugging messages via Zoom2/3 UART" + depends on ARCH_OMAP2PLUS + select DEBUG_OMAP2PLUS_UART config DEBUG_PICOXCELL_UART depends on ARCH_PICOXCELL
@@ -413,9 +473,58 @@ choice their output to the standard serial port on the RealView PB1176 platform. - config DEBUG_ROCKCHIP_UART - bool "Kernel low-level debugging messages via Rockchip UART" + config DEBUG_RK29_UART0 + bool "Kernel low-level debugging messages via Rockchip RK29 UART0" + depends on ARCH_ROCKCHIP + select DEBUG_ROCKCHIP_UART + help + Say Y here if you want kernel low-level debugging support + on Rockchip based platforms. + + config DEBUG_RK29_UART1 + bool "Kernel low-level debugging messages via Rockchip RK29 UART1" + depends on ARCH_ROCKCHIP + select DEBUG_ROCKCHIP_UART + help + Say Y here if you want kernel low-level debugging support + on Rockchip based platforms. + + config DEBUG_RK29_UART2 + bool "Kernel low-level debugging messages via Rockchip RK29 UART2" + depends on ARCH_ROCKCHIP + select DEBUG_ROCKCHIP_UART + help + Say Y here if you want kernel low-level debugging support + on Rockchip based platforms. + + config DEBUG_RK3X_UART0 + bool "Kernel low-level debugging messages via Rockchip RK3X UART0" + depends on ARCH_ROCKCHIP + select DEBUG_ROCKCHIP_UART + help + Say Y here if you want kernel low-level debugging support + on Rockchip based platforms. + + config DEBUG_RK3X_UART1 + bool "Kernel low-level debugging messages via Rockchip RK3X UART1" depends on ARCH_ROCKCHIP + select DEBUG_ROCKCHIP_UART + help + Say Y here if you want kernel low-level debugging support + on Rockchip based platforms. + + config DEBUG_RK3X_UART2 + bool "Kernel low-level debugging messages via Rockchip RK3X UART2" + depends on ARCH_ROCKCHIP + select DEBUG_ROCKCHIP_UART + help + Say Y here if you want kernel low-level debugging support + on Rockchip based platforms. + + config DEBUG_RK3X_UART3 + bool "Kernel low-level debugging messages via Rockchip RK3X UART3" + depends on ARCH_ROCKCHIP + select DEBUG_ROCKCHIP_UART help Say Y here if you want kernel low-level debugging support on Rockchip based platforms.
@@ -489,9 +598,54 @@ choice Say Y here if you want kernel low-level debugging support on Allwinner A1X based platforms on the UART1. - config DEBUG_TEGRA_UART + config TEGRA_DEBUG_UART_AUTO_ODMDATA + bool "Kernel low-level debugging messages via Tegra UART via ODMDATA" depends on ARCH_TEGRA - bool "Use Tegra UART for low-level debug" + select DEBUG_TEGRA_UART + help + Automatically determines which UART to use for low-level + debug based on the ODMDATA value. This value is part of + the BCT, and is written to the boot memory device using + nvflash, or other flashing tool. When bits 19:18 are 3, + then bits 17:15 indicate which UART to use; 0/1/2/3/4 + are UART A/B/C/D/E. + + config TEGRA_DEBUG_UARTA + bool "Kernel low-level debugging messages via Tegra UART A" + depends on ARCH_TEGRA + select DEBUG_TEGRA_UART + help + Say Y here if you want kernel low-level debugging support + on Tegra based platforms. + + config TEGRA_DEBUG_UARTB + bool "Kernel low-level debugging messages via Tegra UART B" + depends on ARCH_TEGRA + select DEBUG_TEGRA_UART + help + Say Y here if you want kernel low-level debugging support + on Tegra based platforms. + + config TEGRA_DEBUG_UARTC + bool "Kernel low-level debugging messages via Tegra UART C" + depends on ARCH_TEGRA + select DEBUG_TEGRA_UART + help + Say Y here if you want kernel low-level debugging support + on Tegra based platforms. + + config TEGRA_DEBUG_UARTD + bool "Kernel low-level debugging messages via Tegra UART D" + depends on ARCH_TEGRA + select DEBUG_TEGRA_UART + help + Say Y here if you want kernel low-level debugging support + on Tegra based platforms. + + config TEGRA_DEBUG_UARTE + bool "Kernel low-level debugging messages via Tegra UART E" + depends on ARCH_TEGRA + select DEBUG_TEGRA_UART help Say Y here if you want kernel low-level debugging support on Tegra based platforms.
@@ -510,13 +664,25 @@ choice Say Y here if you want the debug print routines to direct their output to the uart1 port on SiRFmarco devices. - config DEBUG_STI_UART + config STIH41X_DEBUG_ASC2 + bool "Use StiH415/416 ASC2 UART for low-level debug" + depends on ARCH_STI + select DEBUG_STI_UART + help + Say Y here if you want kernel low-level debugging support + on STiH415/416 based platforms like b2000, which has + default UART wired up to ASC2. + + If unsure, say N. + + config STIH41X_DEBUG_SBC_ASC1 + bool "Use StiH415/416 SBC ASC1 UART for low-level debug" depends on ARCH_STI - bool "Use StiH415/416 ASC for low-level debug" + select DEBUG_STI_UART help Say Y here if you want kernel low-level debugging support - on StiH415/416 based platforms like B2000, B2020. - It support UART2 and SBC_UART1. + on STiH415/416 based platforms like b2020. which has + default UART wired up to SBC ASC1. If unsure, say N.
@@ -615,6 +781,10 @@ endchoice config DEBUG_EXYNOS_UART bool +config DEBUG_OMAP2PLUS_UART + bool + depends on ARCH_OMAP2PLUS + config DEBUG_IMX_UART_PORT int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \ DEBUG_IMX25_UART || \
@@ -631,133 +801,17 @@ config DEBUG_IMX_UART_PORT Choose UART port on which kernel low-level debug messages should be output. -choice - prompt "Low-level debug console UART" - depends on DEBUG_OMAP2PLUS_UART - - config DEBUG_OMAP2UART1 - bool "OMAP2/3/4 UART1 (omap2/3 sdp boards and some omap3 boards)" - help - This covers at least h4, 2430sdp, 3430sdp, 3630sdp, - omap3 torpedo and 3530 lv som. - - config DEBUG_OMAP2UART2 - bool "OMAP2/3/4 UART2" - - config DEBUG_OMAP2UART3 - bool "OMAP2 UART3 (n8x0)" - - config DEBUG_OMAP3UART3 - bool "OMAP3 UART3 (most omap3 boards)" - help - This covers at least cm_t3x, beagle, crane, devkit8000, - igep00x0, ldp, n900, n9(50), pandora, overo, touchbook, - and 3517evm. - - config DEBUG_OMAP4UART3 - bool "OMAP4/5 UART3 (omap4 blaze, panda, omap5 sevm)" - - config DEBUG_OMAP3UART4 - bool "OMAP36XX UART4" - - config DEBUG_OMAP4UART4 - bool "OMAP4/5 UART4" - - config DEBUG_TI81XXUART1 - bool "TI81XX UART1 (ti8148evm)" - - config DEBUG_TI81XXUART2 - bool "TI81XX UART2" - - config DEBUG_TI81XXUART3 - bool "TI81XX UART3 (ti8168evm)" - - config DEBUG_AM33XXUART1 - bool "AM33XX UART1" - - config DEBUG_ZOOM_UART - bool "Zoom2/3 UART" -endchoice - -choice - prompt "Low-level debug console UART" - depends on DEBUG_ROCKCHIP_UART - - config DEBUG_RK29_UART0 - bool "RK29 UART0" - - config DEBUG_RK29_UART1 - bool "RK29 UART1" - - config DEBUG_RK29_UART2 - bool "RK29 UART2" - - config DEBUG_RK3X_UART0 - bool "RK3X UART0" - - config DEBUG_RK3X_UART1 - bool "RK3X UART1" - - config DEBUG_RK3X_UART2 - bool "RK3X UART2" - - config DEBUG_RK3X_UART3 - bool "RK3X UART3" -endchoice - -choice - prompt "Low-level debug console UART" - depends on DEBUG_LL && DEBUG_TEGRA_UART - - config TEGRA_DEBUG_UART_AUTO_ODMDATA - bool "Via ODMDATA" - help - Automatically determines which UART to use for low-level debug based - on the ODMDATA value. This value is part of the BCT, and is written - to the boot memory device using nvflash, or other flashing tool. - When bits 19:18 are 3, then bits 17:15 indicate which UART to use; - 0/1/2/3/4 are UART A/B/C/D/E. - - config TEGRA_DEBUG_UARTA - bool "UART A" - - config TEGRA_DEBUG_UARTB - bool "UART B" - - config TEGRA_DEBUG_UARTC - bool "UART C" - - config TEGRA_DEBUG_UARTD - bool "UART D" - - config TEGRA_DEBUG_UARTE - bool "UART E" - -endchoice - -choice - prompt "Low-level debug console UART" - depends on DEBUG_LL && DEBUG_STI_UART - - config STIH41X_DEBUG_ASC2 - bool "ASC2 UART" - help - Say Y here if you want kernel low-level debugging support - on STiH415/416 based platforms like b2000, which has - default UART wired up to ASC2. - - If unsure, say N. - - config STIH41X_DEBUG_SBC_ASC1 - bool "SBC ASC1 UART" - help - Say Y here if you want kernel low-level debugging support - on STiH415/416 based platforms like b2020. which has - default UART wired up to SBC ASC1. +config DEBUG_ROCKCHIP_UART + bool + depends on ARCH_ROCKCHIP - If unsure, say N. +config DEBUG_TEGRA_UART + bool + depends on ARCH_TEGRA -endchoice +config DEBUG_STI_UART + bool + depends on ARCH_STI config DEBUG_LL_INCLUDE string
Signature · 1 line
1.7.4.4
RFC PATCH v2 3/14 ARM: debug: provide 8250 debug uart flow control configuration option
In reply to Russell King - ARM LinuxMove the definition out of the machine class debug-macro.S header into the Kconfig files.
--- arch/arm/Kconfig.debug | 9 +++++++++ arch/arm/include/asm/hardware/debug-8250.S | 2 +- arch/arm/mach-ebsa110/include/mach/debug-macro.S | 1 - .../arm/mach-footbridge/include/mach/debug-macro.S | 1 - arch/arm/mach-gemini/include/mach/debug-macro.S | 1 - arch/arm/mach-rpc/include/mach/debug-macro.S | 1 - 6 files changed, 10 insertions(+), 5 deletions(-)
arch/arm/Kconfig.debug +9 -0
@@ -856,6 +856,15 @@ config DEBUG_LL_INCLUDE default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 default "mach/debug-macro.S" +config DEBUG_UART_8250 + def_bool ARCH_EBSA110 || (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \ + ARCH_GEMINI || ARCH_RPC + +config DEBUG_UART_8250_FLOW_CONTROL + bool "Enable flow control for 8250 UART" + depends on DEBUG_UART_8250 + default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_GEMINI || ARCH_RPC + config DEBUG_UNCOMPRESS bool default y if ARCH_MULTIPLATFORM && DEBUG_LL && \
arch/arm/include/asm/hardware/debug-8250.S +1 -1
@@ -21,7 +21,7 @@ .endm .macro waituart,rd,rx -#ifdef FLOW_CONTROL +#ifdef CONFIG_DEBUG_UART_8250_FLOW_CONTROL 1001: ldrb \rd, [\rx, #UART_MSR << UART_SHIFT] tst \rd, #UART_MSR_CTS beq 1001b
arch/arm/mach-ebsa110/include/mach/debug-macro.S +0 -1
@@ -18,5 +18,4 @@ .endm #define UART_SHIFT 2 -#define FLOW_CONTROL #include <asm/hardware/debug-8250.S>
arch/arm/mach-footbridge/include/mach/debug-macro.S +0 -1
@@ -23,7 +23,6 @@ .endm #define UART_SHIFT 0 -#define FLOW_CONTROL #include <asm/hardware/debug-8250.S> #else
arch/arm/mach-gemini/include/mach/debug-macro.S +0 -1
@@ -17,5 +17,4 @@ .endm #define UART_SHIFT 2 -#define FLOW_CONTROL #include <asm/hardware/debug-8250.S>
arch/arm/mach-rpc/include/mach/debug-macro.S +0 -1
@@ -19,5 +19,4 @@ .endm #define UART_SHIFT 2 -#define FLOW_CONTROL #include <asm/hardware/debug-8250.S>
Signature · 1 line
1.7.4.4
RFC PATCH v2 4/14 ARM: debug: provide 8250 debug uart register shift configuration option
In reply to Russell King - ARM LinuxMove the definition of the UART register shift out of the platform specific header file into the Kconfig files.
--- arch/arm/Kconfig.debug | 28 ++++++++++++++++++- arch/arm/include/asm/hardware/debug-8250.S | 4 +++ arch/arm/include/debug/mvebu.S | 1 - arch/arm/include/debug/nspire.S | 1 - arch/arm/include/debug/pxa.S | 1 - arch/arm/include/debug/rockchip.S | 1 - arch/arm/include/debug/sunxi.S | 1 - arch/arm/mach-dove/include/mach/debug-macro.S | 1 - arch/arm/mach-ebsa110/include/mach/debug-macro.S | 1 - .../arm/mach-footbridge/include/mach/debug-macro.S | 1 - arch/arm/mach-gemini/include/mach/debug-macro.S | 1 - arch/arm/mach-iop13xx/include/mach/debug-macro.S | 1 - arch/arm/mach-iop32x/include/mach/debug-macro.S | 1 - arch/arm/mach-iop33x/include/mach/debug-macro.S | 1 - arch/arm/mach-ixp4xx/include/mach/debug-macro.S | 1 - arch/arm/mach-kirkwood/include/mach/debug-macro.S | 1 - arch/arm/mach-lpc32xx/include/mach/debug-macro.S | 1 - arch/arm/mach-mv78xx0/include/mach/debug-macro.S | 1 - arch/arm/mach-orion5x/include/mach/debug-macro.S | 1 - arch/arm/mach-rpc/include/mach/debug-macro.S | 1 - 20 files changed, 30 insertions(+), 20 deletions(-)
arch/arm/Kconfig.debug +26 -2
@@ -275,6 +275,7 @@ choice config DEBUG_MMP_UART2 bool "Kernel low-level debugging message via MMP UART2" depends on ARCH_MMP + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on MMP UART2.
@@ -282,6 +283,7 @@ choice config DEBUG_MMP_UART3 bool "Kernel low-level debugging message via MMP UART3" depends on ARCH_MMP + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on MMP UART3.
@@ -326,6 +328,7 @@ choice config DEBUG_MVEBU_UART bool "Kernel low-level debugging messages via MVEBU UART (old bootloaders)" depends on ARCH_MVEBU + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on MVEBU based platforms.
@@ -344,6 +347,7 @@ choice config DEBUG_MVEBU_UART_ALTERNATE bool "Kernel low-level debugging messages via MVEBU UART (new bootloaders)" depends on ARCH_MVEBU + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on MVEBU based platforms.
@@ -365,6 +369,7 @@ choice config DEBUG_NSPIRE_CLASSIC_UART bool "Kernel low-level debugging via TI-NSPIRE 8250 UART" depends on ARCH_NSPIRE + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on TI-NSPIRE classic models.
@@ -453,6 +458,7 @@ choice config DEBUG_PXA_UART1 depends on ARCH_PXA bool "Use PXA UART1 for low-level debug" + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on PXA UART1.
@@ -477,6 +483,7 @@ choice bool "Kernel low-level debugging messages via Rockchip RK29 UART0" depends on ARCH_ROCKCHIP select DEBUG_ROCKCHIP_UART + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on Rockchip based platforms.
@@ -485,6 +492,7 @@ choice bool "Kernel low-level debugging messages via Rockchip RK29 UART1" depends on ARCH_ROCKCHIP select DEBUG_ROCKCHIP_UART + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on Rockchip based platforms.
@@ -493,6 +501,7 @@ choice bool "Kernel low-level debugging messages via Rockchip RK29 UART2" depends on ARCH_ROCKCHIP select DEBUG_ROCKCHIP_UART + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on Rockchip based platforms.
@@ -501,6 +510,7 @@ choice bool "Kernel low-level debugging messages via Rockchip RK3X UART0" depends on ARCH_ROCKCHIP select DEBUG_ROCKCHIP_UART + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on Rockchip based platforms.
@@ -509,6 +519,7 @@ choice bool "Kernel low-level debugging messages via Rockchip RK3X UART1" depends on ARCH_ROCKCHIP select DEBUG_ROCKCHIP_UART + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on Rockchip based platforms.
@@ -517,6 +528,7 @@ choice bool "Kernel low-level debugging messages via Rockchip RK3X UART2" depends on ARCH_ROCKCHIP select DEBUG_ROCKCHIP_UART + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on Rockchip based platforms.
@@ -525,6 +537,7 @@ choice bool "Kernel low-level debugging messages via Rockchip RK3X UART3" depends on ARCH_ROCKCHIP select DEBUG_ROCKCHIP_UART + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on Rockchip based platforms.
@@ -587,6 +600,7 @@ choice config DEBUG_SUNXI_UART0 bool "Kernel low-level debugging messages via sunXi UART0" depends on ARCH_SUNXI + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on Allwinner A1X based platforms on the UART0.
@@ -594,6 +608,7 @@ choice config DEBUG_SUNXI_UART1 bool "Kernel low-level debugging messages via sunXi UART1" depends on ARCH_SUNXI + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on Allwinner A1X based platforms on the UART1.
@@ -857,8 +872,17 @@ config DEBUG_LL_INCLUDE default "mach/debug-macro.S" config DEBUG_UART_8250 - def_bool ARCH_EBSA110 || (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \ - ARCH_GEMINI || ARCH_RPC + 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 + +config DEBUG_UART_8250_SHIFT + int "Register offset shift for the 8250 debug UART" + depends on DEBUG_UART_8250 + default 0 if FOOTBRIDGE || ARCH_IOP32X + default 2 config DEBUG_UART_8250_FLOW_CONTROL bool "Enable flow control for 8250 UART"
arch/arm/include/asm/hardware/debug-8250.S +4 -0
@@ -9,6 +9,10 @@ */ #include <linux/serial_reg.h> +#ifndef UART_SHIFT +#define UART_SHIFT CONFIG_DEBUG_UART_8250_SHIFT +#endif + .macro senduart,rd,rx strb \rd, [\rx, #UART_TX << UART_SHIFT] .endm
arch/arm/include/debug/mvebu.S +0 -1
@@ -26,5 +26,4 @@ orr \rv, \rv, #0x00012000 .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
arch/arm/include/debug/nspire.S +0 -1
@@ -23,6 +23,5 @@ #endif #ifdef CONFIG_DEBUG_NSPIRE_CLASSIC_UART -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S> #endif
arch/arm/include/debug/pxa.S +0 -1
@@ -29,5 +29,4 @@ ldr \rv, =PXA_UART_REG_VIRT_BASE .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
arch/arm/include/debug/rockchip.S +0 -1
@@ -38,5 +38,4 @@ ldr \rv, =ROCKCHIP_UART_DEBUG_VIRT_BASE .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
arch/arm/include/debug/sunxi.S +0 -1
@@ -23,5 +23,4 @@ ldr \rv, =SUNXI_UART_DEBUG_VIRT_BASE .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
arch/arm/mach-dove/include/mach/debug-macro.S +0 -1
@@ -15,5 +15,4 @@ orr \rv, \rv, #0x00012000 .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
arch/arm/mach-ebsa110/include/mach/debug-macro.S +0 -1
@@ -17,5 +17,4 @@ mov \rp, \rv .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
arch/arm/mach-footbridge/include/mach/debug-macro.S +0 -1
@@ -22,7 +22,6 @@ orr \rp, \rp, #0x7c000000 @ physical .endm -#define UART_SHIFT 0 #include <asm/hardware/debug-8250.S> #else
arch/arm/mach-gemini/include/mach/debug-macro.S +0 -1
@@ -16,5 +16,4 @@ ldr \rv, =IO_ADDRESS(GEMINI_UART_BASE) @ virtual .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
arch/arm/mach-iop13xx/include/mach/debug-macro.S +0 -1
@@ -20,5 +20,4 @@ orr \rp, \rp, #0x00d80000 .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
arch/arm/mach-iop32x/include/mach/debug-macro.S +0 -1
@@ -17,5 +17,4 @@ mov \rv, \rp .endm -#define UART_SHIFT 0 #include <asm/hardware/debug-8250.S>
arch/arm/mach-iop33x/include/mach/debug-macro.S +0 -1
@@ -18,5 +18,4 @@ orr \rp, #0xff000000 @ physical .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
arch/arm/mach-ixp4xx/include/mach/debug-macro.S +0 -1
@@ -22,5 +22,4 @@ orr \rp, \rp, #0xc8000000 @ physical .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
arch/arm/mach-kirkwood/include/mach/debug-macro.S +0 -1
@@ -15,5 +15,4 @@ orr \rv, \rv, #0x00012000 .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
arch/arm/mach-lpc32xx/include/mach/debug-macro.S +0 -1
@@ -25,5 +25,4 @@ ldrne \rv, =0xF4090000 .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
arch/arm/mach-mv78xx0/include/mach/debug-macro.S +0 -1
@@ -15,5 +15,4 @@ orr \rv, \rv, #0x00012000 .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
arch/arm/mach-orion5x/include/mach/debug-macro.S +0 -1
@@ -17,5 +17,4 @@ orr \rv, \rv, #0x00012000 .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
arch/arm/mach-rpc/include/mach/debug-macro.S +0 -1
@@ -18,5 +18,4 @@ orr \rp, \rp, #0x03000000 @ physical .endm -#define UART_SHIFT 2 #include <asm/hardware/debug-8250.S>
Signature · 1 line
1.7.4.4
RFC PATCH v2 4/14 ARM: debug: provide 8250 debug uart register shift configuration option
Quoted 5 lines · Russell King
Move the definition of the UART register shift out of the platform specific header file into the
Kconfigfiles.Signed-off-by Russell King <[email protected]>---
[..]
Quoted 6 lines
arch/arm/Kconfig.debug +0
-0@@ -275,6 +275,7 @@ choice
[..]
Quoted 8 lines
arch/arm/Kconfig.debug +2
-2@@ -857,8 +872,17 @@ config DEBUG_LL_INCLUDE default "mach/debug-macro.S" config DEBUG_UART_8250 - def_bool ARCH_EBSA110 || (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \ - ARCH_GEMINI || ARCH_RPC + def_bool ARCH_DOVE || ARCH_EBSA110 || \ + (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
arch/arm/Kconfig.debug config DEBUG_LL_INCLUDE · line 886
Quoted 10 lines
arch/arm/Kconfig.debug +9
-0+ ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \ + ARCH_IOP33X || ARCH_IXP4XX || ARCH_KIRKWOOD || \ + ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC + +config DEBUG_UART_8250_SHIFT + int "Register offset shift for the 8250 debug UART" + depends on DEBUG_UART_8250 + default 0 if FOOTBRIDGE || ARCH_IOP32X + default 2
Just a question. Exposing selection choice for UART port and probably flow control is just fine, but do we need to really need config entries for SHIFT, PA, VA etc ?
Regards,
Santosh
RFC PATCH v2 4/14 ARM: debug: provide 8250 debug uart register shift configuration option
Quoted 3 lines · Santosh Shilimkar
Just a question. Exposing selection choice for UART port and probably flow control is just fine, but do we need to really need config entries for SHIFT, PA, VA etc ?
Let's look at the original problem. We have lots of files in arch/arm/include/debug who's sole purpose is to define a pair of base addresses. Maybe around 500 lines of code doing just that - though much of it is copyright notices (can someone explain to me the point of claiming copyright on four lines of code defining a base address of a UART which is, apart from the addresses themselves, identical with every other damned file?)
What this series does is remove many of those files by consolidating much of them into a much denser way to represent all this variability. However, this doesn't really address the root problem, which is that we have all this information in the kernel, which needs to be added to every single time we have a new platform come along no matter what it is.
We need to stop that from happening - we need a way for people to tell the kernel where their UART is without having to load the kernel up with lots of platform specific information [*].
Also, even without this, the debug menu has become something of a sprawling mess, with various people re-implementing what's already there presumably because they don't look/don't bother to research what support is already there - and is another source of constant additions.
So, the idea that every platform gets to somehow put its UART addresses into the kernel image isn't scalable. Either we end up with lots of defaults in a Kconfig wihch are also prone to merge conflicts, or we end up with lots of files in arch/arm/include/debug defining the base addresses.
We need to stop all of these problems from happening before they become a big headache for us - imagine Linus' reaction when our debug menu grows to be the largest Kconfig file in the kernel tree! Do you want to be there when that happens? We're the 22nd biggest Kconfig file already at 25K - there's only one debug Kconfig larger and that's the main lib/Kconfig.debug one which has recently been through a cleanup.
Therefore, the idea is to provide _generic_ options which people can set according to their platforms needs. Remember, this is *supposed* to be a developer tool, not a user tool, so asking for addresses and other parameters is perfectly acceptable - just make sure that they're documented in a reasonable place.
Lastly, if you want to moan at someone about this, you only have to look at the hardware guys who have made ARM hardware be soo diverse that we have ended up with all these different implementations in the first place. It is *their* problem that we have every platform doing this basic stuff differently, and it is they who need to realise that this mentality doesn't scale and hurts. The "oh it's just software, they can deal with it" attitude needs to be fought.
* - We've been around all the discussions before about getting this information from DT, and quite frankly I'm *really* not in the mood for a rehash of those arguments yet again - we'll only end up at the same point. (If anyone feels that they need to state their opinion on that, please *first* go back and read the previous discussions about what the LL debug infrastructure is about, it's purpose, etc. If you don't do your homework before piping up, I'm not going to bother replying to you.)
RFC PATCH v2 4/14 ARM: debug: provide 8250 debug uart register shift configuration option
Quoted 42 lines · Russell King - ARM Linux
Quoted 3 lines · Santosh Shilimkar
Just a question. Exposing selection choice for UART port and probably flow control is just fine, but do we need to really need config entries for SHIFT, PA, VA etc ?
Let's look at the original problem. We have lots of files in
arch/arm/include/debugwho's sole purpose is to define a pair of base addresses. Maybe around 500 lines of code doing just that - though much of it is copyright notices (can someone explain to me the point of claiming copyright on four lines of code defining a base address of a UART which is, apart from the addresses themselves, identical with every other damned file?)What this series does is remove many of those files by consolidating much of them into a much denser way to represent all this variability. However, this doesn't really address the root problem, which is that we have all this information in the kernel, which needs to be added to every single time we have a new platform come along no matter what it is.
We need to stop that from happening - we need a way for people to tell the kernel where their UART is without having to load the kernel up with lots of platform specific information [*].
Also, even without this, the debug menu has become something of a sprawling mess, with various people re-implementing what's already there presumably because they don't look/don't bother to research what support is already there - and is another source of constant additions.
So, the idea that every platform gets to somehow put its UART addresses into the kernel image isn't scalable. Either we end up with lots of defaults in a
Kconfigwihch are also prone to merge conflicts, or we end up with lots of files inarch/arm/include/debugdefining the base addresses.We need to stop all of these problems from happening before they become a big headache for us - imagine Linus' reaction when our debug menu grows to be the largest
Kconfigfile in the kernel tree! Do you want to be there when that happens? We're the 22nd biggestKconfigfile already at 25K - there's only one debugKconfiglarger and that's the mainlib/Kconfig.debugone which has recently been through a cleanup.
Quoted 5 lines
Therefore, the idea is to provide _generic_ options which people can set according to their platforms needs. Remember, this is *supposed* to be a developer tool, not a user tool, so asking for addresses and other parameters is perfectly acceptable - just make sure that they're documented in a reasonable place.
And as if to prove the point, while writing that email, a patch dropped into my mailbox:
"ARM: BCM53XX: initial support for the BCM5301/BCM470X"
which adds yet another 8250 debug UART where the only difference between it and the others are its two base addresses, and in order to do that it needs to add 25 or so more lines - 19 lines in a header file and six in arch/arm/Kconfig.debug.
With the solution I'm proposing above, that could be:
- zero lines if you just set the options via Kconfig
- one, two or maybe at most three lines if you include it with some documentation file already in the kernel
RFC PATCH v2 4/14 ARM: debug: provide 8250 debug uart register shift configuration option
Quoted 59 lines · Russell King - ARM Linux
Quoted 42 lines · Russell King - ARM Linux
Quoted 3 lines · Santosh Shilimkar
Just a question. Exposing selection choice for UART port and probably flow control is just fine, but do we need to really need config entries for SHIFT, PA, VA etc ?
Let's look at the original problem. We have lots of files in
arch/arm/include/debugwho's sole purpose is to define a pair of base addresses. Maybe around 500 lines of code doing just that - though much of it is copyright notices (can someone explain to me the point of claiming copyright on four lines of code defining a base address of a UART which is, apart from the addresses themselves, identical with every other damned file?)What this series does is remove many of those files by consolidating much of them into a much denser way to represent all this variability. However, this doesn't really address the root problem, which is that we have all this information in the kernel, which needs to be added to every single time we have a new platform come along no matter what it is.
We need to stop that from happening - we need a way for people to tell the kernel where their UART is without having to load the kernel up with lots of platform specific information [*].
Also, even without this, the debug menu has become something of a sprawling mess, with various people re-implementing what's already there presumably because they don't look/don't bother to research what support is already there - and is another source of constant additions.
So, the idea that every platform gets to somehow put its UART addresses into the kernel image isn't scalable. Either we end up with lots of defaults in a
Kconfigwihch are also prone to merge conflicts, or we end up with lots of files inarch/arm/include/debugdefining the base addresses.We need to stop all of these problems from happening before they become a big headache for us - imagine Linus' reaction when our debug menu grows to be the largest
Kconfigfile in the kernel tree! Do you want to be there when that happens? We're the 22nd biggestKconfigfile already at 25K - there's only one debugKconfiglarger and that's the mainlib/Kconfig.debugone which has recently been through a cleanup.Quoted 5 lines
Therefore, the idea is to provide _generic_ options which people can set according to their platforms needs. Remember, this is *supposed* to be a developer tool, not a user tool, so asking for addresses and other parameters is perfectly acceptable - just make sure that they're documented in a reasonable place.
And as if to prove the point, while writing that email, a patch dropped into my mailbox:
"ARM: BCM53XX: initial support for the BCM5301/BCM470X"
which adds yet another 8250 debug UART where the only difference between it and the others are its two base addresses, and in order to do that it needs to add 25 or so more lines - 19 lines in a header file and six in
arch/arm/Kconfig.debug.
Quoted 6 lines
With the solution I'm proposing above, that could be:
- zero lines if you just set the options via
Kconfig
- one, two or maybe at most three lines if you include it with some documentation file already in the kernel
Fair enough. Sorry I missed the point about providing the LL debug information with config entries than adding the code. It indeed doable as long as the information is documented as you said.
Thanks for explaining the goal of the series again.
Regards,
Santosh
RFC PATCH v2 5/14 ARM: debug: provide 8250 debug uart phys/virt address configuration options
In reply to Russell King - ARM LinuxMove the definition of the UART register addresses out of the platform specific header file into the Kconfig files.
--- arch/arm/Kconfig.debug | 59 ++++++++++++++++++++ arch/arm/include/asm/hardware/debug-8250.S | 9 +++- arch/arm/include/debug/mvebu.S | 16 ----- arch/arm/include/debug/nspire.S | 4 +- arch/arm/include/debug/pxa.S | 19 ------ arch/arm/include/debug/rockchip.S | 29 ---------- arch/arm/include/debug/sunxi.S | 14 ----- arch/arm/mach-dove/include/mach/debug-macro.S | 10 --- arch/arm/mach-ebsa110/include/mach/debug-macro.S | 7 -- .../arm/mach-footbridge/include/mach/debug-macro.S | 9 --- arch/arm/mach-gemini/include/mach/debug-macro.S | 7 -- arch/arm/mach-iop13xx/include/mach/debug-macro.S | 10 --- arch/arm/mach-iop32x/include/mach/debug-macro.S | 7 -- arch/arm/mach-iop33x/include/mach/debug-macro.S | 8 --- arch/arm/mach-ixp4xx/include/mach/debug-macro.S | 13 ---- arch/arm/mach-kirkwood/include/mach/debug-macro.S | 10 --- arch/arm/mach-lpc32xx/include/mach/debug-macro.S | 10 --- arch/arm/mach-mv78xx0/include/mach/debug-macro.S | 10 --- arch/arm/mach-orion5x/include/mach/debug-macro.S | 10 --- arch/arm/mach-rpc/include/mach/debug-macro.S | 8 --- 20 files changed, 68 insertions(+), 201 deletions(-)
arch/arm/Kconfig.debug +59 -0
@@ -878,6 +878,65 @@ config DEBUG_UART_8250 ARCH_IOP33X || ARCH_IXP4XX || ARCH_KIRKWOOD || \ ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC +config DEBUG_UART_PHYS + hex "Physical base address of debug UART" + default 0x01c28000 if DEBUG_SUNXI_UART0 + default 0x01c28400 if DEBUG_SUNXI_UART1 + default 0x03010fe0 if ARCH_RPC + default 0x10124000 if DEBUG_RK3X_UART0 + default 0x10126000 if DEBUG_RK3X_UART1 + default 0x20060000 if DEBUG_RK29_UART0 + default 0x20064000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2 + default 0x20068000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3 + default 0x40090000 if ARCH_LPC32XX + default 0x40100000 if DEBUG_PXA_UART1 + default 0x42000000 if ARCH_GEMINI + default 0x7c0003f8 if FOOTBRIDGE + default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART + default 0xc8000000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN + default 0xc8000003 if ARCH_IXP4XX && CPU_BIG_ENDIAN + default 0xd0012000 if DEBUG_MVEBU_UART + default 0xd4017000 if DEBUG_MMP_UART2 + default 0xd4018000 if DEBUG_MMP_UART3 + default 0xf0000be0 if ARCH_EBSA110 + default 0xf1012000 if DEBUG_MVEBU_UART_ALTERNATE + default 0xf1012000 if ARCH_DOVE || ARCH_KIRKWOOD || ARCH_MV78XX0 || \ + ARCH_ORION5X + default 0xfe800000 if ARCH_IOP32X + default 0xffd82340 if ARCH_IOP13XX + default 0xfffff700 if ARCH_IOP33X + depends on DEBUG_UART_8250 + +config DEBUG_UART_VIRT + hex "Virtual base address of debug UART" + default 0xe0010fe0 if ARCH_RPC + default 0xf0000be0 if ARCH_EBSA110 + 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 0xfd012000 if ARCH_MV78XX0 + default 0xfde12000 if ARCH_DOVE + default 0xfe012000 if ARCH_ORION5X + default 0xfe017000 if DEBUG_MMP_UART2 + default 0xfe018000 if DEBUG_MMP_UART3 + default 0xfe800000 if ARCH_IOP32X + default 0xfeb24000 if DEBUG_RK3X_UART0 + default 0xfeb26000 if DEBUG_RK3X_UART1 + default 0xfec12000 if DEBUG_MVEBU_UART || DEBUG_MVEBU_UART_ALTERNATE + 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 0xfed12000 if ARCH_KIRKWOOD + default 0xfee003f8 if FOOTBRIDGE + default 0xfee20000 if DEBUG_NSPIRE_CLASSIC_UART + default 0xfee82340 if ARCH_IOP13XX + default 0xfef00000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN + default 0xfef00003 if ARCH_IXP4XX && CPU_BIG_ENDIAN + default 0xfefff700 if ARCH_IOP33X + depends on DEBUG_UART_8250 + config DEBUG_UART_8250_SHIFT int "Register offset shift for the 8250 debug UART" depends on DEBUG_UART_8250
arch/arm/include/asm/hardware/debug-8250.S +8 -1
@@ -1,7 +1,7 @@ /* * arch/arm/include/asm/hardware/debug-8250.S * - * Copyright (C) 1994-1999 Russell King + * Copyright (C) 1994-2013 Russell King * * 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
@@ -9,6 +9,13 @@ */ #include <linux/serial_reg.h> +#ifdef CONFIG_DEBUG_UART_PHYS + .macro addruart, rp, rv, tmp + ldr \rp, =CONFIG_DEBUG_UART_PHYS + ldr \rv, =CONFIG_DEBUG_UART_VIRT + .endm +#endif + #ifndef UART_SHIFT #define UART_SHIFT CONFIG_DEBUG_UART_8250_SHIFT #endif
arch/arm/include/debug/mvebu.S +0 -16
@@ -10,20 +10,4 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - -#ifdef CONFIG_DEBUG_MVEBU_UART_ALTERNATE -#define ARMADA_370_XP_REGS_PHYS_BASE 0xf1000000 -#else -#define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000 -#endif - -#define ARMADA_370_XP_REGS_VIRT_BASE 0xfec00000 - - .macro addruart, rp, rv, tmp - ldr \rp, =ARMADA_370_XP_REGS_PHYS_BASE - ldr \rv, =ARMADA_370_XP_REGS_VIRT_BASE - orr \rp, \rp, #0x00012000 - orr \rv, \rv, #0x00012000 - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/include/debug/nspire.S +1 -3
@@ -8,7 +8,7 @@ * published by the Free Software Foundation. * */ - +#ifdef CONFIG_DEBUG_NSPIRE_CX_UART #define NSPIRE_EARLY_UART_PHYS_BASE 0x90020000 #define NSPIRE_EARLY_UART_VIRT_BASE 0xfee20000
@@ -17,8 +17,6 @@ ldr \rv, =(NSPIRE_EARLY_UART_VIRT_BASE) @ virtual base address .endm - -#ifdef CONFIG_DEBUG_NSPIRE_CX_UART #include <asm/hardware/debug-pl01x.S> #endif
arch/arm/include/debug/pxa.S +0 -19
@@ -10,23 +10,4 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - -#if defined(CONFIG_DEBUG_PXA_UART1) -#define PXA_UART_REG_PHYS_BASE 0x40100000 -#define PXA_UART_REG_VIRT_BASE 0xf2100000 -#elif defined(CONFIG_DEBUG_MMP_UART2) -#define PXA_UART_REG_PHYS_BASE 0xd4017000 -#define PXA_UART_REG_VIRT_BASE 0xfe017000 -#elif defined(CONFIG_DEBUG_MMP_UART3) -#define PXA_UART_REG_PHYS_BASE 0xd4018000 -#define PXA_UART_REG_VIRT_BASE 0xfe018000 -#else -#error "Select uart for DEBUG_LL" -#endif - - .macro addruart, rp, rv, tmp - ldr \rp, =PXA_UART_REG_PHYS_BASE - ldr \rv, =PXA_UART_REG_VIRT_BASE - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/include/debug/rockchip.S +0 -29
@@ -9,33 +9,4 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - -#if defined(CONFIG_DEBUG_RK29_UART0) -#define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20060000 -#define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed60000 -#elif defined(CONFIG_DEBUG_RK29_UART1) -#define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20064000 -#define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed64000 -#elif defined(CONFIG_DEBUG_RK29_UART2) -#define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20068000 -#define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed68000 -#elif defined(CONFIG_DEBUG_RK3X_UART0) -#define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x10124000 -#define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfeb24000 -#elif defined(CONFIG_DEBUG_RK3X_UART1) -#define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x10126000 -#define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfeb26000 -#elif defined(CONFIG_DEBUG_RK3X_UART2) -#define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20064000 -#define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed64000 -#elif defined(CONFIG_DEBUG_RK3X_UART3) -#define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20068000 -#define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed68000 -#endif - - .macro addruart, rp, rv, tmp - ldr \rp, =ROCKCHIP_UART_DEBUG_PHYS_BASE - ldr \rv, =ROCKCHIP_UART_DEBUG_VIRT_BASE - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/include/debug/sunxi.S +0 -14
@@ -9,18 +9,4 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - -#if defined(CONFIG_DEBUG_SUNXI_UART0) -#define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28000 -#define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28000 -#elif defined(CONFIG_DEBUG_SUNXI_UART1) -#define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28400 -#define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28400 -#endif - - .macro addruart, rp, rv, tmp - ldr \rp, =SUNXI_UART_DEBUG_PHYS_BASE - ldr \rv, =SUNXI_UART_DEBUG_VIRT_BASE - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/mach-dove/include/mach/debug-macro.S +0 -10
@@ -5,14 +5,4 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - -#include <mach/bridge-regs.h> - - .macro addruart, rp, rv, tmp - ldr \rp, =DOVE_SB_REGS_PHYS_BASE - ldr \rv, =DOVE_SB_REGS_VIRT_BASE - orr \rp, \rp, #0x00012000 - orr \rv, \rv, #0x00012000 - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/mach-ebsa110/include/mach/debug-macro.S +0 -7
@@ -10,11 +10,4 @@ * published by the Free Software Foundation. * **/ - - .macro addruart, rp, rv, tmp - mov \rp, #0xf0000000 - orr \rp, \rp, #0x00000be0 - mov \rp, \rv - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/mach-footbridge/include/mach/debug-macro.S +0 -9
@@ -14,16 +14,7 @@ #include <asm/hardware/dec21285.h> #ifndef CONFIG_DEBUG_DC21285_PORT - /* For NetWinder debugging */ - .macro addruart, rp, rv, tmp - mov \rp, #0x000003f8 - orr \rv, \rp, #0xfe000000 @ virtual - orr \rv, \rv, #0x00e00000 @ virtual - orr \rp, \rp, #0x7c000000 @ physical - .endm - #include <asm/hardware/debug-8250.S> - #else #include <mach/hardware.h> /* For EBSA285 debugging */
arch/arm/mach-gemini/include/mach/debug-macro.S +0 -7
@@ -9,11 +9,4 @@ * 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 - ldr \rp, =GEMINI_UART_BASE @ physical - ldr \rv, =IO_ADDRESS(GEMINI_UART_BASE) @ virtual - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/mach-iop13xx/include/mach/debug-macro.S +0 -10
@@ -10,14 +10,4 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - - .macro addruart, rp, rv, tmp - mov \rp, #0x00002300 - orr \rp, \rp, #0x00000040 - orr \rv, \rp, #0xfe000000 @ virtual - orr \rv, \rv, #0x00e80000 - orr \rp, \rp, #0xff000000 @ physical - orr \rp, \rp, #0x00d80000 - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/mach-iop32x/include/mach/debug-macro.S +0 -7
@@ -10,11 +10,4 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - - .macro addruart, rp, rv, tmp - mov \rp, #0xfe000000 @ physical as well as virtual - orr \rp, \rp, #0x00800000 @ location of the UART - mov \rv, \rp - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/mach-iop33x/include/mach/debug-macro.S +0 -8
@@ -10,12 +10,4 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - - .macro addruart, rp, rv, tmp - mov \rp, #0x00ff0000 - orr \rp, \rp, #0x0000f700 - orr \rv, #0xfe000000 @ virtual - orr \rp, #0xff000000 @ physical - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/mach-ixp4xx/include/mach/debug-macro.S +0 -13
@@ -9,17 +9,4 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - - .macro addruart, rp, rv, tmp -#ifdef __ARMEB__ - mov \rp, #3 @ Uart regs are at off set of 3 if - @ byte writes used - Big Endian. -#else - mov \rp, #0 -#endif - orr \rv, \rp, #0xfe000000 @ virtual - orr \rv, \rv, #0x00f00000 - orr \rp, \rp, #0xc8000000 @ physical - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/mach-kirkwood/include/mach/debug-macro.S +0 -10
@@ -5,14 +5,4 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - -#include <mach/bridge-regs.h> - - .macro addruart, rp, rv, tmp - ldr \rp, =KIRKWOOD_REGS_PHYS_BASE - ldr \rv, =KIRKWOOD_REGS_VIRT_BASE - orr \rp, \rp, #0x00012000 - orr \rv, \rv, #0x00012000 - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/mach-lpc32xx/include/mach/debug-macro.S +0 -10
@@ -15,14 +15,4 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ - -/* - * Debug output is hardcoded to standard UART 5 -*/ - - .macro addruart, rp, rv, tmp - ldreq \rp, =0x40090000 - ldrne \rv, =0xF4090000 - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/mach-mv78xx0/include/mach/debug-macro.S +0 -10
@@ -5,14 +5,4 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - -#include <mach/mv78xx0.h> - - .macro addruart, rp, rv, tmp - ldr \rp, =MV78XX0_REGS_PHYS_BASE - ldr \rv, =MV78XX0_REGS_VIRT_BASE - orr \rp, \rp, #0x00012000 - orr \rv, \rv, #0x00012000 - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/mach-orion5x/include/mach/debug-macro.S +0 -10
@@ -7,14 +7,4 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - -#include <mach/orion5x.h> - - .macro addruart, rp, rv, tmp - ldr \rp, =ORION5X_REGS_PHYS_BASE - ldr \rv, =ORION5X_REGS_VIRT_BASE - orr \rp, \rp, #0x00012000 - orr \rv, \rv, #0x00012000 - .endm - #include <asm/hardware/debug-8250.S>
arch/arm/mach-rpc/include/mach/debug-macro.S +0 -8
@@ -10,12 +10,4 @@ * published by the Free Software Foundation. * */ - - .macro addruart, rp, rv, tmp - mov \rp, #0x00010000 - orr \rp, \rp, #0x00000fe0 - orr \rv, \rp, #0xe0000000 @ virtual - orr \rp, \rp, #0x03000000 @ physical - .endm - #include <asm/hardware/debug-8250.S>
Signature · 1 line
1.7.4.4
RFC PATCH v2 6/14 ARM: debug: move 8250 debug include into arch/arm/include/debug/
In reply to Russell King - ARM LinuxNow that the 8250 debug include can stand alone without requiring platforms to provide any macros, move it into the debug directory so it can be directly included. This allows us to get rid of a lot of debug-macros include files.
--- arch/arm/Kconfig.debug | 10 +---- arch/arm/include/asm/hardware/debug-8250.S | 40 -------------------- arch/arm/include/debug/8250.S | 36 ++++++++++++++++++ arch/arm/include/debug/mvebu.S | 13 ------ arch/arm/include/debug/nspire.S | 4 -- arch/arm/include/debug/pxa.S | 13 ------ arch/arm/include/debug/rockchip.S | 12 ------ arch/arm/include/debug/sunxi.S | 12 ------ arch/arm/mach-dove/include/mach/debug-macro.S | 8 ---- arch/arm/mach-ebsa110/include/mach/debug-macro.S | 13 ------ .../arm/mach-footbridge/include/mach/debug-macro.S | 4 -- arch/arm/mach-gemini/include/mach/debug-macro.S | 12 ------ arch/arm/mach-iop13xx/include/mach/debug-macro.S | 13 ------ arch/arm/mach-iop32x/include/mach/debug-macro.S | 13 ------ arch/arm/mach-iop33x/include/mach/debug-macro.S | 13 ------ arch/arm/mach-ixp4xx/include/mach/debug-macro.S | 12 ------ arch/arm/mach-kirkwood/include/mach/debug-macro.S | 8 ---- arch/arm/mach-lpc32xx/include/mach/debug-macro.S | 18 --------- arch/arm/mach-mv78xx0/include/mach/debug-macro.S | 8 ---- arch/arm/mach-orion5x/include/mach/debug-macro.S | 10 ----- arch/arm/mach-rpc/include/mach/debug-macro.S | 13 ------ 21 files changed, 38 insertions(+), 247 deletions(-) delete mode 100644 arch/arm/include/asm/hardware/debug-8250.S create mode 100644 arch/arm/include/debug/8250.S delete mode 100644 arch/arm/include/debug/mvebu.S delete mode 100644 arch/arm/include/debug/pxa.S delete mode 100644 arch/arm/include/debug/rockchip.S delete mode 100644 arch/arm/include/debug/sunxi.S delete mode 100644 arch/arm/mach-dove/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-ebsa110/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-gemini/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-iop13xx/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-iop32x/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-iop33x/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-ixp4xx/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-kirkwood/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-lpc32xx/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-mv78xx0/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-orion5x/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-rpc/include/mach/debug-macro.S
arch/arm/Kconfig.debug +2 -8
@@ -830,6 +830,7 @@ config DEBUG_STI_UART config DEBUG_LL_INCLUDE string + default "debug/8250.S" if DEBUG_UART_8250 default "debug/bcm2835.S" if DEBUG_BCM2835 default "debug/cns3xxx.S" if DEBUG_CNS3XXX default "debug/exynos.S" if DEBUG_EXYNOS_UART
@@ -846,21 +847,14 @@ config DEBUG_LL_INCLUDE DEBUG_IMX6SL_UART default "debug/keystone.S" if DEBUG_KEYSTONE_UART0 || \ DEBUG_KEYSTONE_UART1 - default "debug/mvebu.S" if DEBUG_MVEBU_UART || \ - DEBUG_MVEBU_UART_ALTERNATE default "debug/mxs.S" if DEBUG_IMX23_UART || DEBUG_IMX28_UART default "debug/nomadik.S" if DEBUG_NOMADIK_UART - default "debug/nspire.S" if DEBUG_NSPIRE_CX_UART || \ - DEBUG_NSPIRE_CLASSIC_UART + default "debug/nspire.S" if DEBUG_NSPIRE_CX_UART default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART - default "debug/pxa.S" if DEBUG_PXA_UART1 || DEBUG_MMP_UART2 || \ - DEBUG_MMP_UART3 - default "debug/rockchip.S" if DEBUG_ROCKCHIP_UART default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 default "debug/socfpga.S" if DEBUG_SOCFPGA_UART default "debug/sti.S" if DEBUG_STI_UART - default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 default "debug/tegra.S" if DEBUG_TEGRA_UART default "debug/u300.S" if DEBUG_U300_UART default "debug/ux500.S" if DEBUG_UX500_UART
arch/arm/include/asm/hardware/debug-8250.S deleted +0 -40
@@ -1,40 +0,0 @@ -/* - * arch/arm/include/asm/hardware/debug-8250.S - * - * Copyright (C) 1994-2013 Russell King - * - * 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> - -#ifdef CONFIG_DEBUG_UART_PHYS - .macro addruart, rp, rv, tmp - ldr \rp, =CONFIG_DEBUG_UART_PHYS - ldr \rv, =CONFIG_DEBUG_UART_VIRT - .endm -#endif - -#ifndef UART_SHIFT -#define UART_SHIFT CONFIG_DEBUG_UART_8250_SHIFT -#endif - - .macro senduart,rd,rx - strb \rd, [\rx, #UART_TX << UART_SHIFT] - .endm - - .macro busyuart,rd,rx -1002: ldrb \rd, [\rx, #UART_LSR << UART_SHIFT] - and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE - teq \rd, #UART_LSR_TEMT | UART_LSR_THRE - bne 1002b - .endm - - .macro waituart,rd,rx -#ifdef CONFIG_DEBUG_UART_8250_FLOW_CONTROL -1001: ldrb \rd, [\rx, #UART_MSR << UART_SHIFT] - tst \rd, #UART_MSR_CTS - beq 1001b -#endif - .endm
arch/arm/include/debug/8250.S new file +36 -0
@@ -0,0 +1,36 @@ +/* + * arch/arm/include/debug/8250.S + * + * Copyright (C) 1994-2013 Russell King + * + * 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> + + .macro addruart, rp, rv, tmp + ldr \rp, =CONFIG_DEBUG_UART_PHYS + ldr \rv, =CONFIG_DEBUG_UART_VIRT + .endm + +#define UART_SHIFT CONFIG_DEBUG_UART_8250_SHIFT + + .macro senduart,rd,rx + strb \rd, [\rx, #UART_TX << UART_SHIFT] + .endm + + .macro busyuart,rd,rx +1002: ldrb \rd, [\rx, #UART_LSR << UART_SHIFT] + and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE + teq \rd, #UART_LSR_TEMT | UART_LSR_THRE + bne 1002b + .endm + + .macro waituart,rd,rx +#ifdef CONFIG_DEBUG_UART_8250_FLOW_CONTROL +1001: ldrb \rd, [\rx, #UART_MSR << UART_SHIFT] + tst \rd, #UART_MSR_CTS + beq 1001b +#endif + .endm
arch/arm/include/debug/mvebu.S deleted +0 -13
@@ -1,13 +0,0 @@ -/* - * Early serial output macro for Marvell SoC - * - * Copyright (C) 2012 Marvell - * - * Lior Amsalem <[email protected]> - * Gregory Clement <[email protected]> - * - * 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 <asm/hardware/debug-8250.S>
arch/arm/include/debug/nspire.S +0 -4
@@ -19,7 +19,3 @@ #include <asm/hardware/debug-pl01x.S> #endif - -#ifdef CONFIG_DEBUG_NSPIRE_CLASSIC_UART -#include <asm/hardware/debug-8250.S> -#endif
arch/arm/include/debug/pxa.S deleted +0 -13
@@ -1,13 +0,0 @@ -/* - * Early serial output macro for Marvell PXA/MMP SoC - * - * Copyright (C) 1994-1999 Russell King - * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks - * - * Copyright (C) 2013 Haojian Zhuang - * - * 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 <asm/hardware/debug-8250.S>
arch/arm/include/debug/rockchip.S deleted +0 -12
@@ -1,12 +0,0 @@ -/* - * Early serial output macro for Rockchip SoCs - * - * Copyright (C) 2012 Maxime Ripard - * - * Maxime Ripard <[email protected]> - * - * 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 <asm/hardware/debug-8250.S>
arch/arm/include/debug/sunxi.S deleted +0 -12
@@ -1,12 +0,0 @@ -/* - * Early serial output macro for Allwinner A1X SoCs - * - * Copyright (C) 2012 Maxime Ripard - * - * Maxime Ripard <[email protected]> - * - * 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 <asm/hardware/debug-8250.S>
arch/arm/mach-dove/include/mach/debug-macro.S deleted +0 -8
@@ -1,8 +0,0 @@ -/* - * arch/arm/mach-dove/include/mach/debug-macro.S - * - * 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 <asm/hardware/debug-8250.S>
arch/arm/mach-ebsa110/include/mach/debug-macro.S deleted +0 -13
@@ -1,13 +0,0 @@ -/* arch/arm/mach-ebsa110/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 <asm/hardware/debug-8250.S>
arch/arm/mach-footbridge/include/mach/debug-macro.S +0 -4
@@ -13,9 +13,6 @@ #include <asm/hardware/dec21285.h> -#ifndef CONFIG_DEBUG_DC21285_PORT -#include <asm/hardware/debug-8250.S> -#else #include <mach/hardware.h> /* For EBSA285 debugging */ .equ dc21285_high, ARMCSR_BASE & 0xff000000
@@ -43,4 +40,3 @@ .macro waituart,rd,rx .endm -#endif
arch/arm/mach-gemini/include/mach/debug-macro.S deleted +0 -12
@@ -1,12 +0,0 @@ -/* - * Debugging macro include header - * - * Copyright (C) 1994-1999 Russell King - * Copyright (C) 2001-2006 Storlink, Corp. - * Copyright (C) 2008-2009 Paulius Zaleckas <[email protected]> - * - * 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 <asm/hardware/debug-8250.S>
arch/arm/mach-iop13xx/include/mach/debug-macro.S deleted +0 -13
@@ -1,13 +0,0 @@ -/* - * arch/arm/mach-iop13xx/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 <asm/hardware/debug-8250.S>
arch/arm/mach-iop32x/include/mach/debug-macro.S deleted +0 -13
@@ -1,13 +0,0 @@ -/* - * arch/arm/mach-iop32x/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 <asm/hardware/debug-8250.S>
arch/arm/mach-iop33x/include/mach/debug-macro.S deleted +0 -13
@@ -1,13 +0,0 @@ -/* - * arch/arm/mach-iop33x/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 <asm/hardware/debug-8250.S>
arch/arm/mach-ixp4xx/include/mach/debug-macro.S deleted +0 -12
@@ -1,12 +0,0 @@ -/* arch/arm/mach-ixp4xx/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 <asm/hardware/debug-8250.S>
arch/arm/mach-kirkwood/include/mach/debug-macro.S deleted +0 -8
@@ -1,8 +0,0 @@ -/* - * arch/arm/mach-kirkwood/include/mach/debug-macro.S - * - * 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 <asm/hardware/debug-8250.S>
arch/arm/mach-lpc32xx/include/mach/debug-macro.S deleted +0 -18
@@ -1,18 +0,0 @@ -/* - * arch/arm/mach-lpc32xx/include/mach/debug-macro.S - * - * Author: Kevin Wells <[email protected]> - * - * Copyright (C) 2010 NXP Semiconductors - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ -#include <asm/hardware/debug-8250.S>
arch/arm/mach-mv78xx0/include/mach/debug-macro.S deleted +0 -8
@@ -1,8 +0,0 @@ -/* - * arch/arm/mach-mv78xx0/include/mach/debug-macro.S - * - * 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 <asm/hardware/debug-8250.S>
arch/arm/mach-orion5x/include/mach/debug-macro.S deleted +0 -10
@@ -1,10 +0,0 @@ -/* - * arch/arm/mach-orion5x/include/mach/debug-macro.S - * - * Debugging macro include header - * - * 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 <asm/hardware/debug-8250.S>
arch/arm/mach-rpc/include/mach/debug-macro.S deleted +0 -13
@@ -1,13 +0,0 @@ -/* arch/arm/mach-rpc/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 <asm/hardware/debug-8250.S>
Signature · 1 line
1.7.4.4
RFC PATCH v2 7/14 ARM: debug: add support for word accesses to debug/8250.S
In reply to Russell King - ARM LinuxAdd 32-bit word access support to debug/8250.S and convert Picoxcell and SoCFPGA to this.
--- arch/arm/Kconfig.debug | 14 ++++++++++++-- arch/arm/include/debug/8250.S | 24 +++++++++++++++++++++--- arch/arm/include/debug/8250_32.S | 27 --------------------------- arch/arm/include/debug/picoxcell.S | 19 ------------------- arch/arm/include/debug/socfpga.S | 21 --------------------- 5 files changed, 33 insertions(+), 72 deletions(-) delete mode 100644 arch/arm/include/debug/8250_32.S delete mode 100644 arch/arm/include/debug/picoxcell.S delete mode 100644 arch/arm/include/debug/socfpga.S
arch/arm/Kconfig.debug +12 -2
@@ -451,6 +451,7 @@ choice config DEBUG_PICOXCELL_UART depends on ARCH_PICOXCELL bool "Use PicoXcell UART for low-level debug" + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on PicoXcell based platforms.
@@ -593,6 +594,7 @@ choice config DEBUG_SOCFPGA_UART depends on ARCH_SOCFPGA bool "Use SOCFPGA UART for low-level debug" + select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support on SOCFPGA based platforms.
@@ -851,9 +853,7 @@ config DEBUG_LL_INCLUDE default "debug/nomadik.S" if DEBUG_NOMADIK_UART default "debug/nspire.S" if DEBUG_NSPIRE_CX_UART default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART - default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 - default "debug/socfpga.S" if DEBUG_SOCFPGA_UART default "debug/sti.S" if DEBUG_STI_UART default "debug/tegra.S" if DEBUG_TEGRA_UART default "debug/u300.S" if DEBUG_U300_UART
@@ -886,6 +886,7 @@ config DEBUG_UART_PHYS default 0x40100000 if DEBUG_PXA_UART1 default 0x42000000 if ARCH_GEMINI default 0x7c0003f8 if FOOTBRIDGE + default 0x80230000 if DEBUG_PICOXCELL_UART default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART default 0xc8000000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN default 0xc8000003 if ARCH_IXP4XX && CPU_BIG_ENDIAN
@@ -897,6 +898,7 @@ config DEBUG_UART_PHYS default 0xf1012000 if ARCH_DOVE || ARCH_KIRKWOOD || ARCH_MV78XX0 || \ ARCH_ORION5X default 0xfe800000 if ARCH_IOP32X + default 0xffc02000 if DEBUG_SOCFPGA_UART default 0xffd82340 if ARCH_IOP13XX default 0xfffff700 if ARCH_IOP33X depends on DEBUG_UART_8250
@@ -915,6 +917,7 @@ config DEBUG_UART_VIRT default 0xfe012000 if ARCH_ORION5X default 0xfe017000 if DEBUG_MMP_UART2 default 0xfe018000 if DEBUG_MMP_UART3 + default 0xfe230000 if DEBUG_PICOXCELL_UART default 0xfe800000 if ARCH_IOP32X default 0xfeb24000 if DEBUG_RK3X_UART0 default 0xfeb26000 if DEBUG_RK3X_UART1
@@ -922,6 +925,7 @@ config DEBUG_UART_VIRT 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 0xfec02000 if DEBUG_SOCFPGA_UART default 0xfed12000 if ARCH_KIRKWOOD default 0xfee003f8 if FOOTBRIDGE default 0xfee20000 if DEBUG_NSPIRE_CLASSIC_UART
@@ -937,6 +941,12 @@ config DEBUG_UART_8250_SHIFT default 0 if FOOTBRIDGE || ARCH_IOP32X default 2 +config DEBUG_UART_8250_WORD + bool "Use 32-bit accesses for 8250 UART" + depends on DEBUG_UART_8250 + depends on DEBUG_UART_8250_SHIFT >= 2 + default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART + config DEBUG_UART_8250_FLOW_CONTROL bool "Enable flow control for 8250 UART" depends on DEBUG_UART_8250
arch/arm/include/debug/8250.S +21 -3
@@ -14,14 +14,32 @@ ldr \rv, =CONFIG_DEBUG_UART_VIRT .endm +#ifdef CONFIG_DEBUG_UART_8250_WORD + .macro store, rd, rx:vararg + str \rd, \rx + .endm + + .macro load, rd, rx:vararg + ldr \rd, \rx + .endm +#else + .macro store, rd, rx:vararg + strb \rd, \rx + .endm + + .macro load, rd, rx:vararg + ldrb \rd, \rx + .endm +#endif + #define UART_SHIFT CONFIG_DEBUG_UART_8250_SHIFT .macro senduart,rd,rx - strb \rd, [\rx, #UART_TX << UART_SHIFT] + store \rd, [\rx, #UART_TX << UART_SHIFT] .endm .macro busyuart,rd,rx -1002: ldrb \rd, [\rx, #UART_LSR << UART_SHIFT] +1002: load \rd, [\rx, #UART_LSR << UART_SHIFT] and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE teq \rd, #UART_LSR_TEMT | UART_LSR_THRE bne 1002b
@@ -29,7 +47,7 @@ .macro waituart,rd,rx #ifdef CONFIG_DEBUG_UART_8250_FLOW_CONTROL -1001: ldrb \rd, [\rx, #UART_MSR << UART_SHIFT] +1001: load \rd, [\rx, #UART_MSR << UART_SHIFT] tst \rd, #UART_MSR_CTS beq 1001b #endif
arch/arm/include/debug/8250_32.S deleted +0 -27
@@ -1,27 +0,0 @@ -/* - * Copyright (c) 2011 Picochip Ltd., Jamie Iles - * - * 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. - * - * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit - * accesses to the 8250. - */ - -#include <linux/serial_reg.h> - - .macro senduart,rd,rx - str \rd, [\rx, #UART_TX << UART_SHIFT] - .endm - - .macro busyuart,rd,rx -1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] - and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE - teq \rd, #UART_LSR_TEMT | UART_LSR_THRE - bne 1002b - .endm - - /* The UART's don't have any flow control IO's wired up. */ - .macro waituart,rd,rx - .endm
arch/arm/include/debug/picoxcell.S deleted +0 -19
@@ -1,19 +0,0 @@ -/* - * Copyright (c) 2011 Picochip Ltd., Jamie Iles - * - * 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_SHIFT 2 -#define PICOXCELL_UART1_BASE 0x80230000 -#define PHYS_TO_IO(x) (((x) & 0x00ffffff) | 0xfe000000) - - .macro addruart, rp, rv, tmp - ldr \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE) - ldr \rp, =PICOXCELL_UART1_BASE - .endm - -#include "8250_32.S"
arch/arm/include/debug/socfpga.S deleted +0 -21
@@ -1,21 +0,0 @@ -/* - * 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_SHIFT 2 -#define DEBUG_LL_UART_OFFSET 0x00002000 - - .macro addruart, rp, rv, tmp - mov \rp, #DEBUG_LL_UART_OFFSET - orr \rp, \rp, #0x00c00000 - orr \rv, \rp, #0xfe000000 @ virtual base - orr \rp, \rp, #0xff000000 @ physical base - .endm - -#include "8250_32.S" -
Signature · 1 line
1.7.4.4
RFC PATCH v2 8/14 ARM: debug: provide PL01x debug uart phys/virt address configuration options
In reply to Russell King - ARM LinuxMove the definition of the UART register addresses out of the platform specific header files into the Kconfig files.
--- arch/arm/Kconfig.debug | 54 ++++++++++++++++++-- arch/arm/include/asm/hardware/debug-pl01x.S | 7 +++ arch/arm/include/debug/bcm2835.S | 9 --- arch/arm/include/debug/cns3xxx.S | 7 --- arch/arm/include/debug/highbank.S | 6 -- arch/arm/include/debug/mxs.S | 14 ----- arch/arm/include/debug/nomadik.S | 8 --- arch/arm/include/debug/nspire.S | 10 ---- arch/arm/include/debug/u300.S | 11 ---- arch/arm/include/debug/vexpress.S | 46 ----------------- arch/arm/mach-ep93xx/include/mach/debug-macro.S | 9 --- .../arm/mach-integrator/include/mach/debug-macro.S | 7 --- arch/arm/mach-realview/include/mach/debug-macro.S | 17 ------ arch/arm/mach-versatile/include/mach/debug-macro.S | 8 --- 14 files changed, 57 insertions(+), 156 deletions(-)
arch/arm/Kconfig.debug +50 -4
@@ -92,6 +92,7 @@ choice config DEBUG_BCM2835 bool "Kernel low-level debugging on BCM2835 PL011 UART" depends on ARCH_BCM2835 + select DEBUG_UART_PL01X config DEBUG_CLPS711X_UART1 bool "Kernel low-level debugging messages via UART1"
@@ -110,6 +111,7 @@ choice config DEBUG_CNS3XXX bool "Kernel Kernel low-level debugging on Cavium Networks CNS3xxx" depends on ARCH_CNS3XXX + select DEBUG_UART_PL01X help Say Y here if you want the debug print routines to direct their output to the CNS3xxx UART0.
@@ -177,6 +179,7 @@ choice config DEBUG_HIGHBANK_UART bool "Kernel low-level debugging messages via Highbank UART" depends on ARCH_HIGHBANK + select DEBUG_UART_PL01X help Say Y here if you want the debug print routines to direct their output to the UART on Highbank based devices.
@@ -191,6 +194,7 @@ choice config DEBUG_IMX23_UART bool "i.MX23 Debug UART" depends on SOC_IMX23 + select DEBUG_UART_PL01X help Say Y here if you want kernel low-level debugging support on i.MX23.
@@ -212,6 +216,7 @@ choice config DEBUG_IMX28_UART bool "i.MX28 Debug UART" depends on SOC_IMX28 + select DEBUG_UART_PL01X help Say Y here if you want kernel low-level debugging support on i.MX28.
@@ -362,6 +367,7 @@ choice config DEBUG_NOMADIK_UART bool "Kernel low-level debugging messages via NOMADIK UART" depends on ARCH_NOMADIK + select DEBUG_UART_PL01X help Say Y here if you want kernel low-level debugging support on NOMADIK based platforms.
@@ -377,6 +383,7 @@ choice config DEBUG_NSPIRE_CX_UART bool "Kernel low-level debugging via TI-NSPIRE PL011 UART" depends on ARCH_NSPIRE + select DEBUG_UART_PL01X help Say Y here if you want kernel low-level debugging support on TI-NSPIRE CX models.
@@ -467,6 +474,7 @@ choice config DEBUG_REALVIEW_STD_PORT bool "RealView Default UART" depends on ARCH_REALVIEW + select DEBUG_UART_PL01X help Say Y here if you want the debug print routines to direct their output to the serial port on RealView EB, PB11MP, PBA8
@@ -475,6 +483,7 @@ choice config DEBUG_REALVIEW_PB1176_PORT bool "RealView PB1176 UART" depends on MACH_REALVIEW_PB1176 + select DEBUG_UART_PL01X help Say Y here if you want the debug print routines to direct their output to the standard serial port on the RealView
@@ -706,6 +715,7 @@ choice config DEBUG_U300_UART bool "Kernel low-level debugging messages via U300 UART0" depends on ARCH_U300 + select DEBUG_UART_PL01X help Say Y here if you want the debug print routines to direct their output to the uart port on U300 devices.
@@ -731,6 +741,7 @@ choice config DEBUG_VEXPRESS_UART0_CA9 bool "Use PL011 UART0 at 0x10009000 (V2P-CA9 core tile)" depends on ARCH_VEXPRESS + select DEBUG_UART_PL01X help This option selects UART0 at 0x10009000. Except for custom models, this applies only to the V2P-CA9 tile.
@@ -738,6 +749,7 @@ choice config DEBUG_VEXPRESS_UART0_RS1 bool "Use PL011 UART0 at 0x1c090000 (RS1 complaint tiles)" depends on ARCH_VEXPRESS + select DEBUG_UART_PL01X help This option selects UART0 at 0x1c090000. This applies to most of the tiles using the RS1 memory map, including all new A-class
@@ -746,6 +758,7 @@ choice config DEBUG_VEXPRESS_UART0_CRX bool "Use PL011 UART0 at 0xb0090000 (Cortex-R compliant tiles)" depends on ARCH_VEXPRESS && !MMU + select DEBUG_UART_PL01X help This option selects UART0 at 0xb0090000. This is appropriate for Cortex-R series tiles and SMMs, such as Cortex-R5 and Cortex-R7
@@ -865,6 +878,11 @@ config DEBUG_LL_INCLUDE default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 default "mach/debug-macro.S" +config DEBUG_UART_PL01X + def_bool ARCH_EP93XX || \ + ARCH_INTEGRATOR || \ + ARCH_VERSATILE + config DEBUG_UART_8250 def_bool ARCH_DOVE || ARCH_EBSA110 || \ (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
@@ -877,17 +895,30 @@ config DEBUG_UART_PHYS default 0x01c28000 if DEBUG_SUNXI_UART0 default 0x01c28400 if DEBUG_SUNXI_UART1 default 0x03010fe0 if ARCH_RPC + default 0x10009000 if DEBUG_REALVIEW_STD_PORT || DEBUG_CNS3XXX || \ + DEBUG_VEXPRESS_UART0_CA9 + 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 0x101fb000 if DEBUG_NOMADIK_UART + default 0x16000000 if ARCH_INTEGRATOR + default 0x1c090000 if DEBUG_VEXPRESS_UART0_RS1 default 0x20060000 if DEBUG_RK29_UART0 default 0x20064000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2 default 0x20068000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3 + default 0x20201000 if DEBUG_BCM2835 default 0x40090000 if ARCH_LPC32XX default 0x40100000 if DEBUG_PXA_UART1 default 0x42000000 if ARCH_GEMINI default 0x7c0003f8 if FOOTBRIDGE default 0x80230000 if DEBUG_PICOXCELL_UART - default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART + default 0x80070000 if DEBUG_IMX23_UART + default 0x80074000 if DEBUG_IMX28_UART + default 0x808c0000 if ARCH_EP93XX + default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_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 0xd0012000 if DEBUG_MVEBU_UART
@@ -900,23 +931,34 @@ config DEBUG_UART_PHYS default 0xfe800000 if ARCH_IOP32X default 0xffc02000 if DEBUG_SOCFPGA_UART default 0xffd82340 if ARCH_IOP13XX + default 0xfff36000 if DEBUG_HIGHBANK_UART default 0xfffff700 if ARCH_IOP33X - depends on DEBUG_UART_8250 + depends on DEBUG_UART_8250 || DEBUG_UART_PL01X config DEBUG_UART_VIRT hex "Virtual base address of debug UART" default 0xe0010fe0 if ARCH_RPC default 0xf0000be0 if ARCH_EBSA110 + default 0xf0009000 if DEBUG_CNS3XXX + default 0xf01fb000 if DEBUG_NOMADIK_UART + default 0xf0201000 if DEBUG_BCM2835 + default 0xf11f1000 if ARCH_VERSATILE + default 0xf1600000 if ARCH_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 0xf8009000 if DEBUG_VEXPRESS_UART0_CA9 + default 0xf8090000 if DEBUG_VEXPRESS_UART0_RS1 + default 0xfb009000 if DEBUG_REALVIEW_STD_PORT + default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT default 0xfd012000 if ARCH_MV78XX0 default 0xfde12000 if ARCH_DOVE default 0xfe012000 if ARCH_ORION5X default 0xfe017000 if DEBUG_MMP_UART2 default 0xfe018000 if DEBUG_MMP_UART3 + default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART default 0xfe230000 if DEBUG_PICOXCELL_UART default 0xfe800000 if ARCH_IOP32X default 0xfeb24000 if DEBUG_RK3X_UART0
@@ -927,13 +969,17 @@ config DEBUG_UART_VIRT default 0xfed68000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3 default 0xfec02000 if DEBUG_SOCFPGA_UART default 0xfed12000 if ARCH_KIRKWOOD + default 0xfedc0000 if ARCH_EP93XX default 0xfee003f8 if FOOTBRIDGE - default 0xfee20000 if DEBUG_NSPIRE_CLASSIC_UART + default 0xfee20000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART + default 0xfee36000 if DEBUG_HIGHBANK_UART default 0xfee82340 if ARCH_IOP13XX default 0xfef00000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN default 0xfef00003 if ARCH_IXP4XX && CPU_BIG_ENDIAN default 0xfefff700 if ARCH_IOP33X - depends on DEBUG_UART_8250 + default 0xff003000 if DEBUG_U300_UART + default DEBUG_UART_PHYS if !MMU + depends on DEBUG_UART_8250 || DEBUG_UART_PL01X config DEBUG_UART_8250_SHIFT int "Register offset shift for the 8250 debug UART"
arch/arm/include/asm/hardware/debug-pl01x.S +7 -0
@@ -12,6 +12,13 @@ */ #include <linux/amba/serial.h> +#ifdef CONFIG_DEBUG_UART_PHYS + .macro addruart, rp, rv, tmp + ldr \rp, =CONFIG_DEBUG_UART_PHYS + ldr \rv, =CONFIG_DEBUG_UART_VIRT + .endm +#endif + .macro senduart,rd,rx strb \rd, [\rx, #UART01x_DR] .endm
arch/arm/include/debug/bcm2835.S +0 -9
@@ -10,13 +10,4 @@ * published by the Free Software Foundation. * */ - -#define BCM2835_DEBUG_PHYS 0x20201000 -#define BCM2835_DEBUG_VIRT 0xf0201000 - - .macro addruart, rp, rv, tmp - ldr \rp, =BCM2835_DEBUG_PHYS - ldr \rv, =BCM2835_DEBUG_VIRT - .endm - #include <asm/hardware/debug-pl01x.S>
arch/arm/include/debug/cns3xxx.S +0 -7
@@ -9,11 +9,4 @@ * it under the terms of the GNU General Public License, Version 2, as * published by the Free Software Foundation. */ - - .macro addruart,rp,rv,tmp - mov \rp, #0x00009000 - orr \rv, \rp, #0xf0000000 @ virtual base - orr \rp, \rp, #0x10000000 - .endm - #include <asm/hardware/debug-pl01x.S>
arch/arm/include/debug/highbank.S +0 -6
@@ -8,10 +8,4 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - - .macro addruart,rp,rv,tmp - ldr \rv, =0xfee36000 - ldr \rp, =0xfff36000 - .endm - #include <asm/hardware/debug-pl01x.S>
arch/arm/include/debug/mxs.S +0 -14
@@ -10,18 +10,4 @@ * published by the Free Software Foundation. * */ - -#ifdef CONFIG_DEBUG_IMX23_UART -#define UART_PADDR 0x80070000 -#elif defined (CONFIG_DEBUG_IMX28_UART) -#define UART_PADDR 0x80074000 -#endif - -#define UART_VADDR 0xfe100000 - - .macro addruart, rp, rv, tmp - ldr \rp, =UART_PADDR @ physical - ldr \rv, =UART_VADDR @ virtual - .endm - #include <asm/hardware/debug-pl01x.S>
arch/arm/include/debug/nomadik.S +0 -8
@@ -9,12 +9,4 @@ * published by the Free Software Foundation. * */ - - .macro addruart, rp, rv, tmp - mov \rp, #0x00100000 - add \rp, \rp, #0x000fb000 - add \rv, \rp, #0xf0000000 @ virtual base - add \rp, \rp, #0x10000000 @ physical base address - .endm - #include <asm/hardware/debug-pl01x.S>
arch/arm/include/debug/nspire.S +0 -10
@@ -8,14 +8,4 @@ * published by the Free Software Foundation. * */ -#ifdef CONFIG_DEBUG_NSPIRE_CX_UART -#define NSPIRE_EARLY_UART_PHYS_BASE 0x90020000 -#define NSPIRE_EARLY_UART_VIRT_BASE 0xfee20000 - -.macro addruart, rp, rv, tmp - ldr \rp, =(NSPIRE_EARLY_UART_PHYS_BASE) @ physical base address - ldr \rv, =(NSPIRE_EARLY_UART_VIRT_BASE) @ virtual base address -.endm - #include <asm/hardware/debug-pl01x.S> -#endif
arch/arm/include/debug/u300.S +0 -11
@@ -4,15 +4,4 @@ * Debugging macro include header. * Author: Linus Walleij <[email protected]> */ -#define U300_SLOW_PER_PHYS_BASE 0xc0010000 -#define U300_SLOW_PER_VIRT_BASE 0xff000000 - - .macro addruart, rp, rv, tmp - /* If we move the address using MMU, use this. */ - ldr \rp, = U300_SLOW_PER_PHYS_BASE @ MMU off, physical address - ldr \rv, = U300_SLOW_PER_VIRT_BASE @ MMU on, virtual address - orr \rp, \rp, #0x00003000 - orr \rv, \rv, #0x00003000 - .endm - #include <asm/hardware/debug-pl01x.S>
arch/arm/include/debug/vexpress.S +0 -46
50 lines not on this page · raw message
arch/arm/mach-ep93xx/include/mach/debug-macro.S +0 -9
@@ -9,13 +9,4 @@ * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. */ -#include <mach/ep93xx-regs.h> - - .macro addruart, rp, rv, tmp - ldr \rp, =EP93XX_APB_PHYS_BASE @ Physical base - ldr \rv, =EP93XX_APB_VIRT_BASE @ virtual base - orr \rp, \rp, #0x000c0000 - orr \rv, \rv, #0x000c0000 - .endm - #include <asm/hardware/debug-pl01x.S>
arch/arm/mach-integrator/include/mach/debug-macro.S +0 -7
@@ -10,11 +10,4 @@ * published by the Free Software Foundation. * */ - - .macro addruart, rp, rv, tmp - mov \rp, #0x16000000 @ physical base address - mov \rv, #0xf0000000 @ virtual base - add \rv, \rv, #0x16000000 >> 4 - .endm - #include <asm/hardware/debug-pl01x.S>
arch/arm/mach-realview/include/mach/debug-macro.S +0 -17
@@ -9,21 +9,4 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - -#ifdef CONFIG_DEBUG_REALVIEW_STD_PORT -#define DEBUG_LL_UART_OFFSET 0x00009000 -#elif defined(CONFIG_DEBUG_REALVIEW_PB1176_PORT) -#define DEBUG_LL_UART_OFFSET 0x0010c000 -#endif - -#ifndef DEBUG_LL_UART_OFFSET -#error "Unknown RealView platform" -#endif - - .macro addruart, rp, rv, tmp - mov \rp, #DEBUG_LL_UART_OFFSET - orr \rv, \rp, #0xfb000000 @ virtual base - orr \rp, \rp, #0x10000000 @ physical base - .endm - #include <asm/hardware/debug-pl01x.S>
arch/arm/mach-versatile/include/mach/debug-macro.S +0 -8
@@ -10,12 +10,4 @@ * published by the Free Software Foundation. * */ - - .macro addruart, rp, rv, tmp - mov \rp, #0x001F0000 - orr \rp, \rp, #0x00001000 - orr \rv, \rp, #0xf1000000 @ virtual base - orr \rp, \rp, #0x10000000 @ physical base - .endm - #include <asm/hardware/debug-pl01x.S>
Signature · 1 line
1.7.4.4
RFC PATCH v2 8/14 ARM: debug: provide PL01x debug uart phys/virt address configuration options
Quoted 5 lines · Russell King
Move the definition of the UART register addresses out of the platform specific header files into the
Kconfigfiles.Acked-by Ryan Mallon <[email protected]>Signed-off-by Russell King <[email protected]>
For the vexpress parts:
RFC PATCH v2 9/14 ARM: debug: move PL01X debug include into arch/arm/include/debug/
In reply to Russell King - ARM LinuxNow that the PL01X debug include can mostly stand alone without requiring platforms to provide any macros, move it into the debug directory so it can be directly included. This allows us to get rid of a lot of debug-macros include files.
The autodetect case for Versatile Express and the ux500 are left alone; these are more complicated implementations.
--- arch/arm/Kconfig.debug | 12 +----- arch/arm/include/asm/hardware/debug-pl01x.S | 36 -------------------- arch/arm/include/debug/bcm2835.S | 13 ------- arch/arm/include/debug/cns3xxx.S | 12 ------ arch/arm/include/debug/highbank.S | 11 ------ arch/arm/include/debug/mxs.S | 13 ------- arch/arm/include/debug/nomadik.S | 12 ------ arch/arm/include/debug/nspire.S | 11 ------ arch/arm/include/debug/pl01x.S | 36 ++++++++++++++++++++ arch/arm/include/debug/u300.S | 7 ---- arch/arm/include/debug/ux500.S | 2 +- arch/arm/include/debug/vexpress.S | 2 +- arch/arm/mach-ep93xx/include/mach/debug-macro.S | 12 ------ .../arm/mach-integrator/include/mach/debug-macro.S | 13 ------- arch/arm/mach-realview/include/mach/debug-macro.S | 12 ------ arch/arm/mach-versatile/include/mach/debug-macro.S | 13 ------- 16 files changed, 40 insertions(+), 177 deletions(-) delete mode 100644 arch/arm/include/asm/hardware/debug-pl01x.S delete mode 100644 arch/arm/include/debug/bcm2835.S delete mode 100644 arch/arm/include/debug/cns3xxx.S delete mode 100644 arch/arm/include/debug/highbank.S delete mode 100644 arch/arm/include/debug/mxs.S delete mode 100644 arch/arm/include/debug/nomadik.S delete mode 100644 arch/arm/include/debug/nspire.S create mode 100644 arch/arm/include/debug/pl01x.S delete mode 100644 arch/arm/include/debug/u300.S delete mode 100644 arch/arm/mach-ep93xx/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-integrator/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-realview/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-versatile/include/mach/debug-macro.S
arch/arm/Kconfig.debug +2 -10
@@ -846,10 +846,8 @@ config DEBUG_STI_UART config DEBUG_LL_INCLUDE string default "debug/8250.S" if DEBUG_UART_8250 - default "debug/bcm2835.S" if DEBUG_BCM2835 - default "debug/cns3xxx.S" if DEBUG_CNS3XXX + default "debug/pl01x.S" if DEBUG_UART_PL01X default "debug/exynos.S" if DEBUG_EXYNOS_UART - default "debug/highbank.S" if DEBUG_HIGHBANK_UART default "debug/icedcc.S" if DEBUG_ICEDCC default "debug/imx.S" if DEBUG_IMX1_UART || \ DEBUG_IMX25_UART || \
@@ -862,18 +860,12 @@ config DEBUG_LL_INCLUDE DEBUG_IMX6SL_UART default "debug/keystone.S" if DEBUG_KEYSTONE_UART0 || \ DEBUG_KEYSTONE_UART1 - default "debug/mxs.S" if DEBUG_IMX23_UART || DEBUG_IMX28_UART - default "debug/nomadik.S" if DEBUG_NOMADIK_UART - default "debug/nspire.S" if DEBUG_NSPIRE_CX_UART default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_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 - default "debug/u300.S" if DEBUG_U300_UART default "debug/ux500.S" if DEBUG_UX500_UART - default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ - DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 || \ - DEBUG_VEXPRESS_UART0_CRX + default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT default "debug/vt8500.S" if DEBUG_VT8500_UART0 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 default "mach/debug-macro.S"
arch/arm/include/asm/hardware/debug-pl01x.S deleted +0 -36
@@ -1,36 +0,0 @@ -/* arch/arm/include/asm/hardware/debug-pl01x.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/amba/serial.h> - -#ifdef CONFIG_DEBUG_UART_PHYS - .macro addruart, rp, rv, tmp - ldr \rp, =CONFIG_DEBUG_UART_PHYS - ldr \rv, =CONFIG_DEBUG_UART_VIRT - .endm -#endif - - .macro senduart,rd,rx - strb \rd, [\rx, #UART01x_DR] - .endm - - .macro waituart,rd,rx -1001: ldr \rd, [\rx, #UART01x_FR] - tst \rd, #UART01x_FR_TXFF - bne 1001b - .endm - - .macro busyuart,rd,rx -1001: ldr \rd, [\rx, #UART01x_FR] - tst \rd, #UART01x_FR_BUSY - bne 1001b - .endm
arch/arm/include/debug/bcm2835.S deleted +0 -13
@@ -1,13 +0,0 @@ -/* - * Debugging macro include header - * - * Copyright (C) 2010 Broadcom - * 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 <asm/hardware/debug-pl01x.S>
arch/arm/include/debug/cns3xxx.S deleted +0 -12
@@ -1,12 +0,0 @@ -/* - * Debugging macro include header - * - * Copyright 1994-1999 Russell King - * Copyright 2008 Cavium Networks - * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks - * - * This file 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 <asm/hardware/debug-pl01x.S>
arch/arm/include/debug/highbank.S deleted +0 -11
@@ -1,11 +0,0 @@ -/* - * 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 <asm/hardware/debug-pl01x.S>
arch/arm/include/debug/mxs.S deleted +0 -13
@@ -1,13 +0,0 @@ -/* arch/arm/mach-mxs/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 <asm/hardware/debug-pl01x.S>
arch/arm/include/debug/nomadik.S deleted +0 -12
@@ -1,12 +0,0 @@ -/* - * 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 <asm/hardware/debug-pl01x.S>
arch/arm/include/debug/nspire.S deleted +0 -11
@@ -1,11 +0,0 @@ -/* - * linux/arch/arm/include/debug/nspire.S - * - * Copyright (C) 2013 Daniel Tang <[email protected]> - * - * 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 <asm/hardware/debug-pl01x.S>
arch/arm/include/debug/pl01x.S new file +36 -0
@@ -0,0 +1,36 @@ +/* arch/arm/include/debug/pl01x.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/amba/serial.h> + +#ifdef CONFIG_DEBUG_UART_PHYS + .macro addruart, rp, rv, tmp + ldr \rp, =CONFIG_DEBUG_UART_PHYS + ldr \rv, =CONFIG_DEBUG_UART_VIRT + .endm +#endif + + .macro senduart,rd,rx + strb \rd, [\rx, #UART01x_DR] + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #UART01x_FR] + tst \rd, #UART01x_FR_TXFF + bne 1001b + .endm + + .macro busyuart,rd,rx +1001: ldr \rd, [\rx, #UART01x_FR] + tst \rd, #UART01x_FR_BUSY + bne 1001b + .endm
arch/arm/include/debug/u300.S deleted +0 -7
@@ -1,7 +0,0 @@ -/* - * Copyright (C) 2006-2013 ST-Ericsson AB - * License terms: GNU General Public License (GPL) version 2 - * Debugging macro include header. - * Author: Linus Walleij <[email protected]> - */ -#include <asm/hardware/debug-pl01x.S>
arch/arm/include/debug/ux500.S +1 -1
@@ -45,4 +45,4 @@ ldr \rv, =UART_VIRT_BASE @ yes, virtual address .endm -#include <asm/hardware/debug-pl01x.S> +#include <debug/pl01x.S>
arch/arm/include/debug/vexpress.S +1 -1
@@ -47,5 +47,5 @@ .endm -#include <asm/hardware/debug-pl01x.S> +#include <debug/pl01x.S> #endif
arch/arm/mach-ep93xx/include/mach/debug-macro.S deleted +0 -12
@@ -1,12 +0,0 @@ -/* - * arch/arm/mach-ep93xx/include/mach/debug-macro.S - * Debugging macro include header - * - * Copyright (C) 2006 Lennert Buytenhek <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - */ -#include <asm/hardware/debug-pl01x.S>
arch/arm/mach-integrator/include/mach/debug-macro.S deleted +0 -13
@@ -1,13 +0,0 @@ -/* arch/arm/mach-integrator/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 <asm/hardware/debug-pl01x.S>
arch/arm/mach-realview/include/mach/debug-macro.S deleted +0 -12
@@ -1,12 +0,0 @@ -/* arch/arm/mach-realview/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 <asm/hardware/debug-pl01x.S>
arch/arm/mach-versatile/include/mach/debug-macro.S deleted +0 -13
@@ -1,13 +0,0 @@ -/* arch/arm/mach-versatile/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 <asm/hardware/debug-pl01x.S>
Signature · 1 line
1.7.4.4
RFC PATCH v2 10/14 ARM: debug: provide generic option choices for 8250 and PL01x ports
In reply to Russell King - ARM LinuxProvide generic option choices for 8250 and PL01x UART ports; these can now be selected by UART type rather than asking about the platform. This means that a kernel configuration user can manually choose the various parameters of the debug UART without resorting to the platform having to encode the possible settings.
These two generic options are preferred over further debug entries for these ports; the existing options which refer back to the 8250 and PL01x ports are now considered deprecated.
--- arch/arm/Kconfig.debug | 44 +++++++++++++++++++++++++++++++++++++------- 1 files changed, 37 insertions(+), 7 deletions(-)
arch/arm/Kconfig.debug +37 -7
@@ -770,6 +770,32 @@ choice This option selects UART0 on VIA/Wondermedia System-on-a-chip devices, including VT8500, WM8505, WM8650 and WM8850. + config DEBUG_LL_UART_8250 + bool "Kernel low-level debugging via 8250 UART" + help + Say Y here if you wish the debug print routes to direct + their output to an 8250 UART. You can use this option + to provide the parameters for the 8250 UART rather than + selecting one of the platform specific options above if + you know the parameters for the port. + + This option is preferred over the platform specific + options; the platform specific options are deprecated + and will be soon removed. + + config DEBUG_LL_UART_PL01X + bool "Kernel low-level debugging via ARM Ltd PL01x Primecell UART" + help + Say Y here if you wish the debug print routes to direct + their output to a PL01x Primecell UART. You can use + this option to provide the parameters for the UART + rather than selecting one of the platform specific + options above if you know the parameters for the port. + + This option is preferred over the platform specific + options; the platform specific options are deprecated + and will be soon removed. + config DEBUG_LL_UART_NONE bool "No low-level debugging UART" depends on !ARCH_MULTIPLATFORM
@@ -845,8 +871,8 @@ config DEBUG_STI_UART config DEBUG_LL_INCLUDE string - default "debug/8250.S" if DEBUG_UART_8250 - default "debug/pl01x.S" if DEBUG_UART_PL01X + 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/exynos.S" if DEBUG_EXYNOS_UART default "debug/icedcc.S" if DEBUG_ICEDCC default "debug/imx.S" if DEBUG_IMX1_UART || \
@@ -870,11 +896,13 @@ config DEBUG_LL_INCLUDE default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 default "mach/debug-macro.S" +# Compatibility options for PL01x config DEBUG_UART_PL01X def_bool ARCH_EP93XX || \ ARCH_INTEGRATOR || \ ARCH_VERSATILE +# Compatibility options for 8250 config DEBUG_UART_8250 def_bool ARCH_DOVE || ARCH_EBSA110 || \ (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
@@ -925,7 +953,8 @@ config DEBUG_UART_PHYS default 0xffd82340 if ARCH_IOP13XX default 0xfff36000 if DEBUG_HIGHBANK_UART default 0xfffff700 if ARCH_IOP33X - depends on DEBUG_UART_8250 || DEBUG_UART_PL01X + depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ + DEBUG_UART_8250 || DEBUG_UART_PL01X config DEBUG_UART_VIRT hex "Virtual base address of debug UART"
@@ -971,23 +1000,24 @@ config DEBUG_UART_VIRT default 0xfefff700 if ARCH_IOP33X default 0xff003000 if DEBUG_U300_UART default DEBUG_UART_PHYS if !MMU - depends on DEBUG_UART_8250 || DEBUG_UART_PL01X + depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ + DEBUG_UART_8250 || DEBUG_UART_PL01X config DEBUG_UART_8250_SHIFT int "Register offset shift for the 8250 debug UART" - depends on DEBUG_UART_8250 + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 default 0 if FOOTBRIDGE || ARCH_IOP32X default 2 config DEBUG_UART_8250_WORD bool "Use 32-bit accesses for 8250 UART" - depends on DEBUG_UART_8250 + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 depends on DEBUG_UART_8250_SHIFT >= 2 default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART config DEBUG_UART_8250_FLOW_CONTROL bool "Enable flow control for 8250 UART" - depends on DEBUG_UART_8250 + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_GEMINI || ARCH_RPC config DEBUG_UNCOMPRESS
Signature · 1 line
1.7.4.4
RFC PATCH v2 11/14 ARM: debug: remove DEBUG_ROCKCHIP_UART
In reply to Russell King - ARM Linux--- arch/arm/Kconfig.debug | 11 ----------- 1 files changed, 0 insertions(+), 11 deletions(-)
arch/arm/Kconfig.debug +0 -11
@@ -492,7 +492,6 @@ choice config DEBUG_RK29_UART0 bool "Kernel low-level debugging messages via Rockchip RK29 UART0" depends on ARCH_ROCKCHIP - select DEBUG_ROCKCHIP_UART select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support
@@ -501,7 +500,6 @@ choice config DEBUG_RK29_UART1 bool "Kernel low-level debugging messages via Rockchip RK29 UART1" depends on ARCH_ROCKCHIP - select DEBUG_ROCKCHIP_UART select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support
@@ -510,7 +508,6 @@ choice config DEBUG_RK29_UART2 bool "Kernel low-level debugging messages via Rockchip RK29 UART2" depends on ARCH_ROCKCHIP - select DEBUG_ROCKCHIP_UART select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support
@@ -519,7 +516,6 @@ choice config DEBUG_RK3X_UART0 bool "Kernel low-level debugging messages via Rockchip RK3X UART0" depends on ARCH_ROCKCHIP - select DEBUG_ROCKCHIP_UART select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support
@@ -528,7 +524,6 @@ choice config DEBUG_RK3X_UART1 bool "Kernel low-level debugging messages via Rockchip RK3X UART1" depends on ARCH_ROCKCHIP - select DEBUG_ROCKCHIP_UART select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support
@@ -537,7 +532,6 @@ choice config DEBUG_RK3X_UART2 bool "Kernel low-level debugging messages via Rockchip RK3X UART2" depends on ARCH_ROCKCHIP - select DEBUG_ROCKCHIP_UART select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support
@@ -546,7 +540,6 @@ choice config DEBUG_RK3X_UART3 bool "Kernel low-level debugging messages via Rockchip RK3X UART3" depends on ARCH_ROCKCHIP - select DEBUG_ROCKCHIP_UART select DEBUG_UART_8250 help Say Y here if you want kernel low-level debugging support
@@ -857,10 +850,6 @@ config DEBUG_IMX_UART_PORT Choose UART port on which kernel low-level debug messages should be output. -config DEBUG_ROCKCHIP_UART - bool - depends on ARCH_ROCKCHIP - config DEBUG_TEGRA_UART bool depends on ARCH_TEGRA
Signature · 1 line
1.7.4.4
RFC PATCH v2 12/14 ARM: debug: move keystone debug to generic 8250 code
In reply to Russell King - ARM LinuxKeystone's debugging is just a copy of the old 8250_32 code with a different base address. Incorporate this into the generic 8250 debug code.
--- arch/arm/Kconfig.debug | 11 +++++++-- arch/arm/include/debug/keystone.S | 43 ------------------------------------- 2 files changed, 8 insertions(+), 46 deletions(-) delete mode 100644 arch/arm/include/debug/keystone.S
arch/arm/Kconfig.debug +8 -3
@@ -266,6 +266,7 @@ choice config DEBUG_KEYSTONE_UART0 bool "Kernel low-level debugging on KEYSTONE2 using UART0" depends on ARCH_KEYSTONE + select DEBUG_UART_8250 help Say Y here if you want the debug print routines to direct their output to UART0 serial port on KEYSTONE2 devices.
@@ -273,6 +274,7 @@ choice config DEBUG_KEYSTONE_UART1 bool "Kernel low-level debugging on KEYSTONE2 using UART1" depends on ARCH_KEYSTONE + select DEBUG_UART_8250 help Say Y here if you want the debug print routines to direct their output to UART1 serial port on KEYSTONE2 devices.
@@ -873,8 +875,6 @@ config DEBUG_LL_INCLUDE DEBUG_IMX53_UART ||\ DEBUG_IMX6Q_UART || \ DEBUG_IMX6SL_UART - default "debug/keystone.S" if DEBUG_KEYSTONE_UART0 || \ - DEBUG_KEYSTONE_UART1 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 default "debug/sti.S" if DEBUG_STI_UART
@@ -903,6 +903,8 @@ config DEBUG_UART_PHYS hex "Physical base address of debug UART" default 0x01c28000 if DEBUG_SUNXI_UART0 default 0x01c28400 if DEBUG_SUNXI_UART1 + default 0x02530c00 if DEBUG_KEYSTONE_UART0 + default 0x02531000 if DEBUG_KEYSTONE_UART1 default 0x03010fe0 if ARCH_RPC default 0x10009000 if DEBUG_REALVIEW_STD_PORT || DEBUG_CNS3XXX || \ DEBUG_VEXPRESS_UART0_CA9
@@ -973,6 +975,8 @@ config DEBUG_UART_VIRT default 0xfe800000 if ARCH_IOP32X default 0xfeb24000 if DEBUG_RK3X_UART0 default 0xfeb26000 if DEBUG_RK3X_UART1 + default 0xfeb30c00 if DEBUG_KEYSTONE_UART0 + default 0xfeb31000 if DEBUG_KEYSTONE_UART1 default 0xfec12000 if DEBUG_MVEBU_UART || DEBUG_MVEBU_UART_ALTERNATE default 0xfed60000 if DEBUG_RK29_UART0 default 0xfed64000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2
@@ -1002,7 +1006,8 @@ config DEBUG_UART_8250_WORD bool "Use 32-bit accesses for 8250 UART" depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 depends on DEBUG_UART_8250_SHIFT >= 2 - default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART + default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ + ARCH_KEYSTONE config DEBUG_UART_8250_FLOW_CONTROL bool "Enable flow control for 8250 UART"
arch/arm/include/debug/keystone.S deleted +0 -43
43 lines not on this page · raw message
Signature · 1 line
1.7.4.4
RFC PATCH v2 12/14 ARM: debug: move keystone debug to generic 8250 code
Quoted 6 lines · Russell King
Keystone's debugging is just a copy of the old 8250_32 code with a different base address. Incorporate this into the generic 8250 debug code.
Signed-off-by Russell King <[email protected]>---
Just tried the series on Keystone EVM and as expected it works. Thanks for the conversion.
RFC PATCH v2 13/14 ARM: debug: move davinci debug to generic 8250 code
In reply to Russell King - ARM LinuxDavinci's debugging is just a copy of the old 8250_32 code with a different base address. Incorporate this into the generic 8250 debug code.
--- arch/arm/Kconfig.debug | 16 +++++- arch/arm/mach-davinci/include/mach/debug-macro.S | 65 ---------------------- 2 files changed, 15 insertions(+), 66 deletions(-) delete mode 100644 arch/arm/mach-davinci/include/mach/debug-macro.S
arch/arm/Kconfig.debug +15 -1
@@ -119,6 +119,7 @@ choice config DEBUG_DAVINCI_DA8XX_UART1 bool "Kernel low-level debugging on DaVinci DA8XX using UART1" depends on ARCH_DAVINCI_DA8XX + select DEBUG_UART_8250 help Say Y here if you want the debug print routines to direct their output to UART1 serial port on DaVinci DA8XX devices.
@@ -126,6 +127,7 @@ choice config DEBUG_DAVINCI_DA8XX_UART2 bool "Kernel low-level debugging on DaVinci DA8XX using UART2" depends on ARCH_DAVINCI_DA8XX + select DEBUG_UART_8250 help Say Y here if you want the debug print routines to direct their output to UART2 serial port on DaVinci DA8XX devices.
@@ -133,6 +135,7 @@ choice config DEBUG_DAVINCI_DMx_UART0 bool "Kernel low-level debugging on DaVinci DMx using UART0" depends on ARCH_DAVINCI_DMx + select DEBUG_UART_8250 help Say Y here if you want the debug print routines to direct their output to UART0 serial port on DaVinci DMx devices.
@@ -140,6 +143,7 @@ choice config DEBUG_DAVINCI_TNETV107X_UART1 bool "Kernel low-level debugging on DaVinci TNETV107x using UART1" depends on ARCH_DAVINCI_TNETV107X + select DEBUG_UART_8250 help Say Y here if you want the debug print routines to direct their output to UART1 serial port on DaVinci TNETV107X
@@ -901,11 +905,15 @@ config DEBUG_UART_8250 config DEBUG_UART_PHYS hex "Physical base address of debug UART" + default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0 default 0x01c28000 if DEBUG_SUNXI_UART0 default 0x01c28400 if DEBUG_SUNXI_UART1 + default 0x01d0c000 if DEBUG_DAVINCI_DA8XX_UART1 + default 0x01d0d000 if DEBUG_DAVINCI_DA8XX_UART2 default 0x02530c00 if DEBUG_KEYSTONE_UART0 default 0x02531000 if DEBUG_KEYSTONE_UART1 default 0x03010fe0 if ARCH_RPC + default 0x08108300 if DEBUG_DAVINCI_TNETV107X_UART1 default 0x10009000 if DEBUG_REALVIEW_STD_PORT || DEBUG_CNS3XXX || \ DEBUG_VEXPRESS_UART0_CA9 default 0x1010c000 if DEBUG_REALVIEW_PB1176_PORT
@@ -982,9 +990,13 @@ config DEBUG_UART_VIRT default 0xfed64000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2 default 0xfed68000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3 default 0xfec02000 if DEBUG_SOCFPGA_UART + 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 0xfedc0000 if ARCH_EP93XX default 0xfee003f8 if FOOTBRIDGE + default 0xfee08300 if DEBUG_DAVINCI_TNETV107X_UART1 default 0xfee20000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART default 0xfee36000 if DEBUG_HIGHBANK_UART default 0xfee82340 if ARCH_IOP13XX
@@ -1007,7 +1019,9 @@ config DEBUG_UART_8250_WORD depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 depends on DEBUG_UART_8250_SHIFT >= 2 default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ - ARCH_KEYSTONE + ARCH_KEYSTONE || \ + DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \ + DEBUG_DAVINCI_DA8XX_UART2 || DEBUG_DAVINCI_TNETV107X_UART1 config DEBUG_UART_8250_FLOW_CONTROL bool "Enable flow control for 8250 UART"
arch/arm/mach-davinci/include/mach/debug-macro.S deleted +0 -65
65 lines not on this page · raw message
Signature · 1 line
1.7.4.4
RFC PATCH v2 13/14 ARM: debug: move davinci debug to generic 8250 code
Quoted 5 lines · Russell King
Davinci's debugging is just a copy of the old 8250_32 code with a different base address. Incorporate this into the generic 8250 debug code.
Signed-off-by Russell King <[email protected]>
Tested on DA850 EVM
Thanks,
Sekhar
RFC PATCH v2 13/14 ARM: debug: move davinci debug to generic 8250 code
Quoted 10 lines · Sekhar Nori
Quoted 5 lines · Russell King
Davinci's debugging is just a copy of the old 8250_32 code with a different base address. Incorporate this into the generic 8250 debug code.
Signed-off-by Russell King <[email protected]>Tested on DA850 EVM
Acked-by Sekhar Nori <[email protected]>
You may wish to consider whether a Tested-by tag would be a more accurate attributation if you actually tested the patch.
RFC PATCH v2 13/14 ARM: debug: move davinci debug to generic 8250 code
Quoted 6 lines · Russell King - ARM Linux
Quoted 5 lines · Sekhar Nori
Quoted 4 lines · Russell King
Davinci's debugging is just a copy of the old 8250_32 code with a different base address. Incorporate this into the generic 8250 debug code.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Russell King <[email protected]>Tested on DA850 EVM
Acked-by Sekhar Nori <[email protected]>You may wish to consider whether a Tested-by tag would be a more accurate attributation if you actually tested the patch.
Okay, I chose Acked-by: because I also reviewed the patch to make sure there are not typos in the addresses etc for the devices I did not test.
Thanks,
Sekhar
RFC PATCH v2 14/14 ARM: debug: move Spear debug to generic PL01x code
In reply to Russell King - ARM LinuxThe Spear debug code is a copy of the PL01x debugging code, so rather than have this pointless code duplication, lets just use the standard implementation instead.
--- arch/arm/Kconfig.debug | 7 ++++ arch/arm/mach-spear/include/mach/debug-macro.S | 36 ------------------------ arch/arm/mach-spear/include/mach/spear.h | 2 - 3 files changed, 7 insertions(+), 38 deletions(-) delete mode 100644 arch/arm/mach-spear/include/mach/debug-macro.S
arch/arm/Kconfig.debug +7 -0
@@ -893,6 +893,9 @@ 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
@@ -940,9 +943,11 @@ config DEBUG_UART_PHYS 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 0xd0012000 if DEBUG_MVEBU_UART default 0xd4017000 if DEBUG_MMP_UART2 default 0xd4018000 if DEBUG_MMP_UART3 + default 0xe0000000 if ARCH_SPEAR13XX default 0xf0000be0 if ARCH_EBSA110 default 0xf1012000 if DEBUG_MVEBU_UART_ALTERNATE default 0xf1012000 if ARCH_DOVE || ARCH_KIRKWOOD || ARCH_MV78XX0 || \
@@ -973,6 +978,8 @@ config DEBUG_UART_VIRT default 0xf8090000 if DEBUG_VEXPRESS_UART0_RS1 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
arch/arm/mach-spear/include/mach/debug-macro.S deleted +0 -36
@@ -1,36 +0,0 @@ -/* - * arch/arm/plat-spear/include/plat/debug-macro.S - * - * Debugging macro include header for spear platform - * - * Copyright (C) 2009 ST Microelectronics - * Viresh Kumar <[email protected]> - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include <linux/amba/serial.h> -#include <mach/spear.h> - - .macro addruart, rp, rv, tmp - mov \rp, #SPEAR_DBG_UART_BASE @ Physical base - mov \rv, #VA_SPEAR_DBG_UART_BASE @ Virtual base - .endm - - .macro senduart, rd, rx - strb \rd, [\rx, #UART01x_DR] @ ASC_TX_BUFFER - .endm - - .macro waituart, rd, rx -1001: ldr \rd, [\rx, #UART01x_FR] @ FLAG REGISTER - tst \rd, #UART01x_FR_TXFF @ TX_FULL - bne 1001b - .endm - - .macro busyuart, rd, rx -1002: ldr \rd, [\rx, #UART01x_FR] @ FLAG REGISTER - tst \rd, #UART011_FR_TXFE @ TX_EMPTY - beq 1002b - .endm
arch/arm/mach-spear/include/mach/spear.h +0 -2
@@ -39,7 +39,6 @@/* Debug uart for linux, will be used for debug and uncompress messages */ #define SPEAR_DBG_UART_BASE SPEAR_ICM1_UART_BASE -#define VA_SPEAR_DBG_UART_BASE VA_SPEAR_ICM1_UART_BASE/* Sysctl base for spear platform */ #define SPEAR_SYS_CTRL_BASE SPEAR_ICM3_SYS_CTRL_BASE
@@ -86,7 +85,6 @@/* Debug uart for linux, will be used for debug and uncompress messages */ #define SPEAR_DBG_UART_BASE UART_BASE -#define VA_SPEAR_DBG_UART_BASE VA_UART_BASE#endif /* SPEAR13XX */
Signature · 1 line
1.7.4.4
RFC PATCH v2 14/14 ARM: debug: move Spear debug to generic PL01x code
Quoted 11 lines · Russell King
The Spear debug code is a copy of the PL01x debugging code, so rather than have this pointless code duplication, lets just use the standard implementation instead.
Signed-off-by Russell King <[email protected]>--- arch/arm/Kconfig.debug | 7 ++++ arch/arm/mach-spear/include/mach/debug-macro.S | 36 ------------------------ arch/arm/mach-spear/include/mach/spear.h | 2 - 3 files changed, 7 insertions(+), 38 deletions(-) delete mode 100644 arch/arm/mach-spear/include/mach/debug-macro.S
s/Spear/SPEAr
v2 cover Clean up debugging support
In reply to Russell King - ARM LinuxQuoted 2 lines · Russell King
This is the second posting of this series, with a few additional patches on top to go a little further. Changes since the last posting:
<snip>
Boot tested on ep93xx. For the ep93xx parts:
v2 cover Clean up debugging support
In reply to Russell King - ARM LinuxQuoted 2 lines · Russell King - ARM Linux
This is the second posting of this series, with a few additional patches on top to go a little further. Changes since the last posting:
Okay, I think everyone is happy with this, and it's time to go into linux-next, so it'll be visible in my tree from tomorrow.
Please keep the tested-by/acked-by etc coming.
v2 cover Clean up debugging support
Quoted 8 lines · Russell King
Quoted 2 lines · Russell King - ARM Linux
This is the second posting of this series, with a few additional patches on top to go a little further. Changes since the last posting:
Okay, I think everyone is happy with this, and it's time to go into linux-next, so it'll be visible in my tree from tomorrow.
Please keep the tested-by/acked-by etc coming.
Russell,
I just posted a patch for ep93xx that removes its platform specific options to select the low-level debug UART. If it looks ok you can add it to your patch series.
Regards,
Hartley
Andrew Lunn
maintainerv2 cover Clean up debugging support
In reply to Russell King - ARM LinuxQuoted 8 lines · Russell King - ARM Linux
Quoted 2 lines · Russell King - ARM Linux
This is the second posting of this series, with a few additional patches on top to go a little further. Changes since the last posting:
Okay, I think everyone is happy with this, and it's time to go into linux-next, so it'll be visible in my tree from tomorrow.
Please keep the tested-by/acked-by etc coming.
Hi Russell
Maybe i'm blind, but i don't seem to be able to see this in linux next, or your git tree.
Has it been pushed out yet?
Thanks
Andrew
v2 cover Clean up debugging support
Quoted 8 lines · Andrew Lunn
Quoted 7 lines · Russell King - ARM Linux
Quoted 2 lines · Russell King - ARM Linux
This is the second posting of this series, with a few additional patches on top to go a little further. Changes since the last posting:
Okay, I think everyone is happy with this, and it's time to go into linux-next, so it'll be visible in my tree from tomorrow.
Quoted 8 lines
Quoted 1 line
Please keep the tested-by/acked-by etc coming.
Hi Russell
Maybe i'm blind, but i don't seem to be able to see this in linux next, or your git tree.
Has it been pushed out yet?
You are correct that I hadn't pushed it out. I decided to wait for -rc2 because I have a copy of a fix in my tree which was already applied after -rc1, so wanted to rebase first. Anyway, it's been pushed out now.
Andrew Lunn
maintainerv2 cover Clean up debugging support
In reply to Russell King - ARM LinuxQuoted 2 lines · Russell King - ARM Linux
This is the second posting of this series, with a few additional patches on top to go a little further. Changes since the last posting:
Hi Russell
I boot tested on Kirkwood.
Andrew
Quoted 131 lines
- we now provide a couple of generic options to allow the 8250 and PL01x ports to be configured via
Kconfigmanually. What this means is that I do not expect to see further entries to the debug menu for platforms which have PL01x or 8250 debug ports - use the generic options instead.- I've converted a bunch of the dependencies to select statements here to clean things up a little more.
- Made the '8250 32-bit access size" option depend on a shift >= 2 (it would be silly to do 32-bit accesses to byte offsets.)
- Made all 8250 options available to the user when 8250 support is selected, allowing full configuration of 8250 options.
- Removed
DEBUG_ROCKCHIP_UARTwhich wasn't doing anything after this cleanup.- Converted Keystone, Davinci, and Spear to also use the generic 8250/PL01x code; these had their own private implementations of the same without using the generic versions for no reason that I could see.
The rest is the same boilerplate from last time with the exception of the diffstat.
This patch series cleans up some aspects of the LL debug support by:
- Removing the multi-level choice madness
- Consolidating the 8250 debug UART support
- Consolidating the PL01x debug UART supportThe differences between the various 8250 debug UART implementations are:
- Physical/Virtual addresses
- Register offset shift
- Access size
- Flow controlThese are now parameterised in the
Kconfig. I've left OMAP because that's a complex case, but it looks like it can be adapted to it if some of the unnecessary complexity is eliminated.Similar is done with the PL01x implementation, except a few complex cases are left - automatic detection on Versatile Express, and the Ux500 support which looks like it'll take some picking through header files to work out what the base addresses are.
The approach I've taken is to consolidate without losing any information
- what that means it that theKconfigparameters have rather a lot of dependencies/defaults associated with them, and the main choice statement keeps all its options.Nevertheless, even avoiding the loss of information, I think the diffstat is quite impressive:
arch/arm/Kconfig.debug | 553 ++++++++++++++------ arch/arm/include/asm/hardware/debug-8250.S | 29 - arch/arm/include/debug/8250.S | 54 ++ arch/arm/include/debug/8250_32.S | 27 - arch/arm/include/debug/bcm2835.S | 22 - arch/arm/include/debug/cns3xxx.S | 19 - arch/arm/include/debug/highbank.S | 17 - arch/arm/include/debug/keystone.S | 43 -- arch/arm/include/debug/mvebu.S | 30 - arch/arm/include/debug/mxs.S | 27 - arch/arm/include/debug/nomadik.S | 20 - arch/arm/include/debug/nspire.S | 28 - arch/arm/include/debug/picoxcell.S | 19 - .../{asm/hardware/debug-pl01x.S => debug/pl01x.S} | 9 +- arch/arm/include/debug/pxa.S | 33 -- arch/arm/include/debug/rockchip.S | 42 -- arch/arm/include/debug/socfpga.S | 21 - arch/arm/include/debug/sunxi.S | 27 - arch/arm/include/debug/u300.S | 18 - arch/arm/include/debug/ux500.S | 2 +- arch/arm/include/debug/vexpress.S | 48 +-- arch/arm/mach-davinci/include/mach/debug-macro.S | 65 --- arch/arm/mach-dove/include/mach/debug-macro.S | 19 - arch/arm/mach-ebsa110/include/mach/debug-macro.S | 22 - arch/arm/mach-ep93xx/include/mach/debug-macro.S | 21 - .../arm/mach-footbridge/include/mach/debug-macro.S | 15 - arch/arm/mach-gemini/include/mach/debug-macro.S | 21 - .../arm/mach-integrator/include/mach/debug-macro.S | 20 - arch/arm/mach-iop13xx/include/mach/debug-macro.S | 24 - arch/arm/mach-iop32x/include/mach/debug-macro.S | 21 - arch/arm/mach-iop33x/include/mach/debug-macro.S | 22 - arch/arm/mach-ixp4xx/include/mach/debug-macro.S | 26 - arch/arm/mach-kirkwood/include/mach/debug-macro.S | 19 - arch/arm/mach-lpc32xx/include/mach/debug-macro.S | 29 - arch/arm/mach-mv78xx0/include/mach/debug-macro.S | 19 - arch/arm/mach-orion5x/include/mach/debug-macro.S | 21 - arch/arm/mach-realview/include/mach/debug-macro.S | 29 - arch/arm/mach-rpc/include/mach/debug-macro.S | 23 - arch/arm/mach-spear/include/mach/debug-macro.S | 36 -- arch/arm/mach-spear/include/mach/spear.h | 2 - arch/arm/mach-versatile/include/mach/debug-macro.S | 21 - 41 files changed, 457 insertions(+), 1106 deletions(-) delete mode 100644 arch/arm/include/asm/hardware/debug-8250.S create mode 100644 arch/arm/include/debug/8250.S delete mode 100644 arch/arm/include/debug/8250_32.S delete mode 100644 arch/arm/include/debug/bcm2835.S delete mode 100644 arch/arm/include/debug/cns3xxx.S delete mode 100644 arch/arm/include/debug/highbank.S delete mode 100644 arch/arm/include/debug/keystone.S delete mode 100644 arch/arm/include/debug/mvebu.S delete mode 100644 arch/arm/include/debug/mxs.S delete mode 100644 arch/arm/include/debug/nomadik.S delete mode 100644 arch/arm/include/debug/nspire.S delete mode 100644 arch/arm/include/debug/picoxcell.S rename arch/arm/include/{asm/hardware/debug-pl01x.S => debug/pl01x.S} (78%) delete mode 100644 arch/arm/include/debug/pxa.S delete mode 100644 arch/arm/include/debug/rockchip.S delete mode 100644 arch/arm/include/debug/socfpga.S delete mode 100644 arch/arm/include/debug/sunxi.S delete mode 100644 arch/arm/include/debug/u300.S delete mode 100644 arch/arm/mach-davinci/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-dove/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-ebsa110/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-ep93xx/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-gemini/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-integrator/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-iop13xx/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-iop32x/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-iop33x/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-ixp4xx/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-kirkwood/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-lpc32xx/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-mv78xx0/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-orion5x/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-realview/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-rpc/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-spear/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-versatile/include/mach/debug-macro.S