ARM: debug: provide 8250 debug uart register shift configuration option
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 6 Jul 2013 22:13:15 +0000 (23:13 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 25 Aug 2013 16:11:00 +0000 (17:11 +0100)
Move the definition of the UART register shift 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 8d3bc84fb612d4e70d3ede7774fd60435935eadf..f7c0efc615c7c056b41716845f145371ee8c85a6 100644 (file)
@@ -275,6 +275,7 @@ choice
        config DEBUG_MMP_UART2
                bool "Kernel low-level debugging message via MMP UART2"
                depends on ARCH_MMP
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on MMP UART2.
@@ -282,6 +283,7 @@ choice
        config DEBUG_MMP_UART3
                bool "Kernel low-level debugging message via MMP UART3"
                depends on ARCH_MMP
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on MMP UART3.
@@ -326,6 +328,7 @@ choice
        config DEBUG_MVEBU_UART
                bool "Kernel low-level debugging messages via MVEBU UART (old bootloaders)"
                depends on ARCH_MVEBU
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on MVEBU based platforms.
@@ -344,6 +347,7 @@ choice
        config DEBUG_MVEBU_UART_ALTERNATE
                bool "Kernel low-level debugging messages via MVEBU UART (new bootloaders)"
                depends on ARCH_MVEBU
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on MVEBU based platforms.
@@ -365,6 +369,7 @@ choice
        config DEBUG_NSPIRE_CLASSIC_UART
                bool "Kernel low-level debugging via TI-NSPIRE 8250 UART"
                depends on ARCH_NSPIRE
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on TI-NSPIRE classic models.
@@ -453,6 +458,7 @@ choice
        config DEBUG_PXA_UART1
                depends on ARCH_PXA
                bool "Use PXA UART1 for low-level debug"
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on PXA UART1.
@@ -477,6 +483,7 @@ choice
                bool "Kernel low-level debugging messages via Rockchip RK29 UART0"
                depends on ARCH_ROCKCHIP
                select DEBUG_ROCKCHIP_UART
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on Rockchip based platforms.
@@ -485,6 +492,7 @@ choice
                bool "Kernel low-level debugging messages via Rockchip RK29 UART1"
                depends on ARCH_ROCKCHIP
                select DEBUG_ROCKCHIP_UART
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on Rockchip based platforms.
@@ -493,6 +501,7 @@ choice
                bool "Kernel low-level debugging messages via Rockchip RK29 UART2"
                depends on ARCH_ROCKCHIP
                select DEBUG_ROCKCHIP_UART
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on Rockchip based platforms.
@@ -501,6 +510,7 @@ choice
                bool "Kernel low-level debugging messages via Rockchip RK3X UART0"
                depends on ARCH_ROCKCHIP
                select DEBUG_ROCKCHIP_UART
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on Rockchip based platforms.
@@ -509,6 +519,7 @@ choice
                bool "Kernel low-level debugging messages via Rockchip RK3X UART1"
                depends on ARCH_ROCKCHIP
                select DEBUG_ROCKCHIP_UART
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on Rockchip based platforms.
@@ -517,6 +528,7 @@ choice
                bool "Kernel low-level debugging messages via Rockchip RK3X UART2"
                depends on ARCH_ROCKCHIP
                select DEBUG_ROCKCHIP_UART
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on Rockchip based platforms.
@@ -525,6 +537,7 @@ choice
                bool "Kernel low-level debugging messages via Rockchip RK3X UART3"
                depends on ARCH_ROCKCHIP
                select DEBUG_ROCKCHIP_UART
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on Rockchip based platforms.
@@ -587,6 +600,7 @@ choice
        config DEBUG_SUNXI_UART0
                bool "Kernel low-level debugging messages via sunXi UART0"
                depends on ARCH_SUNXI
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on Allwinner A1X based platforms on the UART0.
@@ -594,6 +608,7 @@ choice
        config DEBUG_SUNXI_UART1
                bool "Kernel low-level debugging messages via sunXi UART1"
                depends on ARCH_SUNXI
+               select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on Allwinner A1X based platforms on the UART1.
@@ -857,8 +872,17 @@ config DEBUG_LL_INCLUDE
        default "mach/debug-macro.S"
 
 config DEBUG_UART_8250
-       def_bool ARCH_EBSA110 || (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
-               ARCH_GEMINI || ARCH_RPC
+       def_bool ARCH_DOVE || ARCH_EBSA110 || \
+               (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
+               ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \
+               ARCH_IOP33X || ARCH_IXP4XX || ARCH_KIRKWOOD || \
+               ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC
+
+config DEBUG_UART_8250_SHIFT
+       int "Register offset shift for the 8250 debug UART"
+       depends on DEBUG_UART_8250
+       default 0 if FOOTBRIDGE || ARCH_IOP32X
+       default 2
 
 config DEBUG_UART_8250_FLOW_CONTROL
        bool "Enable flow control for 8250 UART"
index bca304576be0b86352a759fc1a1a0aa032007cf8..a0e6e173c5542f1291dc0925f274e7386f93c844 100644 (file)
@@ -9,6 +9,10 @@
  */
 #include <linux/serial_reg.h>
 
+#ifndef UART_SHIFT
+#define UART_SHIFT CONFIG_DEBUG_UART_8250_SHIFT
+#endif
+
                .macro  senduart,rd,rx
                strb    \rd, [\rx, #UART_TX << UART_SHIFT]
                .endm
index 6517311a1c915bfbb92c7e0b293e2adffa15b973..0d0d82062f63b66946e8c19537068e3d19f1ae10 100644 (file)
@@ -26,5 +26,4 @@
        orr     \rv, \rv, #0x00012000
        .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>
index 886fd276fcbcf719a32bae4224da52d8d41bb210..887463672b662ba3d5c34ce9643c58048bdec7c9 100644 (file)
@@ -23,6 +23,5 @@
 #endif
 
 #ifdef CONFIG_DEBUG_NSPIRE_CLASSIC_UART
-#define UART_SHIFT 2
 #include <asm/hardware/debug-8250.S>
 #endif
index e1e795aa3d7f8e530c2ff6ab5977f65c777ee8d0..f10fba50c770e0b2cdc7fba82c2880ef3093c5f1 100644 (file)
@@ -29,5 +29,4 @@
        ldr     \rv, =PXA_UART_REG_VIRT_BASE
        .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>
index cfd883e6958879e10f6993051c354dab37af83c8..80ae8cadb0647482362f4f0473834cf6863d4a89 100644 (file)
@@ -38,5 +38,4 @@
        ldr     \rv, =ROCKCHIP_UART_DEBUG_VIRT_BASE
        .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>
index 04eb56d5db2c99411eb85eaf9438fbfd6724c502..65d09816c720a56e45ca54310fe86a5abb86dc73 100644 (file)
@@ -23,5 +23,4 @@
        ldr     \rv, =SUNXI_UART_DEBUG_VIRT_BASE
        .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>
index 5929cbc59161c75b2880ce4ade87c6252d2e81c1..182a6108a2e62c682d41cee0febede6fe29b8beb 100644 (file)
@@ -15,5 +15,4 @@
        orr     \rv, \rv, #0x00012000
        .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>
index 9b66e79632a935cc1501edc9e8b9d291f53de303..984f0fa4812a1cf358b4b2f313104f8a3adad5b0 100644 (file)
@@ -17,5 +17,4 @@
                mov     \rp, \rv
                .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>
index 18130fe99f28a839840708f66c9a511b2c267b48..a209936d6d9881ea8802c7130e54e6b72fe3c5e5 100644 (file)
@@ -22,7 +22,6 @@
                orr     \rp, \rp, #0x7c000000   @ physical
                .endm
 
-#define UART_SHIFT     0
 #include <asm/hardware/debug-8250.S>
 
 #else
index cdee448dd34e055093a6505cc511539fc2be127f..2d94ea46ec640e2c73bd9458d50bb7c15b5b062e 100644 (file)
@@ -16,5 +16,4 @@
        ldr     \rv, =IO_ADDRESS(GEMINI_UART_BASE)      @ virtual
        .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>
index d869a6f67e5c97b4a913f854de0b28908bd87247..4a776ca419603e9a23b9a8591c37c5a812de4222 100644 (file)
@@ -20,5 +20,4 @@
        orr     \rp, \rp, #0x00d80000
        .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>
index 363bdf90b34d4b1ec5d9085ea26584238f68ba7a..a090573f16c8af5ad6cc395e7428e62cc9e4692a 100644 (file)
@@ -17,5 +17,4 @@
                mov     \rv, \rp
                .endm
 
-#define UART_SHIFT     0
 #include <asm/hardware/debug-8250.S>
index 361be1f6026e19e11f827f24d7e64c11c44821dc..894bf7ce857e644d0f88e90368bf0e833a96ce0c 100644 (file)
@@ -18,5 +18,4 @@
                orr     \rp, #0xff000000        @ physical
                .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>
index ff686cbc5df44d54547b4816588fe808a5bdd424..403bd35a54689b526c64e7d2e3d3878339868e09 100644 (file)
@@ -22,5 +22,4 @@
                 orr     \rp, \rp, #0xc8000000  @ physical
                 .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>
index f785d401a607d6ae518e08fd9c27f479e4a8af28..51eee02ab5e0059b273612a48147775ccc65baf2 100644 (file)
@@ -15,5 +15,4 @@
        orr     \rv, \rv, #0x00012000
        .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>
index 351bd6c849099d900dd748ac9f384c77215ecc83..11f986eb471c81334cfd3b8a69aa26a18f0a7556 100644 (file)
@@ -25,5 +25,4 @@
        ldrne   \rv, =0xF4090000
        .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>
index a7df02b049b73d4c75a6ec0b17d9d167cc66604f..0fce467ede13c25d1a534e83514f3be0f8d33ba1 100644 (file)
@@ -15,5 +15,4 @@
        orr     \rv, \rv, #0x00012000
        .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>
index f340ed8f8dd083aad9cab902935c1eb140de2bd6..52f29ef747b21a595abcc7118dd91f6811d31dd8 100644 (file)
@@ -17,5 +17,4 @@
        orr     \rv, \rv, #0x00012000
        .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>
index a92753d0daeb32a6f2c6394b77bdb96bc315e60a..fcb54508354714f1c8deea13a72b922be0d035ee 100644 (file)
@@ -18,5 +18,4 @@
                orr     \rp, \rp, #0x03000000   @ physical
                .endm
 
-#define UART_SHIFT     2
 #include <asm/hardware/debug-8250.S>