]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: debug: provide PL01x debug uart phys/virt address configuration options
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 7 Jul 2013 11:32:16 +0000 (12:32 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 25 Aug 2013 16:11:05 +0000 (17:11 +0100)
Move the definition of the UART register addresses out of the platform
specific header files into the Kconfig files.

Acked-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 files changed:
arch/arm/Kconfig.debug
arch/arm/include/asm/hardware/debug-pl01x.S
arch/arm/include/debug/bcm2835.S
arch/arm/include/debug/cns3xxx.S
arch/arm/include/debug/highbank.S
arch/arm/include/debug/mxs.S
arch/arm/include/debug/nomadik.S
arch/arm/include/debug/nspire.S
arch/arm/include/debug/u300.S
arch/arm/include/debug/vexpress.S
arch/arm/mach-ep93xx/include/mach/debug-macro.S
arch/arm/mach-integrator/include/mach/debug-macro.S
arch/arm/mach-realview/include/mach/debug-macro.S
arch/arm/mach-versatile/include/mach/debug-macro.S

index 09e70090cfdcf5ee96be53704e8460debcbca916..f9573d9a6d96f7d5d2f406803dc2161d4496152e 100644 (file)
@@ -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"
index f9fd083eff630dd29b0710d603c11447919b9d54..9d1e286cecfdc47d94ff25b5ec8d7dd24951edd8 100644 (file)
 */
 #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
index aed9199bd84732498f6bc692a3254262ed219b64..726e069429338e368eb93b91a7094318cdb6df9b 100644 (file)
  * 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>
index d04c150baa1c4001e89baae7d46e4f7963aa1c66..2d5fb519df2bc5c0a8089895c15c948d70f81ee7 100644 (file)
@@ -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>
index 8cad4322a5a23d660a9465efafc31911d033b9f6..3c6f63ff0d3733fb0a3b973f8fd8c486408fbb01 100644 (file)
@@ -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>
index d86951551ca1b8afe31d82981b156e9b6579aed5..8a10ed264b0faeb3261e5ea1ae6cb1a6541faabc 100644 (file)
  * 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>
index 735417922ce2267767fdbebd1f8af87fe1662363..a6d238eba216b03f6bc419df2d2d38b76072f58a 100644 (file)
@@ -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>
index 9c2fbeceedd0efd0ee4057b3974f9ca28162cf47..fc17e50cc6d45d156849c0b4d929130133f88168 100644 (file)
@@ -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
index 6f04f08a203c252e8394b337d16d3f413484e76a..58b9d6286cd451f4b18d3e55e248cf0d2e5a5361 100644 (file)
@@ -4,15 +4,4 @@
  * Debugging macro include header.
  * Author: Linus Walleij <linus.walleij@stericsson.com>
  */
-#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>
index acafb229e2b691d4a4a467a3f0a17aba37c21a5d..114bf4cc6ea11acb27e94e14f20269b074c37e95 100644 (file)
                .endm
 
 #include <asm/hardware/debug-pl01x.S>
-
-#elif defined(CONFIG_DEBUG_VEXPRESS_UART0_CA9)
-
-               .macro  addruart,rp,rv,tmp
-               mov     \rp, #DEBUG_LL_UART_OFFSET
-               orr     \rv, \rp, #DEBUG_LL_VIRT_BASE
-               orr     \rp, \rp, #DEBUG_LL_PHYS_BASE
-               .endm
-
-#include <asm/hardware/debug-pl01x.S>
-
-#elif defined(CONFIG_DEBUG_VEXPRESS_UART0_RS1)
-
-               .macro  addruart,rp,rv,tmp
-               mov     \rp, #DEBUG_LL_UART_OFFSET_RS1
-               orr     \rv, \rp, #DEBUG_LL_VIRT_BASE
-               orr     \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1
-               .endm
-
-#include <asm/hardware/debug-pl01x.S>
-
-#elif defined(CONFIG_DEBUG_VEXPRESS_UART0_CRX)
-
-               .macro  addruart,rp,tmp,tmp2
-               ldr     \rp, =DEBUG_LL_UART_PHYS_CRX
-               .endm
-
-#include <asm/hardware/debug-pl01x.S>
-
-#else /* CONFIG_DEBUG_LL_UART_NONE */
-
-               .macro  addruart, rp, rv, tmp
-               /* Safe dummy values */
-               mov     \rp, #0
-               mov     \rv, #DEBUG_LL_VIRT_BASE
-               .endm
-
-               .macro  senduart,rd,rx
-               .endm
-
-               .macro  waituart,rd,rx
-               .endm
-
-               .macro  busyuart,rd,rx
-               .endm
-
 #endif
index af54e43132cf2743b9736fadafc827a26844aac1..a1bfe4cbf74ad916cd249b7450518a7ab6205d60 100644 (file)
@@ -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>
index 411b116077e4376b7be3e1807448f2dc4a3be97a..03ee0fd88605a9c618f2c74ea168ab029e17b016 100644 (file)
  * 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>
index 8cc372dc66a8e19b60bff06034d96feacbad4349..99488f4a7d4175e3836f2ec5d710bd4a8faba8cf 100644 (file)
@@ -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>
index d0fbd7f1cb0065557610560acfe38fe08f7daa5f..c25697774d10d84569e8b64f035b140e1bd3e90e 100644 (file)
  * 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>