aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-07-07 11:05:49 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-08-25 12:11:09 -0400
commitf2acf003cd399994172a5ec342b47741841746f1 (patch)
treefda1158862098c1ad8cfaa1fa7cc7aedc0aa7bf2 /arch/arm
parent99166883376e40717d11c98ddcb724ab966de0b6 (diff)
ARM: debug: move keystone debug to generic 8250 code
Keystone's debugging is just a copy of the old 8250_32 code with a different base address. Incorporate this into the generic 8250 debug code. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig.debug11
-rw-r--r--arch/arm/include/debug/keystone.S43
2 files changed, 8 insertions, 46 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 8a8df447670b..cd2f88e22609 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -266,6 +266,7 @@ choice
266 config DEBUG_KEYSTONE_UART0 266 config DEBUG_KEYSTONE_UART0
267 bool "Kernel low-level debugging on KEYSTONE2 using UART0" 267 bool "Kernel low-level debugging on KEYSTONE2 using UART0"
268 depends on ARCH_KEYSTONE 268 depends on ARCH_KEYSTONE
269 select DEBUG_UART_8250
269 help 270 help
270 Say Y here if you want the debug print routines to direct 271 Say Y here if you want the debug print routines to direct
271 their output to UART0 serial port on KEYSTONE2 devices. 272 their output to UART0 serial port on KEYSTONE2 devices.
@@ -273,6 +274,7 @@ choice
273 config DEBUG_KEYSTONE_UART1 274 config DEBUG_KEYSTONE_UART1
274 bool "Kernel low-level debugging on KEYSTONE2 using UART1" 275 bool "Kernel low-level debugging on KEYSTONE2 using UART1"
275 depends on ARCH_KEYSTONE 276 depends on ARCH_KEYSTONE
277 select DEBUG_UART_8250
276 help 278 help
277 Say Y here if you want the debug print routines to direct 279 Say Y here if you want the debug print routines to direct
278 their output to UART1 serial port on KEYSTONE2 devices. 280 their output to UART1 serial port on KEYSTONE2 devices.
@@ -873,8 +875,6 @@ config DEBUG_LL_INCLUDE
873 DEBUG_IMX53_UART ||\ 875 DEBUG_IMX53_UART ||\
874 DEBUG_IMX6Q_UART || \ 876 DEBUG_IMX6Q_UART || \
875 DEBUG_IMX6SL_UART 877 DEBUG_IMX6SL_UART
876 default "debug/keystone.S" if DEBUG_KEYSTONE_UART0 || \
877 DEBUG_KEYSTONE_UART1
878 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART 878 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
879 default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 879 default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1
880 default "debug/sti.S" if DEBUG_STI_UART 880 default "debug/sti.S" if DEBUG_STI_UART
@@ -903,6 +903,8 @@ config DEBUG_UART_PHYS
903 hex "Physical base address of debug UART" 903 hex "Physical base address of debug UART"
904 default 0x01c28000 if DEBUG_SUNXI_UART0 904 default 0x01c28000 if DEBUG_SUNXI_UART0
905 default 0x01c28400 if DEBUG_SUNXI_UART1 905 default 0x01c28400 if DEBUG_SUNXI_UART1
906 default 0x02530c00 if DEBUG_KEYSTONE_UART0
907 default 0x02531000 if DEBUG_KEYSTONE_UART1
906 default 0x03010fe0 if ARCH_RPC 908 default 0x03010fe0 if ARCH_RPC
907 default 0x10009000 if DEBUG_REALVIEW_STD_PORT || DEBUG_CNS3XXX || \ 909 default 0x10009000 if DEBUG_REALVIEW_STD_PORT || DEBUG_CNS3XXX || \
908 DEBUG_VEXPRESS_UART0_CA9 910 DEBUG_VEXPRESS_UART0_CA9
@@ -973,6 +975,8 @@ config DEBUG_UART_VIRT
973 default 0xfe800000 if ARCH_IOP32X 975 default 0xfe800000 if ARCH_IOP32X
974 default 0xfeb24000 if DEBUG_RK3X_UART0 976 default 0xfeb24000 if DEBUG_RK3X_UART0
975 default 0xfeb26000 if DEBUG_RK3X_UART1 977 default 0xfeb26000 if DEBUG_RK3X_UART1
978 default 0xfeb30c00 if DEBUG_KEYSTONE_UART0
979 default 0xfeb31000 if DEBUG_KEYSTONE_UART1
976 default 0xfec12000 if DEBUG_MVEBU_UART || DEBUG_MVEBU_UART_ALTERNATE 980 default 0xfec12000 if DEBUG_MVEBU_UART || DEBUG_MVEBU_UART_ALTERNATE
977 default 0xfed60000 if DEBUG_RK29_UART0 981 default 0xfed60000 if DEBUG_RK29_UART0
978 default 0xfed64000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2 982 default 0xfed64000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2
@@ -1002,7 +1006,8 @@ config DEBUG_UART_8250_WORD
1002 bool "Use 32-bit accesses for 8250 UART" 1006 bool "Use 32-bit accesses for 8250 UART"
1003 depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 1007 depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
1004 depends on DEBUG_UART_8250_SHIFT >= 2 1008 depends on DEBUG_UART_8250_SHIFT >= 2
1005 default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART 1009 default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \
1010 ARCH_KEYSTONE
1006 1011
1007config DEBUG_UART_8250_FLOW_CONTROL 1012config DEBUG_UART_8250_FLOW_CONTROL
1008 bool "Enable flow control for 8250 UART" 1013 bool "Enable flow control for 8250 UART"
diff --git a/arch/arm/include/debug/keystone.S b/arch/arm/include/debug/keystone.S
deleted file mode 100644
index 9aef9ba3f4f0..000000000000
--- a/arch/arm/include/debug/keystone.S
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 * Early serial debug output macro for Keystone SOCs
3 *
4 * Copyright 2013 Texas Instruments, Inc.
5 * Santosh Shilimkar <santosh.shilimkar@ti.com>
6 *
7 * Based on RMKs low level debug code.
8 * Copyright (C) 1994-1999 Russell King
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#include <linux/serial_reg.h>
16
17#define UART_SHIFT 2
18#if defined(CONFIG_DEBUG_KEYSTONE_UART0)
19#define UART_PHYS 0x02530c00
20#define UART_VIRT 0xfeb30c00
21#elif defined(CONFIG_DEBUG_KEYSTONE_UART1)
22#define UART_PHYS 0x02531000
23#define UART_VIRT 0xfeb31000
24#endif
25
26 .macro addruart, rp, rv, tmp
27 ldr \rv, =UART_VIRT @ physical base address
28 ldr \rp, =UART_PHYS @ virtual base address
29 .endm
30
31 .macro senduart,rd,rx
32 str \rd, [\rx, #UART_TX << UART_SHIFT]
33 .endm
34
35 .macro busyuart,rd,rx
361002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT]
37 and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
38 teq \rd, #UART_LSR_TEMT | UART_LSR_THRE
39 bne 1002b
40 .endm
41
42 .macro waituart,rd,rx
43 .endm