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

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
20 files changed:
arch/arm/Kconfig.debug
arch/arm/include/asm/hardware/debug-8250.S
arch/arm/include/debug/mvebu.S
arch/arm/include/debug/nspire.S
arch/arm/include/debug/pxa.S
arch/arm/include/debug/rockchip.S
arch/arm/include/debug/sunxi.S
arch/arm/mach-dove/include/mach/debug-macro.S
arch/arm/mach-ebsa110/include/mach/debug-macro.S
arch/arm/mach-footbridge/include/mach/debug-macro.S
arch/arm/mach-gemini/include/mach/debug-macro.S
arch/arm/mach-iop13xx/include/mach/debug-macro.S
arch/arm/mach-iop32x/include/mach/debug-macro.S
arch/arm/mach-iop33x/include/mach/debug-macro.S
arch/arm/mach-ixp4xx/include/mach/debug-macro.S
arch/arm/mach-kirkwood/include/mach/debug-macro.S
arch/arm/mach-lpc32xx/include/mach/debug-macro.S
arch/arm/mach-mv78xx0/include/mach/debug-macro.S
arch/arm/mach-orion5x/include/mach/debug-macro.S
arch/arm/mach-rpc/include/mach/debug-macro.S

index f7c0efc615c7c056b41716845f145371ee8c85a6..cf4262ec0f605e98dea5cd5cadcb30e1356acd30 100644 (file)
@@ -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
index a0e6e173c5542f1291dc0925f274e7386f93c844..ea5f1710b52410b4ccd09c5b87d49bb36e166e47 100644 (file)
@@ -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
index 0d0d82062f63b66946e8c19537068e3d19f1ae10..6309be5238e6339d6d6ed9d20695cebc38413c75 100644 (file)
  * 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>
index 887463672b662ba3d5c34ce9643c58048bdec7c9..3e9329aa17b95c29be40bda22a18247ce334f5e2 100644 (file)
@@ -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
 
index f10fba50c770e0b2cdc7fba82c2880ef3093c5f1..09e54f35789406a749184ae056e968df923f49aa 100644 (file)
  * 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>
index 80ae8cadb0647482362f4f0473834cf6863d4a89..3ad0238998201e447cd2da36bd179a5db40a3c86 100644 (file)
@@ -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>
index 65d09816c720a56e45ca54310fe86a5abb86dc73..4c3d89cfeb8fbcefcb9498f6da7c5675d1def4ca 100644 (file)
@@ -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>
index 182a6108a2e62c682d41cee0febede6fe29b8beb..9b85a81588ea944a9dd55cf2592328a0ba694753 100644 (file)
@@ -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>
index 984f0fa4812a1cf358b4b2f313104f8a3adad5b0..0cea548ce3057b447c49867c0d10b221dd352302 100644 (file)
  * 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>
index a209936d6d9881ea8802c7130e54e6b72fe3c5e5..553c47de578dcbdc9000eeb80c4d7fe179a06354 100644 (file)
 #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 */
index 2d94ea46ec640e2c73bd9458d50bb7c15b5b062e..9dabd4bfcda2fc930ac45466fc99ae8fea52970f 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.
  */
-#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>
index 4a776ca419603e9a23b9a8591c37c5a812de4222..90b5e64ee4ce39edf35fd078f01a2a1f2c27b284 100644 (file)
  * 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>
index a090573f16c8af5ad6cc395e7428e62cc9e4692a..7ea745e73f5fde7def300957f04e0afe5f95014f 100644 (file)
  * 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>
index 894bf7ce857e644d0f88e90368bf0e833a96ce0c..52781ae2f29c90194f17f400dbf81409341b551c 100644 (file)
  * 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>
index 403bd35a54689b526c64e7d2e3d3878339868e09..ff706fa2f406c9edfb633b38310ccd92576f7ce5 100644 (file)
@@ -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>
index 51eee02ab5e0059b273612a48147775ccc65baf2..011ec2526b8a7a55a2a288234f542c8e2c97fcb0 100644 (file)
@@ -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>
index 11f986eb471c81334cfd3b8a69aa26a18f0a7556..c7bb4bcbe2e201acc95f7d44f4ce111b8bb34600 100644 (file)
  * 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>
index 0fce467ede13c25d1a534e83514f3be0f8d33ba1..c8284a2171fd487e4380a5597c5e66899db4c0c9 100644 (file)
@@ -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>
index 52f29ef747b21a595abcc7118dd91f6811d31dd8..7489963fd8b4bda99419f30752f6f1057fa438e0 100644 (file)
@@ -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>
index fcb54508354714f1c8deea13a72b922be0d035ee..88a575ebd268b290d9d2d416d8cdc4ef67b71136 100644 (file)
  * 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>