Skip to contentSkip to conversation

ARM: debug-ll fixes

PATCH New Arnd Bergmann 8 participants 23 messages Dec 4, 2015 – Dec 22, 2015

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover ARM: debug-ll fixes

Hi everyone,

I've carried most of these patches for a very long time in my randconfig tree, and they follow up on work that Daniel Thompson did last year. Most of the changes are really trivial, and I'd like to put them into my next/randconfig branch in arm-soc for merging in 4.5.

The last patch for orion/mvebu is the only one that is slightly tricky, but it would be good to have that as part of the multiplatform conversion for orion5x/mv78xx0.

The patches are currently based on top of my randconfig branch, and there will be conflicts trying to apply them on mainline, but I can handle that inside of arm-soc.

Arnd

Arnd Bergmann (10):
ARM: debug-ll: fix UART configuration with ARCH_KEYSTONE
ARM: debug-ll: reorganize mvebu debug uart config
ARM: debug-ll: rework ep93xx handling
ARM: debug-ll: rework SPEAr handling
ARM: debug-ll: rework integrator/versatile handling
ARM: debug-ll: rework gemini handling
ARM: debug-ll: rework lpc32xx handling
ARM: debug-ll: rework footbridge handling
ARM: debug-ll: reorder Kconfig alphanumerically
ARM: orion/mvebu: unify debug-ll virtual addresses

 arch/arm/Kconfig.debug                             | 397 ++++++++++++---------
 .../mach/debug-macro.S => include/debug/dc21285.S} |   0
 arch/arm/mach-dove/include/mach/dove.h             |  10 +-
 arch/arm/mach-mv78xx0/mv78xx0.h                    |   4 +-
 arch/arm/mach-orion5x/orion5x.h                    |   4 +-
 5 files changed, 238 insertions(+), 177 deletions(-)
 rename arch/arm/{mach-footbridge/include/mach/debug-macro.S => include/debug/dc21285.S} (100%)
Signature · 1 line
2.1.0.rc2
#1 lore raw

PATCH 1/10 ARM: debug-ll: fix UART configuration with ARCH_KEYSTONE

We may have multiple platforms enabled and also DEBUG_LL configured for one of them. However if we enable ARCH_KEYSTONE, we default to using 32-bit UART access independent of which platform we are actually using, which can be confusing.

This changes the logic so the 32-bit default gets only used by default if we actually configure the keystone UART, as opposed to picking some other 8250 setting on a kernel that has keystone support enabled.

---
 arch/arm/Kconfig.debug | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/Kconfig.debug +3 -2
index 543934ef7bf5..50ae573e6cba 100644
@@ -1599,8 +1599,9 @@ 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_UART0 || \
-		DEBUG_SOCFPGA_UART1 || ARCH_KEYSTONE || \
+	default y if DEBUG_PICOXCELL_UART || \
+		DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_UART1 || \
+		DEBUG_KEYSTONE_UART0 || DEBUG_KEYSTONE_UART1 || \
 		DEBUG_ALPINE_UART0 || \
 		DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \
 		DEBUG_DAVINCI_DA8XX_UART2 || \
Signature · 1 line
2.1.0.rc2
#2 lore raw

PATCH 2/10 ARM: debug-ll: reorganize mvebu debug uart config

In reply to Arnd Bergmann

As we are moving dove/mv78xx0/orion into multiplatform, the debug-ll configuration options for these platforms are conflicting with the multiplatform configuration: enabling one of those platforms sometimes changes the default addresses to the ones used on one of them, rather than the one that was selected in Kconfig.

This changes the configuration so we share the physical address configuration with mach-mvebu.

---
 arch/arm/Kconfig.debug | 32 +++++++++++++++++++-------------
 1 file changed, 19 insertions(+), 13 deletions(-)
arch/arm/Kconfig.debug +19 -13
index 50ae573e6cba..8258f9dd1f77 100644
@@ -499,6 +499,7 @@ choice
 	config DEBUG_MVEBU_UART0
 		bool "Kernel low-level debugging messages via MVEBU UART0 (old bootloaders)"
 		depends on ARCH_MVEBU
+		depends on ARCH_MVEBU && CPU_V7
 		select DEBUG_UART_8250
 		help
 		  Say Y here if you want kernel low-level debugging support
@@ -511,17 +512,23 @@ choice
 		  Plathome OpenBlocks AX3, when using the original
 		  bootloader.
 
+		  This option will not work on older Marvell platforms
+		  (Kirkwood, Dove, MV78xx0, Orion5x), which should  piock
+		  the "new bootloader" variant.
+
 		  If the wrong DEBUG_MVEBU_UART* option is selected,
 		  when u-boot hands over to the kernel, the system
 		  silently crashes, with no serial output at all.
 
 	config DEBUG_MVEBU_UART0_ALTERNATE
 		bool "Kernel low-level debugging messages via MVEBU UART0 (new bootloaders)"
-		depends on ARCH_MVEBU
+		depends on ARCH_MVEBU || ARCH_DOVE || ARCH_MV78XX0 || ARCH_ORION5X
 		select DEBUG_UART_8250
 		help
 		  Say Y here if you want kernel low-level debugging support
-		  on MVEBU based platforms on UART0.
+		  on MVEBU based platforms on UART0. (Armada XP, Armada 3xx,
+		  Kirkwood, Dove, MV78xx0, Orion5x).
+
 
 		  This option should be used with the new bootloaders
 		  that remap the internal registers at 0xf1000000.
@@ -536,10 +543,13 @@ choice
 		select DEBUG_UART_8250
 		help
 		  Say Y here if you want kernel low-level debugging support
-		  on MVEBU based platforms on UART1.
+		  on MVEBU based platforms on UART1. (Armada XP, Armada 3xx,
+		  Kirkwood, Dove, MV78xx0, Orion5x).
 
 		  This option should be used with the new bootloaders
 		  that remap the internal registers at 0xf1000000.
+		  All of the older (pre Armada XP/370) platforms also use
+		  this address, regardless of the boot loader version.
 
 		  If the wrong DEBUG_MVEBU_UART* option is selected,
 		  when u-boot hands over to the kernel, the system
@@ -1365,11 +1375,9 @@ config DEBUG_UART_PL01X
 
 # Compatibility options for 8250
 config DEBUG_UART_8250
-	def_bool ARCH_DOVE || ARCH_EBSA110 || \
-		(FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
+	def_bool ARCH_EBSA110 || (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
 		ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \
-		ARCH_IOP33X || ARCH_IXP4XX || \
-		ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC
+		ARCH_IOP33X || ARCH_IXP4XX || ARCH_LPC32XX || ARCH_RPC
 
 # Compatibility options for BCM63xx
 config DEBUG_UART_BCM63XX
@@ -1455,8 +1463,6 @@ config DEBUG_UART_PHYS
 	default 0xf040ab00 if DEBUG_BRCMSTB_UART
 	default 0xf1012000 if DEBUG_MVEBU_UART0_ALTERNATE
 	default 0xf1012100 if DEBUG_MVEBU_UART1_ALTERNATE
-	default 0xf1012000 if ARCH_DOVE || ARCH_MV78XX0 || \
-				ARCH_ORION5X
 	default 0xf7fc9000 if DEBUG_BERLIN_UART
 	default 0xf8b00000 if DEBUG_HIX5HD2_UART
 	default 0xf991e000 if DEBUG_QCOM_UARTDM
@@ -1535,10 +1541,10 @@ config DEBUG_UART_VIRT
 	default 0xfcfe8600 if DEBUG_UART_BCM63XX
 	default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX
 	default 0xfd000000 if ARCH_SPEAR13XX
-	default 0xfd012000 if ARCH_MV78XX0
+	default 0xfd012000 if DEBUG_MVEBU_UART0_ALTERNATE && ARCH_MV78XX0
 	default 0xfd883000 if DEBUG_ALPINE_UART0
-	default 0xfde12000 if ARCH_DOVE
-	default 0xfe012000 if ARCH_ORION5X
+	default 0xfde12000 if DEBUG_MVEBU_UART0_ALTERNATE && ARCH_DOVE
+	default 0xfe012000 if DEBUG_MVEBU_UART0_ALTERNATE && ARCH_ORION5X
 	default 0xf31004c0 if DEBUG_MESON_UARTAO
 	default 0xfe017000 if DEBUG_MMP_UART2
 	default 0xfe018000 if DEBUG_MMP_UART3
@@ -1553,7 +1559,7 @@ config DEBUG_UART_VIRT
 	default 0xfeb31000 if DEBUG_KEYSTONE_UART1
 	default 0xfec02000 if DEBUG_SOCFPGA_UART0
 	default 0xfec02100 if DEBUG_SOCFPGA_UART1
-	default 0xfec12000 if DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE
+	default 0xfec12000 if (DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE) && ARCH_MVEBU
 	default 0xfec12100 if DEBUG_MVEBU_UART1_ALTERNATE
 	default 0xfec10000 if DEBUG_SIRFATLAS7_UART0
 	default 0xfec20000 if DEBUG_DAVINCI_DMx_UART0
Signature · 1 line
2.1.0.rc2
#3 lore raw

PATCH 2/10 ARM: debug-ll: reorganize mvebu debug uart config

Quoted 27 lines · Arnd Bergmann

As we are moving dove/mv78xx0/orion into multiplatform, the debug-ll configuration options for these platforms are conflicting with the multiplatform configuration: enabling one of those platforms sometimes changes the default addresses to the ones used on one of them, rather than the one that was selected in Kconfig.

This changes the configuration so we share the physical address configuration with mach-mvebu.

---
  arch/arm/Kconfig.debug | 32 +++++++++++++++++++-------------
  1 file changed, 19 insertions(+), 13 deletions(-)
arch/arm/Kconfig.debug +1 -0
index 50ae573e6cba..8258f9dd1f77 100644
@@ -499,6 +499,7 @@ choice
  	config DEBUG_MVEBU_UART0
  		bool "Kernel low-level debugging messages via MVEBU UART0 (old bootloaders)"
  		depends on ARCH_MVEBU
+		depends on ARCH_MVEBU && CPU_V7
  		select DEBUG_UART_8250
  		help
  		  Say Y here if you want kernel low-level debugging support

arch/arm/Kconfig.debug choice · line 518

Quoted 7 lines
arch/arm/Kconfig.debug +4 -0
@@ -511,17 +512,23 @@ choice
  		  Plathome OpenBlocks AX3, when using the original
  		  bootloader.
 
+		  This option will not work on older Marvell platforms
+		  (Kirkwood, Dove, MV78xx0, Orion5x), which should  piock
+		  the "new bootloader" variant.
+

s/piock/pick/

#4 lore raw

PATCH 2/10 ARM: debug-ll: reorganize mvebu debug uart config

Quoted 4 lines · On Monday 07 December 2015 13:13:27 Daniel Thompson wrote:
Quoted 4 lines
arch/arm/Kconfig.debug +0 -0
@@ -511,17 +512,23 @@ choice
                Plathome OpenBlocks AX3, when using the original
                bootloader.
 
Quoted 8 lines

arch/arm/Kconfig.debug choice · line 518

Quoted 4 lines
arch/arm/Kconfig.debug +4 -0
+               This option will not work on older Marvell platforms
+               (Kirkwood, Dove, MV78xx0, Orion5x), which should  piock
+               the "new bootloader" variant.
+

s/piock/pick/

Fixed, thanks!

Arnd

#5 lore raw

PATCH 3/10 ARM: debug-ll: rework ep93xx handling

In reply to Arnd Bergmann

This makes ep93xx debug-ll handling more consistent with the other platforms, by adding a separate Kconfig symbol for it that in turn selects the standard DEBUG_UART_PL01X symbol.

We still have to pick a physical address even if DEBUG_LL is disabled here, because the EP93xx uncompress output code uses CONFIG_DEBUG_UART_PHYS. If we ever move to multiplatform support, this can go away.

---
 arch/arm/Kconfig.debug | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
arch/arm/Kconfig.debug +10 -2
index 8258f9dd1f77..cbdd096b9d13 100644
@@ -263,6 +263,14 @@ choice
 		  Say Y here if you want the debug print routines to direct
 		  their output to the UA0 serial port in the CX92755.
 
+	config DEBUG_EP93XX
+		bool "Kernel low-level debugging messages via ep93xx UART"
+		depends on ARCH_EP93XX
+		select DEBUG_UART_PL01X
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  on Cirrus Logic EP93xx based platforms.
+
 	config DEBUG_FOOTBRIDGE_COM1
 		bool "Kernel low-level debugging messages via footbridge 8250 at PCI COM1"
 		depends on FOOTBRIDGE
@@ -1439,7 +1447,7 @@ config DEBUG_UART_PHYS
 	default 0x80070000 if DEBUG_IMX23_UART
 	default 0x80074000 if DEBUG_IMX28_UART
 	default 0x80230000 if DEBUG_PICOXCELL_UART
-	default 0x808c0000 if ARCH_EP93XX
+	default 0x808c0000 if DEBUG_EP93XX || ARCH_EP93XX
 	default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART
 	default 0xb0060000 if DEBUG_SIRFPRIMA2_UART1
 	default 0xb0090000 if DEBUG_VEXPRESS_UART0_CRX
@@ -1571,7 +1579,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 0xfedc0000 if ARCH_EP93XX
+	default 0xfedc0000 if DEBUG_EP93XX
 	default 0xfee003f8 if FOOTBRIDGE
 	default 0xfee20000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART
 	default 0xfee82340 if ARCH_IOP13XX
Signature · 1 line
2.1.0.rc2
#6 lore raw

PATCH 3/10 ARM: debug-ll: rework ep93xx handling

Quoted 10 lines · Arnd Bergmann

This makes ep93xx debug-ll handling more consistent with the other platforms, by adding a separate Kconfig symbol for it that in turn selects the standard DEBUG_UART_PL01X symbol.

We still have to pick a physical address even if DEBUG_LL is disabled here, because the EP93xx uncompress output code uses CONFIG_DEBUG_UART_PHYS. If we ever move to multiplatform support, this can go away.

Looks correct.

Yours,
Linus Walleij

#7 lore raw

PATCH 4/10 ARM: debug-ll: rework SPEAr handling

In reply to Arnd Bergmann

Enabling one of the SPEAr platforms in a multiplatform kernel while trying to use DEBUG_LL for another platform can default to the wrong UART address, as the options are purely based on the architecture being enabled or not.

This changes the logic to use the SPEAr default addresses only if we have also picked the respective Kconfig symbols introduced here.

---
 arch/arm/Kconfig.debug | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)
arch/arm/Kconfig.debug +19 -4
index cbdd096b9d13..5eb62e97a35a 100644
@@ -1080,6 +1080,22 @@ choice
 		  Say Y here if you want the debug print routines to direct
 		  their output to the uart1 port on SiRFATLAS7 devices.
 
+	config DEBUG_SPEAR3XX
+		bool "Kernel low-level debugging messages via ST SPEAr 3xx/6xx UART"
+		depends on ARCH_SPEAR3XX || ARCH_SPEAR6XX
+		select DEBUG_UART_PL01X
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  on ST SPEAr based platforms.
+
+	config DEBUG_SPEAR13XX
+		bool "Kernel low-level debugging messages via ST SPEAr 13xx UART"
+		depends on ARCH_SPEAR13XX
+		select DEBUG_UART_PL01X
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  on ST SPEAr13xx based platforms.
+
 	config STIH41X_DEBUG_ASC2
 		bool "Use StiH415/416 ASC2 UART for low-level debug"
 		depends on ARCH_STI
@@ -1454,12 +1470,12 @@ 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 0xd0000000 if DEBUG_SPEAR3XX
 	default 0xd0012000 if DEBUG_MVEBU_UART0
 	default 0xc81004c0 if DEBUG_MESON_UARTAO
 	default 0xd4017000 if DEBUG_MMP_UART2
 	default 0xd4018000 if DEBUG_MMP_UART3
-	default 0xe0000000 if ARCH_SPEAR13XX
+	default 0xe0000000 if DEBUG_SPEAR13XX
 	default 0xe4007000 if DEBUG_HIP04_UART
 	default 0xe6c40000 if DEBUG_RMOBILE_SCIFA0
 	default 0xe6c50000 if DEBUG_RMOBILE_SCIFA1
@@ -1547,8 +1563,7 @@ config DEBUG_UART_VIRT
 	default 0xfc40ab00 if DEBUG_BRCMSTB_UART
 	default 0xfc705000 if DEBUG_ZTE_ZX
 	default 0xfcfe8600 if DEBUG_UART_BCM63XX
-	default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX
-	default 0xfd000000 if ARCH_SPEAR13XX
+	default 0xfd000000 if DEBUG_SPEAR3XX || DEBUG_SPEAR13XX
 	default 0xfd012000 if DEBUG_MVEBU_UART0_ALTERNATE && ARCH_MV78XX0
 	default 0xfd883000 if DEBUG_ALPINE_UART0
 	default 0xfde12000 if DEBUG_MVEBU_UART0_ALTERNATE && ARCH_DOVE
Signature · 1 line
2.1.0.rc2
#8 lore raw

PATCH 5/10 ARM: debug-ll: rework integrator/versatile handling

In reply to Arnd Bergmann

Enabling one of the integrator platforms in a multiplatform kernel while trying to use DEBUG_LL for another platform can default to the wrong UART address, as the options are purely based on the architecture being enabled or not.

This changes the logic to use the integrator default addresses only if we have also picked the respective Kconfig symbols introduced here. Versatile is not yet part of multiplatform, but hopefully soon will be, so we do the same change for versatile as well.

---
 arch/arm/Kconfig.debug | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
arch/arm/Kconfig.debug +20 -4
index 5eb62e97a35a..aa27e58e210a 100644
@@ -433,6 +433,14 @@ choice
 		  Say Y here if you want kernel low-level debugging support
 		  on i.MX7D.
 
+	config DEBUG_INTEGRATOR
+		bool "Kernel low-level debugging messages via ARM Integrator UART"
+		depends on ARCH_INTEGRATOR
+		select DEBUG_UART_PL01X
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  on ARM Integrator platforms.
+
 	config DEBUG_KEYSTONE_UART0
 		bool "Kernel low-level debugging on KEYSTONE2 using UART0"
 		depends on ARCH_KEYSTONE
@@ -1141,6 +1149,14 @@ choice
 		  Say Y here if you want kernel low-level debugging support
 		  for Mediatek mt6589 based platforms on UART0.
 
+	config DEBUG_VERSATILE
+		bool "Kernel low-level debugging messages via ARM Versatile UART"
+		depends on ARCH_VERSATILE
+		select DEBUG_UART_PL01X
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  on ARM Versatile platforms.
+
 	config DEBUG_MT8127_UART0
 		bool "Mediatek mt8127/mt6592 UART0"
 		depends on ARCH_MEDIATEK
@@ -1426,12 +1442,12 @@ config DEBUG_UART_PHYS
 	default 0x1010c000 if DEBUG_REALVIEW_PB1176_PORT
 	default 0x10124000 if DEBUG_RK3X_UART0
 	default 0x10126000 if DEBUG_RK3X_UART1
-	default 0x101f1000 if ARCH_VERSATILE
+	default 0x101f1000 if DEBUG_VERSATILE
 	default 0x101fb000 if DEBUG_NOMADIK_UART
 	default 0x11002000 if DEBUG_MT8127_UART0
 	default 0x11006000 if DEBUG_MT6589_UART0
 	default 0x11009000 if DEBUG_MT8135_UART3
-	default 0x16000000 if ARCH_INTEGRATOR
+	default 0x16000000 if DEBUG_INTEGRATOR
 	default 0x18000300 if DEBUG_BCM_5301X
 	default 0x18010000 if DEBUG_SIRFATLAS7_UART0
 	default 0x18020000 if DEBUG_SIRFATLAS7_UART1
@@ -1533,8 +1549,8 @@ config DEBUG_UART_VIRT
 	default 0xf1002000 if DEBUG_MT8127_UART0
 	default 0xf1006000 if DEBUG_MT6589_UART0
 	default 0xf1009000 if DEBUG_MT8135_UART3
-	default 0xf11f1000 if ARCH_VERSATILE
-	default 0xf1600000 if ARCH_INTEGRATOR
+	default 0xf11f1000 if DEBUG_VERSATILE
+	default 0xf1600000 if DEBUG_INTEGRATOR
 	default 0xf1c28000 if DEBUG_SUNXI_UART0
 	default 0xf1c28400 if DEBUG_SUNXI_UART1
 	default 0xf1f02800 if DEBUG_SUNXI_R_UART
Signature · 1 line
2.1.0.rc2
#9 lore raw

PATCH 5/10 ARM: debug-ll: rework integrator/versatile handling

Quoted 11 lines · Arnd Bergmann

Enabling one of the integrator platforms in a multiplatform kernel while trying to use DEBUG_LL for another platform can default to the wrong UART address, as the options are purely based on the architecture being enabled or not.

This changes the logic to use the integrator default addresses only if we have also picked the respective Kconfig symbols introduced here. Versatile is not yet part of multiplatform, but hopefully soon will be, so we do the same change for versatile as well.

Yours,
Linus Walleij

#10 lore raw

PATCH 6/10 ARM: debug-ll: rework gemini handling

In reply to Arnd Bergmann

Gemini can not yet be configured in a multiplatform kernel, but if we ever get there, enabling one of the gemini platforms while trying to use DEBUG_LL for another platform can default to the wrong UART address, as the options are purely based on the architecture being enabled or not.

This changes the logic to use the gemini default addresses and the flow control settings only if we have also picked the respective Kconfig symbols introduced here.

While we're at it, this also reorders the virtual address as it should be.

---
 arch/arm/Kconfig.debug | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
arch/arm/Kconfig.debug +13 -5
index aa27e58e210a..b35392417378 100644
@@ -278,6 +278,14 @@ choice
 		  Say Y here if you want the debug print routines to direct
 		  their output to the 8250 at PCI COM1.
 
+	config DEBUG_GEMINI
+		bool "Kernel low-level debugging messages via Cortina Systems Gemini UART"
+		depends on ARCH_GEMINI
+		select DEBUG_UART_8250
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  on Cortina Gemini based platforms.
+
 	config DEBUG_HI3620_UART
 		bool "Hisilicon HI3620 Debug UART"
 		depends on ARCH_HI3xxx
@@ -1416,8 +1424,8 @@ config DEBUG_UART_PL01X
 # Compatibility options for 8250
 config DEBUG_UART_8250
 	def_bool ARCH_EBSA110 || (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
-		ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \
-		ARCH_IOP33X || ARCH_IXP4XX || ARCH_LPC32XX || ARCH_RPC
+		ARCH_IOP13XX || ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX || \
+		ARCH_LPC32XX || ARCH_RPC
 
 # Compatibility options for BCM63xx
 config DEBUG_UART_BCM63XX
@@ -1462,7 +1470,7 @@ config DEBUG_UART_PHYS
 	default 0x40081000 if DEBUG_LPC18XX_UART0
 	default 0x40090000 if ARCH_LPC32XX
 	default 0x40100000 if DEBUG_PXA_UART1
-	default 0x42000000 if ARCH_GEMINI
+	default 0x42000000 if DEBUG_GEMINI
 	default 0x50000000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART0 || \
 				DEBUG_S3C2410_UART0)
 	default 0x50004000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART1 || \
@@ -1554,9 +1562,9 @@ config DEBUG_UART_VIRT
 	default 0xf1c28000 if DEBUG_SUNXI_UART0
 	default 0xf1c28400 if DEBUG_SUNXI_UART1
 	default 0xf1f02800 if DEBUG_SUNXI_R_UART
+	default 0xf4200000 if DEBUG_GEMINI
 	default 0xf6200000 if DEBUG_PXA_UART1
 	default 0xf4090000 if ARCH_LPC32XX
-	default 0xf4200000 if ARCH_GEMINI
 	default 0xf7000000 if DEBUG_SUN9I_UART0
 	default 0xf7000000 if DEBUG_S3C64XX_UART && DEBUG_S3C_UART0
 	default 0xf7000000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART0 || \
@@ -1656,7 +1664,7 @@ config DEBUG_UART_8250_WORD
 config DEBUG_UART_8250_FLOW_CONTROL
 	bool "Enable flow control for 8250 UART"
 	depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
-	default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_GEMINI || ARCH_RPC
+	default y if ARCH_EBSA110 || FOOTBRIDGE || DEBUG_GEMINI || ARCH_RPC
 
 config DEBUG_UNCOMPRESS
 	bool
Signature · 1 line
2.1.0.rc2
#11 lore raw

PATCH 6/10 ARM: debug-ll: rework gemini handling

Quoted 10 lines · Arnd Bergmann

Gemini can not yet be configured in a multiplatform kernel, but if we ever get there, enabling one of the gemini platforms while trying to use DEBUG_LL for another platform can default to the wrong UART address, as the options are purely based on the architecture being enabled or not.

This changes the logic to use the gemini default addresses and the flow control settings only if we have also picked the respective Kconfig symbols introduced here.

Quoted 5 lines

While we're at it, this also reorders the virtual address as it should be.

---

#12 lore raw

PATCH 7/10 ARM: debug-ll: rework lpc32xx handling

In reply to Arnd Bergmann

LPC32xx can not yet be configured in a multiplatform kernel, but if we ever get there, enabling one of the LPC32xx platforms while trying to use DEBUG_LL for another platform can default to the wrong UART address, as the options are purely based on the architecture being enabled or not.

This changes the logic to use the LPC32xx default addresses only if we have also picked the respective Kconfig symbols introduced here.

While we're at it, this also reorders the virtual address as it should be.

---
 arch/arm/Kconfig.debug | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
arch/arm/Kconfig.debug +11 -3
index b35392417378..9836d428a65d 100644
@@ -480,6 +480,14 @@ choice
 		  Say Y here if you want kernel low-level debugging support
 		  on NXP LPC18xx/43xx UART0.
 
+	config DEBUG_LPC32XX
+		bool "Kernel low-level debugging messages via NXP LPC32xx UART"
+		depends on ARCH_LPC32XX
+		select DEBUG_UART_8250
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  on NXP LPC32xx based platforms.
+
 	config DEBUG_MESON_UARTAO
 		bool "Kernel low-level debugging via Meson6 UARTAO"
 		depends on ARCH_MESON
@@ -1425,7 +1433,7 @@ config DEBUG_UART_PL01X
 config DEBUG_UART_8250
 	def_bool ARCH_EBSA110 || (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
 		ARCH_IOP13XX || ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX || \
-		ARCH_LPC32XX || ARCH_RPC
+		ARCH_RPC
 
 # Compatibility options for BCM63xx
 config DEBUG_UART_BCM63XX
@@ -1468,7 +1476,7 @@ config DEBUG_UART_PHYS
 	default 0x3e000000 if DEBUG_BCM_KONA_UART
 	default 0x4000e400 if DEBUG_LL_UART_EFM32
 	default 0x40081000 if DEBUG_LPC18XX_UART0
-	default 0x40090000 if ARCH_LPC32XX
+	default 0x40090000 if DEBUG_LPC32XX
 	default 0x40100000 if DEBUG_PXA_UART1
 	default 0x42000000 if DEBUG_GEMINI
 	default 0x50000000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART0 || \
@@ -1562,9 +1570,9 @@ config DEBUG_UART_VIRT
 	default 0xf1c28000 if DEBUG_SUNXI_UART0
 	default 0xf1c28400 if DEBUG_SUNXI_UART1
 	default 0xf1f02800 if DEBUG_SUNXI_R_UART
+	default 0xf4090000 if DEBUG_LPC32XX
 	default 0xf4200000 if DEBUG_GEMINI
 	default 0xf6200000 if DEBUG_PXA_UART1
-	default 0xf4090000 if ARCH_LPC32XX
 	default 0xf7000000 if DEBUG_SUN9I_UART0
 	default 0xf7000000 if DEBUG_S3C64XX_UART && DEBUG_S3C_UART0
 	default 0xf7000000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART0 || \
Signature · 1 line
2.1.0.rc2
#13 lore raw

PATCH 7/10 ARM: debug-ll: rework lpc32xx handling

Quoted 57 lines · Arnd Bergmann

LPC32xx can not yet be configured in a multiplatform kernel, but if we ever get there, enabling one of the LPC32xx platforms while trying to use DEBUG_LL for another platform can default to the wrong UART address, as the options are purely based on the architecture being enabled or not.

This changes the logic to use the LPC32xx default addresses only if we have also picked the respective Kconfig symbols introduced here.

While we're at it, this also reorders the virtual address as it should be.

---
 arch/arm/Kconfig.debug | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
arch/arm/Kconfig.debug +10 -2
index b35392417378..9836d428a65d 100644
@@ -480,6 +480,14 @@ choice
 		  Say Y here if you want kernel low-level debugging support
 		  on NXP LPC18xx/43xx UART0.
 
+	config DEBUG_LPC32XX
+		bool "Kernel low-level debugging messages via NXP LPC32xx UART"
+		depends on ARCH_LPC32XX
+		select DEBUG_UART_8250
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  on NXP LPC32xx based platforms.
+
 	config DEBUG_MESON_UARTAO
 		bool "Kernel low-level debugging via Meson6 UARTAO"
 		depends on ARCH_MESON
@@ -1425,7 +1433,7 @@ config DEBUG_UART_PL01X
 config DEBUG_UART_8250
 	def_bool ARCH_EBSA110 || (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
 		ARCH_IOP13XX || ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX || \
-		ARCH_LPC32XX || ARCH_RPC
+		ARCH_RPC
 
 # Compatibility options for BCM63xx
 config DEBUG_UART_BCM63XX
@@ -1468,7 +1476,7 @@ config DEBUG_UART_PHYS
 	default 0x3e000000 if DEBUG_BCM_KONA_UART
 	default 0x4000e400 if DEBUG_LL_UART_EFM32
 	default 0x40081000 if DEBUG_LPC18XX_UART0
-	default 0x40090000 if ARCH_LPC32XX
+	default 0x40090000 if DEBUG_LPC32XX
 	default 0x40100000 if DEBUG_PXA_UART1
 	default 0x42000000 if DEBUG_GEMINI
 	default 0x50000000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART0 || \

arch/arm/Kconfig.debug config DEBUG_UART_VIRT · line 1578

Quoted 10 lines
arch/arm/Kconfig.debug +1 -1
@@ -1562,9 +1570,9 @@ config DEBUG_UART_VIRT
 	default 0xf1c28000 if DEBUG_SUNXI_UART0
 	default 0xf1c28400 if DEBUG_SUNXI_UART1
 	default 0xf1f02800 if DEBUG_SUNXI_R_UART
+	default 0xf4090000 if DEBUG_LPC32XX
 	default 0xf4200000 if DEBUG_GEMINI
 	default 0xf6200000 if DEBUG_PXA_UART1
-	default 0xf4090000 if ARCH_LPC32XX
 	default 0xf7000000 if DEBUG_SUN9I_UART0
 	default 0xf7000000 if DEBUG_S3C64XX_UART && DEBUG_S3C_UART0
 	default 0xf7000000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART0 || \

For LPC32xx change:

--
With best wishes,
Vladimir

#14 lore raw

PATCH 8/10 ARM: debug-ll: rework footbridge handling

In reply to Arnd Bergmann

Footbridge has two debug ports that are handled a bit differently:

The 8250 port uses the normal debug/8250.S implementation that is shared with a lot of other platforms, but it relies on the DEBUG_UART_8250 option to be turned on automatically instead of being selected by DEBUG_FOOTBRIDGE_COM1 as we do for most other platforms. I'm changing this to use a 'select' and change the dependency to the debug symbol rather than the platform symbol for consistency.

The DC21285 UART has a separate top-level option, and relies on the traditional include/mach/debug-macro.S method. With the s3c64xx multiplatform series queued up for 4.5, it is now the last one that does this, so by moving this file to include/debug/dc21285.S, we can get all platforms to do things the same way.

---
 arch/arm/Kconfig.debug                                       | 12 +++++++-----
 .../include/mach/debug-macro.S => include/debug/dc21285.S}   |  0
 2 files changed, 7 insertions(+), 5 deletions(-)
 rename arch/arm/{mach-footbridge/include/mach/debug-macro.S => include/debug/dc21285.S} (100%)
arch/arm/Kconfig.debug +7 -5
index 9836d428a65d..1d0f5e24ad51 100644
@@ -274,6 +274,7 @@ choice
 	config DEBUG_FOOTBRIDGE_COM1
 		bool "Kernel low-level debugging messages via footbridge 8250 at PCI COM1"
 		depends on FOOTBRIDGE
+		select DEBUG_UART_8250
 		help
 		  Say Y here if you want the debug print routines to direct
 		  their output to the 8250 at PCI COM1.
@@ -1381,6 +1382,7 @@ config DEBUG_LL_INCLUDE
 	default "debug/at91.S" if DEBUG_AT91_UART
 	default "debug/asm9260.S" if DEBUG_ASM9260_UART
 	default "debug/clps711x.S" if DEBUG_CLPS711X_UART1 || DEBUG_CLPS711X_UART2
+	default "debug/dc21285.S" if DEBUG_DC21285_PORT
 	default "debug/meson.S" if DEBUG_MESON_UARTAO
 	default "debug/pl01x.S" if DEBUG_LL_UART_PL01X || DEBUG_UART_PL01X
 	default "debug/exynos.S" if DEBUG_EXYNOS_UART
@@ -1431,7 +1433,7 @@ config DEBUG_UART_PL01X
 
 # Compatibility options for 8250
 config DEBUG_UART_8250
-	def_bool ARCH_EBSA110 || (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
+	def_bool ARCH_EBSA110 || \
 		ARCH_IOP13XX || ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX || \
 		ARCH_RPC
 
@@ -1486,7 +1488,7 @@ config DEBUG_UART_PHYS
 	default 0x50008000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART2 || \
 				DEBUG_S3C2410_UART2)
 	default 0x78000000 if DEBUG_CNS3XXX
-	default 0x7c0003f8 if FOOTBRIDGE
+	default 0x7c0003f8 if DEBUG_FOOTBRIDGE_COM1
 	default 0x7f005000 if DEBUG_S3C64XX_UART && DEBUG_S3C_UART0
 	default 0x7f005400 if DEBUG_S3C64XX_UART && DEBUG_S3C_UART1
 	default 0x7f005800 if DEBUG_S3C64XX_UART && DEBUG_S3C_UART2
@@ -1627,7 +1629,7 @@ config DEBUG_UART_VIRT
 	default 0xfed64000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2
 	default 0xfed68000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3
 	default 0xfedc0000 if DEBUG_EP93XX
-	default 0xfee003f8 if FOOTBRIDGE
+	default 0xfee003f8 if DEBUG_FOOTBRIDGE_COM1
 	default 0xfee20000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART
 	default 0xfee82340 if ARCH_IOP13XX
 	default 0xfef00000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN
@@ -1652,7 +1654,7 @@ config DEBUG_UART_VIRT
 config DEBUG_UART_8250_SHIFT
 	int "Register offset shift for the 8250 debug UART"
 	depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
-	default 0 if FOOTBRIDGE || ARCH_IOP32X || DEBUG_BCM_5301X || \
+	default 0 if DEBUG_FOOTBRIDGE_COM1 || ARCH_IOP32X || DEBUG_BCM_5301X || \
 		DEBUG_OMAP7XXUART1 || DEBUG_OMAP7XXUART2 || DEBUG_OMAP7XXUART3
 	default 2
 
@@ -1672,7 +1674,7 @@ config DEBUG_UART_8250_WORD
 config DEBUG_UART_8250_FLOW_CONTROL
 	bool "Enable flow control for 8250 UART"
 	depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
-	default y if ARCH_EBSA110 || FOOTBRIDGE || DEBUG_GEMINI || ARCH_RPC
+	default y if ARCH_EBSA110 || DEBUG_FOOTBRIDGE_COM1 || DEBUG_GEMINI || ARCH_RPC
 
 config DEBUG_UNCOMPRESS
 	bool
arch/arm/include/debug/dc21285.S renamed from arch/arm/mach-footbridge/include/mach/debug-macro.S +0 -0
similarity index 100%
rename from arch/arm/mach-footbridge/include/mach/debug-macro.S
rename to arch/arm/include/debug/dc21285.S
Signature · 1 line
2.1.0.rc2
#15 lore raw

PATCH 9/10 ARM: debug-ll: reorder Kconfig alphanumerically

In reply to Arnd Bergmann

The file has gotten a little out of sync, as platforms got added in the wrong place, or have been renamed. This moves the options around, but should not change any functionality.

---
 arch/arm/Kconfig.debug | 282 ++++++++++++++++++++++++-------------------------
 1 file changed, 141 insertions(+), 141 deletions(-)
arch/arm/Kconfig.debug +141 -141
index 1d0f5e24ad51..974cf51b5182 100644
@@ -232,23 +232,6 @@ choice
 		  Say Y here if you want the debug print routines to direct
 		  their output to UART0 serial port on DaVinci DMx devices.
 
-	config DEBUG_ZYNQ_UART0
-		bool "Kernel low-level debugging on Xilinx Zynq using UART0"
-		depends on ARCH_ZYNQ
-		help
-		  Say Y here if you want the debug print routines to direct
-		  their output to UART0 on the Zynq platform.
-
-	config DEBUG_ZYNQ_UART1
-		bool "Kernel low-level debugging on Xilinx Zynq using UART1"
-		depends on ARCH_ZYNQ
-		help
-		  Say Y here if you want the debug print routines to direct
-		  their output to UART1 on the Zynq platform.
-
-		  If you have a ZC702 board and want early boot messages to
-		  appear on the USB serial adaptor, select this option.
-
 	config DEBUG_DC21285_PORT
 		bool "Kernel low-level debugging messages via footbridge serial port"
 		depends on FOOTBRIDGE
@@ -263,6 +246,20 @@ choice
 		  Say Y here if you want the debug print routines to direct
 		  their output to the UA0 serial port in the CX92755.
 
+	config DEBUG_LL_UART_EFM32
+		bool "Kernel low-level debugging via efm32 UART"
+		depends on ARCH_EFM32
+		help
+		  Say Y here if you want the debug print routines to direct
+		  their output to an UART or USART port on efm32 based
+		  machines. Use the following addresses for DEBUG_UART_PHYS:
+
+		    0x4000c000 | USART0
+		    0x4000c400 | USART1
+		    0x4000c800 | USART2
+		    0x4000e000 | UART0
+		    0x4000e400 | UART1
+
 	config DEBUG_EP93XX
 		bool "Kernel low-level debugging messages via ep93xx UART"
 		depends on ARCH_EP93XX
@@ -512,23 +509,6 @@ choice
 		  Say Y here if you want kernel low-level debugging support
 		  on MMP UART3.
 
-	config DEBUG_QCOM_UARTDM
-		bool "Kernel low-level debugging messages via QCOM UARTDM"
-		depends on ARCH_QCOM
-		help
-		  Say Y here if you want the debug print routines to direct
-		  their output to the serial port on Qualcomm devices.
-
-		  ARCH      DEBUG_UART_PHYS   DEBUG_UART_VIRT
-		  APQ8064   0x16640000        0xf0040000
-		  APQ8084   0xf995e000        0xfa75e000
-		  MSM8X60   0x19c40000        0xf0040000
-		  MSM8960   0x16440000        0xf0040000
-		  MSM8974   0xf991e000        0xfa71e000
-
-		  Please adjust DEBUG_UART_PHYS and DEBUG_UART_BASE configuration
-		  options based on your needs.
-
 	config DEBUG_MVEBU_UART0
 		bool "Kernel low-level debugging messages via MVEBU UART0 (old bootloaders)"
 		depends on ARCH_MVEBU
@@ -588,12 +568,29 @@ choice
 		  when u-boot hands over to the kernel, the system
 		  silently crashes, with no serial output at all.
 
-	config DEBUG_VF_UART
-		bool "Vybrid UART"
-		depends on SOC_VF610
+	config DEBUG_MT6589_UART0
+		bool "Mediatek mt6589 UART0"
+		depends on ARCH_MEDIATEK
+		select DEBUG_UART_8250
 		help
 		  Say Y here if you want kernel low-level debugging support
-		  on Vybrid based platforms.
+		  for Mediatek mt6589 based platforms on UART0.
+
+	config DEBUG_MT8127_UART0
+		bool "Mediatek mt8127/mt6592 UART0"
+		depends on ARCH_MEDIATEK
+		select DEBUG_UART_8250
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  for Mediatek mt8127 based platforms on UART0.
+
+	config DEBUG_MT8135_UART3
+		bool "Mediatek mt8135 UART3"
+		depends on ARCH_MEDIATEK
+		select DEBUG_UART_8250
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  for Mediatek mt8135 based platforms on UART3.
 
 	config DEBUG_NETX_UART
 		bool "Kernel low-level debugging messages via NetX UART"
@@ -757,6 +754,23 @@ choice
 		  Say Y here if you want kernel low-level debugging support
 		  on PXA UART1.
 
+	config DEBUG_QCOM_UARTDM
+		bool "Kernel low-level debugging messages via QCOM UARTDM"
+		depends on ARCH_QCOM
+		help
+		  Say Y here if you want the debug print routines to direct
+		  their output to the serial port on Qualcomm devices.
+
+		  ARCH      DEBUG_UART_PHYS   DEBUG_UART_VIRT
+		  APQ8064   0x16640000        0xf0040000
+		  APQ8084   0xf995e000        0xfa75e000
+		  MSM8X60   0x19c40000        0xf0040000
+		  MSM8960   0x16440000        0xf0040000
+		  MSM8974   0xf991e000        0xfa71e000
+
+		  Please adjust DEBUG_UART_PHYS and DEBUG_UART_BASE configuration
+		  options based on your needs.
+
 	config DEBUG_REALVIEW_STD_PORT
 		bool "RealView Default UART"
 		depends on ARCH_REALVIEW
@@ -1027,58 +1041,6 @@ choice
 		  Say Y here if you want kernel low-level debugging support
 		  on Allwinner A31/A23 based platforms on the R_UART.
 
-	config TEGRA_DEBUG_UART_AUTO_ODMDATA
-		bool "Kernel low-level debugging messages via Tegra UART via ODMDATA"
-		depends on ARCH_TEGRA
-		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.
-
 	config DEBUG_SIRFPRIMA2_UART1
 		bool "Kernel low-level debugging messages via SiRFprimaII UART1"
 		depends on ARCH_PRIMA2
@@ -1143,6 +1105,58 @@ choice
 
 		  If unsure, say N.
 
+	config TEGRA_DEBUG_UART_AUTO_ODMDATA
+		bool "Kernel low-level debugging messages via Tegra UART via ODMDATA"
+		depends on ARCH_TEGRA
+		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.
+
 	config DEBUG_U300_UART
 		bool "Kernel low-level debugging messages via U300 UART0"
 		depends on ARCH_U300
@@ -1158,14 +1172,6 @@ choice
 		  Say Y here if you want kernel low-level debugging support
 		  on Ux500 based platforms.
 
-	config DEBUG_MT6589_UART0
-		bool "Mediatek mt6589 UART0"
-		depends on ARCH_MEDIATEK
-		select DEBUG_UART_8250
-		help
-		  Say Y here if you want kernel low-level debugging support
-		  for Mediatek mt6589 based platforms on UART0.
-
 	config DEBUG_VERSATILE
 		bool "Kernel low-level debugging messages via ARM Versatile UART"
 		depends on ARCH_VERSATILE
@@ -1174,22 +1180,6 @@ choice
 		  Say Y here if you want kernel low-level debugging support
 		  on ARM Versatile platforms.
 
-	config DEBUG_MT8127_UART0
-		bool "Mediatek mt8127/mt6592 UART0"
-		depends on ARCH_MEDIATEK
-		select DEBUG_UART_8250
-		help
-		  Say Y here if you want kernel low-level debugging support
-		  for Mediatek mt8127 based platforms on UART0.
-
-	config DEBUG_MT8135_UART3
-		bool "Mediatek mt8135 UART3"
-		depends on ARCH_MEDIATEK
-		select DEBUG_UART_8250
-		help
-		  Say Y here if you want kernel low-level debugging support
-		  for Mediatek mt8135 based platforms on UART3.
-
 	config DEBUG_VEXPRESS_UART0_DETECT
 		bool "Autodetect UART0 on Versatile Express Cortex-A core tiles"
 		depends on ARCH_VEXPRESS && CPU_CP15_MMU
@@ -1226,6 +1216,13 @@ choice
 		  This option selects UART0 at 0xb0090000. This is appropriate for
 		  Cortex-R series tiles and SMMs, such as Cortex-R5 and Cortex-R7
 
+	config DEBUG_VF_UART
+		bool "Vybrid UART"
+		depends on SOC_VF610
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  on Vybrid based platforms.
+
 	config DEBUG_VT8500_UART0
 		bool "Use UART0 on VIA/Wondermedia SoCs"
 		depends on ARCH_VT8500
@@ -1233,6 +1230,35 @@ choice
 		  This option selects UART0 on VIA/Wondermedia System-on-a-chip
 		  devices, including VT8500, WM8505, WM8650 and WM8850.
 
+	config DEBUG_ZTE_ZX
+		bool "Use ZTE ZX UART"
+		select DEBUG_UART_PL01X
+		depends on ARCH_ZX
+		help
+		  Say Y here if you are enabling ZTE ZX296702 SOC and need
+		  debug uart support.
+
+		  This option is preferred over the platform specific
+		  options; the platform specific options are deprecated
+		  and will be soon removed.
+
+	config DEBUG_ZYNQ_UART0
+		bool "Kernel low-level debugging on Xilinx Zynq using UART0"
+		depends on ARCH_ZYNQ
+		help
+		  Say Y here if you want the debug print routines to direct
+		  their output to UART0 on the Zynq platform.
+
+	config DEBUG_ZYNQ_UART1
+		bool "Kernel low-level debugging on Xilinx Zynq using UART1"
+		depends on ARCH_ZYNQ
+		help
+		  Say Y here if you want the debug print routines to direct
+		  their output to UART1 on the Zynq platform.
+
+		  If you have a ZC702 board and want early boot messages to
+		  appear on the USB serial adaptor, select this option.
+
 	config DEBUG_ICEDCC
 		bool "Kernel low-level debugging via EmbeddedICE DCC channel"
 		help
@@ -1260,18 +1286,6 @@ choice
 		  For more details about semihosting, please see
 		  chapter 8 of DUI0203I_rvct_developer_guide.pdf from ARM Ltd.
 
-	config DEBUG_ZTE_ZX
-		bool "Use ZTE ZX UART"
-		select DEBUG_UART_PL01X
-		depends on ARCH_ZX
-		help
-		  Say Y here if you are enabling ZTE ZX296702 SOC and need
-		  debug uart support.
-
-		  This option is preferred over the platform specific
-		  options; the platform specific options are deprecated
-		  and will be soon removed.
-
 	config DEBUG_LL_UART_8250
 		bool "Kernel low-level debugging via 8250 UART"
 		help
@@ -1285,20 +1299,6 @@ choice
 		  options; the platform specific options are deprecated
 		  and will be soon removed.
 
-	config DEBUG_LL_UART_EFM32
-		bool "Kernel low-level debugging via efm32 UART"
-		depends on ARCH_EFM32
-		help
-		  Say Y here if you want the debug print routines to direct
-		  their output to an UART or USART port on efm32 based
-		  machines. Use the following addresses for DEBUG_UART_PHYS:
-
-		    0x4000c000 | USART0
-		    0x4000c400 | USART1
-		    0x4000c800 | USART2
-		    0x4000e000 | UART0
-		    0x4000e400 | UART1
-
 	config DEBUG_LL_UART_PL01X
 		bool "Kernel low-level debugging via ARM Ltd PL01x Primecell UART"
 		help
@@ -1572,6 +1572,7 @@ config DEBUG_UART_VIRT
 	default 0xf1c28000 if DEBUG_SUNXI_UART0
 	default 0xf1c28400 if DEBUG_SUNXI_UART1
 	default 0xf1f02800 if DEBUG_SUNXI_R_UART
+	default 0xf31004c0 if DEBUG_MESON_UARTAO
 	default 0xf4090000 if DEBUG_LPC32XX
 	default 0xf4200000 if DEBUG_GEMINI
 	default 0xf6200000 if DEBUG_PXA_UART1
@@ -1602,7 +1603,6 @@ config DEBUG_UART_VIRT
 	default 0xfd883000 if DEBUG_ALPINE_UART0
 	default 0xfde12000 if DEBUG_MVEBU_UART0_ALTERNATE && ARCH_DOVE
 	default 0xfe012000 if DEBUG_MVEBU_UART0_ALTERNATE && ARCH_ORION5X
-	default 0xf31004c0 if DEBUG_MESON_UARTAO
 	default 0xfe017000 if DEBUG_MMP_UART2
 	default 0xfe018000 if DEBUG_MMP_UART3
 	default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART
Signature · 1 line
2.1.0.rc2
#16 lore raw

PATCH 9/10 ARM: debug-ll: reorder Kconfig alphanumerically

Quoted 4 lines · Arnd Bergmann
arch/arm/Kconfig.debug +4 -0
+	config DEBUG_LL_UART_EFM32
+		bool "Kernel low-level debugging via efm32 UART"
+		depends on ARCH_EFM32
+		help

arch/arm/Kconfig.debug choice · line 262

Quoted 10 lines
arch/arm/Kconfig.debug +10 -0
+		  Say Y here if you want the debug print routines to direct
+		  their output to an UART or USART port on efm32 based
+		  machines. Use the following addresses for DEBUG_UART_PHYS:
+
+		    0x4000c000 | USART0
+		    0x4000c400 | USART1
+		    0x4000c800 | USART2
+		    0x4000e000 | UART0
+		    0x4000e400 | UART1
+

NAK. The DEBUG_LL options are _supposed_ to be at the end - this option was correctly positioned:

Quoted 24 lines
arch/arm/Kconfig.debug +0 -14
 	config DEBUG_LL_UART_8250
 		bool "Kernel low-level debugging via 8250 UART"
 		help
@@ -1285,20 +1299,6 @@ choice
 		  options; the platform specific options are deprecated
 		  and will be soon removed.
 
-	config DEBUG_LL_UART_EFM32
-		bool "Kernel low-level debugging via efm32 UART"
-		depends on ARCH_EFM32
-		help
-		  Say Y here if you want the debug print routines to direct
-		  their output to an UART or USART port on efm32 based
-		  machines. Use the following addresses for DEBUG_UART_PHYS:
-
-		    0x4000c000 | USART0
-		    0x4000c400 | USART1
-		    0x4000c800 | USART2
-		    0x4000e000 | UART0
-		    0x4000e400 | UART1
-
 	config DEBUG_LL_UART_PL01X
 		bool "Kernel low-level debugging via ARM Ltd PL01x Primecell UART"
 		help
Signature · 3 lines
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
#17 lore raw

PATCH 9/10 ARM: debug-ll: reorder Kconfig alphanumerically

Quoted 10 lines · On Thursday 17 December 2015 10:45:08 Russell King - ARM Linux wrote:
Quoted 9 lines · Arnd Bergmann
(quoted diff) +9 -0
+     config DEBUG_LL_UART_EFM32
+             bool "Kernel low-level debugging via efm32 UART"
+             depends on ARCH_EFM32
+             help
+               Say Y here if you want the debug print routines to direct
+               their output to an UART or USART port on efm32 based
+               machines. Use the following addresses for DEBUG_UART_PHYS:
+
+                 0x4000c000 | USART0
Quoted 8 lines

Review

Quoted 5 lines
(quoted diff) +5 -0
+                 0x4000c400 | USART1
+                 0x4000c800 | USART2
+                 0x4000e000 | UART0
+                 0x4000e400 | UART1
+

NAK. The DEBUG_LL options are _supposed_ to be at the end - this option was correctly positioned:

Ok, got it. I thought about this briefly when I did the reorganization but assumed it was not intentional and just oddly named. DEBUG_LL_UART_EFM32 it a bit different from all the other options, so either location seemed reasonable:

* like DEBUG_LL_UART_8250 and DEBUG_LL_UART_PL01X, we don't configure a particular address based on the platform, and the naming is consistent with those options.

* like all other options, it specific to one particular platform, and simply turning on DEBUG_LL from a defconfig file without selecting a particular target ends up picking the first one, and that is intentionally a platform specific option, so we don't have to pick one explicitly.

I've queued up the patch below to avoid having to rebuild the entire next/multiplatform branch, let me know if you'd rather see that branch rebuilt.

Arnd

Quoted 1 line

From 06920d4eeabcd824436ace6fbd6cf49739a5812a Mon Sep 17 00:00:00 2001

From: Arnd Bergmann <[email protected]>
Date: Thu, 17 Dec 2015 16:59:55 +0100
Subject: [PATCH] ARM: debug-ll: move DEBUG_LL_UART_EFM32 to correct Kconfig location

I accidentally move the DEBUG_LL_UART_EFM32 option when sorting all other options alphanumerically, but it belongs into the same group as DEBUG_LL_UART_8250 and DEBUG_LL_UART_PL01X.

Fixes 1dc9341 ("ARM: debug-ll: reorder Kconfig alphanumerically")
arch/arm/Kconfig.debug +14 -14
index 3626b8b..776fc7c 100644
@@ -246,20 +246,6 @@ choice
 		  Say Y here if you want the debug print routines to direct
 		  their output to the UA0 serial port in the CX92755.
 
-	config DEBUG_LL_UART_EFM32
-		bool "Kernel low-level debugging via efm32 UART"
-		depends on ARCH_EFM32
-		help
-		  Say Y here if you want the debug print routines to direct
-		  their output to an UART or USART port on efm32 based
-		  machines. Use the following addresses for DEBUG_UART_PHYS:
-
-		    0x4000c000 | USART0
-		    0x4000c400 | USART1
-		    0x4000c800 | USART2
-		    0x4000e000 | UART0
-		    0x4000e400 | UART1
-
 	config DEBUG_EP93XX
 		bool "Kernel low-level debugging messages via ep93xx UART"
 		depends on ARCH_EP93XX
@@ -1299,6 +1285,20 @@ choice
 		  options; the platform specific options are deprecated
 		  and will be soon removed.
 
+	config DEBUG_LL_UART_EFM32
+		bool "Kernel low-level debugging via efm32 UART"
+		depends on ARCH_EFM32
+		help
+		  Say Y here if you want the debug print routines to direct
+		  their output to an UART or USART port on efm32 based
+		  machines. Use the following addresses for DEBUG_UART_PHYS:
+
+		    0x4000c000 | USART0
+		    0x4000c400 | USART1
+		    0x4000c800 | USART2
+		    0x4000e000 | UART0
+		    0x4000e400 | UART1
+
 	config DEBUG_LL_UART_PL01X
 		bool "Kernel low-level debugging via ARM Ltd PL01x Primecell UART"
 		help
#18 lore raw

PATCH 10/10 ARM: orion/mvebu: unify debug-ll virtual addresses

In reply to Arnd Bergmann

In a multiplatform configuration, enabling DEBUG_LL breaks booting on all platforms with incompatible settings. In case of the Marvell platforms of the Orion/MVEBU family, the physical addresses are all the same, we just map them at different virtual addresses, which makes it impossible to run a kernel with DEBUG_LL enabled on a combination of the merged mvebu and the legacy boardfile based platforms.

This is easily solved by using the same virtual address everywhere. I picked the address that is already used by mach-mvebu for UART0:
0xfec12000. All these platforms have a 1MB region with their internal registers, almost always at physical address 0xf1000000, so I'm updating the iotable for that entry.

In case of mach-dove, this is slightly trickier, as the existing mapping is 8MB and a second 8MB mapping is already at the 0xfec00000 address. I have verified from the datasheet that the last 7MB of the physical mapping are "reserved" and nothing in Linux tries to use it either. I'm putting this 1MB mapping at the same address as the others, and the second 8MB register area immediately before that.

---
 arch/arm/Kconfig.debug                 |  5 +----
 arch/arm/mach-dove/include/mach/dove.h | 10 +++++-----
 arch/arm/mach-mv78xx0/mv78xx0.h        |  4 ++--
 arch/arm/mach-orion5x/orion5x.h        |  4 ++--
 4 files changed, 10 insertions(+), 13 deletions(-)
arch/arm/Kconfig.debug +1 -4
index 974cf51b5182..fe699fba10b3 100644
@@ -1599,10 +1599,7 @@ config DEBUG_UART_VIRT
 	default 0xfc705000 if DEBUG_ZTE_ZX
 	default 0xfcfe8600 if DEBUG_UART_BCM63XX
 	default 0xfd000000 if DEBUG_SPEAR3XX || DEBUG_SPEAR13XX
-	default 0xfd012000 if DEBUG_MVEBU_UART0_ALTERNATE && ARCH_MV78XX0
 	default 0xfd883000 if DEBUG_ALPINE_UART0
-	default 0xfde12000 if DEBUG_MVEBU_UART0_ALTERNATE && ARCH_DOVE
-	default 0xfe012000 if DEBUG_MVEBU_UART0_ALTERNATE && ARCH_ORION5X
 	default 0xfe017000 if DEBUG_MMP_UART2
 	default 0xfe018000 if DEBUG_MMP_UART3
 	default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART
@@ -1616,7 +1613,7 @@ config DEBUG_UART_VIRT
 	default 0xfeb31000 if DEBUG_KEYSTONE_UART1
 	default 0xfec02000 if DEBUG_SOCFPGA_UART0
 	default 0xfec02100 if DEBUG_SOCFPGA_UART1
-	default 0xfec12000 if (DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE) && ARCH_MVEBU
+	default 0xfec12000 if (DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE)
 	default 0xfec12100 if DEBUG_MVEBU_UART1_ALTERNATE
 	default 0xfec10000 if DEBUG_SIRFATLAS7_UART0
 	default 0xfec20000 if DEBUG_DAVINCI_DMx_UART0
arch/arm/mach-dove/include/mach/dove.h +5 -5
index 00f45458b3ec..89af5ea7469d 100644
@@ -20,8 +20,8 @@
  * c8000000	fdb00000	1M	Cryptographic SRAM
  * e0000000	@runtime	128M	PCIe-0 Memory space
  * e8000000	@runtime	128M	PCIe-1 Memory space
- * f1000000	fde00000	8M	on-chip south-bridge registers
- * f1800000	fe600000	8M	on-chip north-bridge registers
+ * f1000000	fec00000	1M	on-chip south-bridge registers
+ * f1800000	fe400000	8M	on-chip north-bridge registers
  * f2000000	fee00000	1M	PCIe-0 I/O space
  * f2100000	fef00000	1M	PCIe-1 I/O space
  */
@@ -44,11 +44,11 @@
 #define DOVE_SCRATCHPAD_SIZE		SZ_1M
 
 #define DOVE_SB_REGS_PHYS_BASE		0xf1000000
-#define DOVE_SB_REGS_VIRT_BASE		IOMEM(0xfde00000)
-#define DOVE_SB_REGS_SIZE		SZ_8M
+#define DOVE_SB_REGS_VIRT_BASE		IOMEM(0xfec00000)
+#define DOVE_SB_REGS_SIZE		SZ_1M
 
 #define DOVE_NB_REGS_PHYS_BASE		0xf1800000
-#define DOVE_NB_REGS_VIRT_BASE		IOMEM(0xfe600000)
+#define DOVE_NB_REGS_VIRT_BASE		IOMEM(0xfe400000)
 #define DOVE_NB_REGS_SIZE		SZ_8M
 
 #define DOVE_PCIE0_IO_PHYS_BASE		0xf2000000
arch/arm/mach-mv78xx0/mv78xx0.h +2 -2
index 2db1265ec121..c1a9a1d1b295 100644
@@ -37,7 +37,7 @@
  * fee50000	f0d00000	64K	PCIe #5 I/O space
  * fee60000	f0e00000	64K	PCIe #6 I/O space
  * fee70000	f0f00000	64K	PCIe #7 I/O space
- * fd000000	f1000000	1M	on-chip peripheral registers
+ * fec00000	f1000000	1M	on-chip peripheral registers
  */
 #define MV78XX0_CORE0_REGS_PHYS_BASE	0xf1020000
 #define MV78XX0_CORE1_REGS_PHYS_BASE	0xf1024000
@@ -49,7 +49,7 @@
 #define MV78XX0_PCIE_IO_SIZE		SZ_1M
 
 #define MV78XX0_REGS_PHYS_BASE		0xf1000000
-#define MV78XX0_REGS_VIRT_BASE		IOMEM(0xfd000000)
+#define MV78XX0_REGS_VIRT_BASE		IOMEM(0xfec00000)
 #define MV78XX0_REGS_SIZE		SZ_1M
 
 #define MV78XX0_PCIE_MEM_PHYS_BASE	0xc0000000
arch/arm/mach-orion5x/orion5x.h +2 -2
index 3364df331f01..2b66120fba86 100644
@@ -31,13 +31,13 @@
  * fc000000	device bus mappings (cs0/cs1)
  *
  * virt		phys		size
- * fe000000	f1000000	1M	on-chip peripheral registers
+ * fec00000	f1000000	1M	on-chip peripheral registers
  * fee00000	f2000000	64K	PCIe I/O space
  * fee10000	f2100000	64K	PCI I/O space
  * fd000000	f0000000	16M	PCIe WA space (Orion-1/Orion-NAS only)
  ****************************************************************************/
 #define ORION5X_REGS_PHYS_BASE		0xf1000000
-#define ORION5X_REGS_VIRT_BASE		IOMEM(0xfe000000)
+#define ORION5X_REGS_VIRT_BASE		IOMEM(0xfec00000)
 #define ORION5X_REGS_SIZE		SZ_1M
 
 #define ORION5X_PCIE_IO_PHYS_BASE	0xf2000000
Signature · 1 line
2.1.0.rc2
#19 lore raw

PATCH 10/10 ARM: orion/mvebu: unify debug-ll virtual addresses

Hi Arnd,

Quoted 14 lines · Arnd Bergmann

In a multiplatform configuration, enabling DEBUG_LL breaks booting on all platforms with incompatible settings. In case of the Marvell platforms of the Orion/MVEBU family, the physical addresses are all the same, we just map them at different virtual addresses, which makes it impossible to run a kernel with DEBUG_LL enabled on a combination of the merged mvebu and the legacy boardfile based platforms.

This is easily solved by using the same virtual address everywhere. I picked the address that is already used by mach-mvebu for UART0:
0xfec12000. All these platforms have a 1MB region with their internal registers, almost always at physical address 0xf1000000, so I'm updating the iotable for that entry.

Quoted 6 lines

In case of mach-dove, this is slightly trickier, as the existing mapping is 8MB and a second 8MB mapping is already at the 0xfec00000 address. I have verified from the datasheet that the last 7MB of the physical mapping are "reserved" and nothing in Linux tries to use it either. I'm putting this 1MB mapping at the same address as the others, and the second 8MB register area immediately before that.

It looks OK, but I would like to have some Tested-by on orio5x and dove as thess plaforms have still active users. As said earlier I will see if I can test the mv78x00.

Thanks,

Gregory

Quoted 108 lines
---
 arch/arm/Kconfig.debug                 |  5 +----
 arch/arm/mach-dove/include/mach/dove.h | 10 +++++-----
 arch/arm/mach-mv78xx0/mv78xx0.h        |  4 ++--
 arch/arm/mach-orion5x/orion5x.h        |  4 ++--
 4 files changed, 10 insertions(+), 13 deletions(-)
arch/arm/Kconfig.debug +1 -4
index 974cf51b5182..fe699fba10b3 100644
@@ -1599,10 +1599,7 @@ config DEBUG_UART_VIRT
 	default 0xfc705000 if DEBUG_ZTE_ZX
 	default 0xfcfe8600 if DEBUG_UART_BCM63XX
 	default 0xfd000000 if DEBUG_SPEAR3XX || DEBUG_SPEAR13XX
-	default 0xfd012000 if DEBUG_MVEBU_UART0_ALTERNATE && ARCH_MV78XX0
 	default 0xfd883000 if DEBUG_ALPINE_UART0
-	default 0xfde12000 if DEBUG_MVEBU_UART0_ALTERNATE && ARCH_DOVE
-	default 0xfe012000 if DEBUG_MVEBU_UART0_ALTERNATE && ARCH_ORION5X
 	default 0xfe017000 if DEBUG_MMP_UART2
 	default 0xfe018000 if DEBUG_MMP_UART3
 	default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART
@@ -1616,7 +1613,7 @@ config DEBUG_UART_VIRT
 	default 0xfeb31000 if DEBUG_KEYSTONE_UART1
 	default 0xfec02000 if DEBUG_SOCFPGA_UART0
 	default 0xfec02100 if DEBUG_SOCFPGA_UART1
-	default 0xfec12000 if (DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE) && ARCH_MVEBU
+	default 0xfec12000 if (DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE)
 	default 0xfec12100 if DEBUG_MVEBU_UART1_ALTERNATE
 	default 0xfec10000 if DEBUG_SIRFATLAS7_UART0
 	default 0xfec20000 if DEBUG_DAVINCI_DMx_UART0
arch/arm/mach-dove/include/mach/dove.h +5 -5
index 00f45458b3ec..89af5ea7469d 100644
@@ -20,8 +20,8 @@
  * c8000000	fdb00000	1M	Cryptographic SRAM
  * e0000000	@runtime	128M	PCIe-0 Memory space
  * e8000000	@runtime	128M	PCIe-1 Memory space
- * f1000000	fde00000	8M	on-chip south-bridge registers
- * f1800000	fe600000	8M	on-chip north-bridge registers
+ * f1000000	fec00000	1M	on-chip south-bridge registers
+ * f1800000	fe400000	8M	on-chip north-bridge registers
  * f2000000	fee00000	1M	PCIe-0 I/O space
  * f2100000	fef00000	1M	PCIe-1 I/O space
  */
@@ -44,11 +44,11 @@
 #define DOVE_SCRATCHPAD_SIZE		SZ_1M
 
 #define DOVE_SB_REGS_PHYS_BASE		0xf1000000
-#define DOVE_SB_REGS_VIRT_BASE		IOMEM(0xfde00000)
-#define DOVE_SB_REGS_SIZE		SZ_8M
+#define DOVE_SB_REGS_VIRT_BASE		IOMEM(0xfec00000)
+#define DOVE_SB_REGS_SIZE		SZ_1M
 
 #define DOVE_NB_REGS_PHYS_BASE		0xf1800000
-#define DOVE_NB_REGS_VIRT_BASE		IOMEM(0xfe600000)
+#define DOVE_NB_REGS_VIRT_BASE		IOMEM(0xfe400000)
 #define DOVE_NB_REGS_SIZE		SZ_8M
 
 #define DOVE_PCIE0_IO_PHYS_BASE		0xf2000000
arch/arm/mach-mv78xx0/mv78xx0.h +2 -2
index 2db1265ec121..c1a9a1d1b295 100644
@@ -37,7 +37,7 @@
  * fee50000	f0d00000	64K	PCIe #5 I/O space
  * fee60000	f0e00000	64K	PCIe #6 I/O space
  * fee70000	f0f00000	64K	PCIe #7 I/O space
- * fd000000	f1000000	1M	on-chip peripheral registers
+ * fec00000	f1000000	1M	on-chip peripheral registers
  */
 #define MV78XX0_CORE0_REGS_PHYS_BASE	0xf1020000
 #define MV78XX0_CORE1_REGS_PHYS_BASE	0xf1024000
@@ -49,7 +49,7 @@
 #define MV78XX0_PCIE_IO_SIZE		SZ_1M
 
 #define MV78XX0_REGS_PHYS_BASE		0xf1000000
-#define MV78XX0_REGS_VIRT_BASE		IOMEM(0xfd000000)
+#define MV78XX0_REGS_VIRT_BASE		IOMEM(0xfec00000)
 #define MV78XX0_REGS_SIZE		SZ_1M
 
 #define MV78XX0_PCIE_MEM_PHYS_BASE	0xc0000000
arch/arm/mach-orion5x/orion5x.h +2 -2
index 3364df331f01..2b66120fba86 100644
@@ -31,13 +31,13 @@
  * fc000000	device bus mappings (cs0/cs1)
  *
  * virt		phys		size
- * fe000000	f1000000	1M	on-chip peripheral registers
+ * fec00000	f1000000	1M	on-chip peripheral registers
  * fee00000	f2000000	64K	PCIe I/O space
  * fee10000	f2100000	64K	PCI I/O space
  * fd000000	f0000000	16M	PCIe WA space (Orion-1/Orion-NAS only)
  ****************************************************************************/
 #define ORION5X_REGS_PHYS_BASE		0xf1000000
-#define ORION5X_REGS_VIRT_BASE		IOMEM(0xfe000000)
+#define ORION5X_REGS_VIRT_BASE		IOMEM(0xfec00000)
 #define ORION5X_REGS_SIZE		SZ_1M
 
 #define ORION5X_PCIE_IO_PHYS_BASE	0xf2000000
Signature · 1 line
2.1.0.rc2
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#20 lore raw

cover ARM: debug-ll fixes

In reply to Arnd Bergmann
Quoted 7 lines · Arnd Bergmann

Hi everyone,

I've carried most of these patches for a very long time in my randconfig tree, and they follow up on work that Daniel Thompson did last year. Most of the changes are really trivial, and I'd like to put them into my next/randconfig branch in arm-soc for merging in 4.5.

Given the amount of breakage that we're now seeing, I'd say that this is not true. I don't believe it's been properly tested: it may have been tested against some old kernel version, but certainly not against current kernels.

It's very obvious that it's broken: running 'make defconfig' and then trying to build the resulting configuration causes errors.

Signature · 3 lines
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
#21 lore raw

cover ARM: debug-ll fixes

Quoted 9 lines · On Thursday 17 December 2015 10:50:20 Russell King - ARM Linux wrote:
Quoted 7 lines · Arnd Bergmann

Hi everyone,

I've carried most of these patches for a very long time in my randconfig tree, and they follow up on work that Daniel Thompson did last year. Most of the changes are really trivial, and I'd like to put them into my next/randconfig branch in arm-soc for merging in 4.5.

Quoted 7 lines

Given the amount of breakage that we're now seeing, I'd say that this is not true. I don't believe it's been properly tested: it may have been tested against some old kernel version, but certainly not against current kernels.

It's very obvious that it's broken: running 'make defconfig' and then trying to build the resulting configuration causes errors.

I've found out what happened now, and added a fix on top to get linux-next to build again. Do you agree with the change?

I'm still trying to figure out how to change my build test setup to avoid running into this error (or similar ones) again. I generally tend to build everything with my randconfig series applied on top, to avoid running into known bugs, but this time I got bitten by this because one of my workarounds prevented the compiler from producing the correct error message.

I'd prefer to not fold the patch into the series now, because that would require redoing a number of merges I've done on top, but I can do that if necessary.

Arnd

Quoted 1 line

From e45a1e18a57ccc2457429f3bd42d93330c0fee3c Mon Sep 17 00:00:00 2001

From: Arnd Bergmann <[email protected]>
Date: Thu, 17 Dec 2015 16:35:20 +0100
Subject: [PATCH] ARM: defconfig: use correct debug_ll settings

The debug-ll infrastructure can be configured in two ways, either by selecting a platform specific debug option, or by picking one of the generic options (8250 or pl01x typically). For compatibility with multiplatform kernels, we have changed a couple of platforms to use the former method now when they used to use the latter.

Unfortunately, this broke the defconfigs because now they still enable CONFIG_DEBUG_LL_UART_PL01X or CONFIG_DEBUG_LL_UART_8250, and we no longer configure the correct register addresses automatically.

Embarrassingly, this was only found in linux-next when the defconfig builds turned up errors for multiple people, and I had not caught those in my own tests, which were done using the randconfig fixes patchset on top, and that has a workaround to avoid a build error when the addresses are not configured.

The error was something like:

.config:2010:warning: symbol value '' invalid for DEBUG_UART_PHYS .config:2011:warning: symbol value '' invalid for DEBUG_UART_VIRT

This patch avoids the problem by removing the respective statements from the defconfig files. Any out of tree defconfig files on the platforms I have changed will have to do the same change or run into the build error above. Any users that have a full .config already set the correct DEBUG_UART_PHYS/VIRT addresses and do not need to change anything.

Fixes 4db22c1 ("ARM: debug-ll: rework integrator/versatile handling")
Fixes f06455f ("ARM: debug-ll: rework ep93xx handling")
Fixes c047f52 ("ARM: debug-ll: reorganize mvebu debug uart config")
Fixes 59bd4c3 ("ARM: debug-ll: rework lpc32xx handling")
arch/arm/configs/ep93xx_defconfig +0 -1
index a7846d6..158dde8 100644
@@ -132,6 +132,5 @@ CONFIG_DEBUG_SPINLOCK=y
 CONFIG_DEBUG_MUTEXES=y
 CONFIG_DEBUG_USER=y
 CONFIG_DEBUG_LL=y
-CONFIG_DEBUG_LL_UART_PL01X=y
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
 CONFIG_LIBCRC32C=y
arch/arm/configs/lpc32xx_defconfig +0 -1
index c100b7d..9f56ca3 100644
@@ -204,7 +204,6 @@ CONFIG_DEBUG_INFO=y
 # CONFIG_FTRACE is not set
 # CONFIG_ARM_UNWIND is not set
 CONFIG_DEBUG_LL=y
-CONFIG_DEBUG_LL_UART_8250=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_CRYPTO_ANSI_CPRNG=y
 # CONFIG_CRYPTO_HW is not set
arch/arm/configs/mv78xx0_defconfig +0 -1
index fcdffa7..a0345e1 100644
@@ -135,7 +135,6 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
 CONFIG_DEBUG_USER=y
 CONFIG_DEBUG_ERRORS=y
 CONFIG_DEBUG_LL=y
-CONFIG_DEBUG_LL_UART_8250=y
 CONFIG_CRYPTO_CBC=m
 CONFIG_CRYPTO_ECB=m
 CONFIG_CRYPTO_PCBC=m
arch/arm/configs/orion5x_defconfig +0 -1
index 6ddca88..5876ce7 100644
@@ -162,7 +162,6 @@ CONFIG_LATENCYTOP=y
 # CONFIG_FTRACE is not set
 CONFIG_DEBUG_USER=y
 CONFIG_DEBUG_LL=y
-CONFIG_DEBUG_LL_UART_8250=y
 CONFIG_CRYPTO_CBC=m
 CONFIG_CRYPTO_ECB=m
 CONFIG_CRYPTO_PCBC=m
arch/arm/configs/versatile_defconfig +0 -1
index 01f402d..64bef977 100644
@@ -82,6 +82,5 @@ CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DEBUG_USER=y
 CONFIG_DEBUG_LL=y
-CONFIG_DEBUG_LL_UART_PL01X=y
 CONFIG_FONTS=y
 CONFIG_FONT_ACORN_8x8=y
#22 lore raw

cover ARM: debug-ll fixes

In reply to Arnd Bergmann

Hi Arnd,

Quoted 6 lines · Arnd Bergmann

I've carried most of these patches for a very long time in my randconfig tree, and they follow up on work that Daniel Thompson did last year. Most of the changes are really trivial, and I'd like to put them into my next/randconfig branch in arm-soc for merging in 4.5.

Quoted 7 lines

The last patch for orion/mvebu is the only one that is slightly tricky, but it would be good to have that as part of the multiplatform conversion for orion5x/mv78xx0.

The patches are currently based on top of my randconfig branch, and there will be conflicts trying to apply them on mainline, but I can handle that inside of arm-soc.

Now this is in arm-soc/for-next, I've dropped my local commit "[DEBUG] Remove all non-shmobile DEBUG_UART_PHYS defaults", and the value of CONFIG_DEBUG_UART_PHYS stays sane when enabling DEBUG_LL in multi_v7_defconfig.

Thanks a lot!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds