aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/debug
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-07-07 06:42:46 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-08-25 12:11:03 -0400
commit0b4cccbec60678212eccdb42dc1e1c233ddf7092 (patch)
tree6459ff818dec42f9e640bc3a6b4ab149f92b53cd /arch/arm/include/debug
parent2facbc88733b34e1f992cde054c88b8e07607043 (diff)
ARM: debug: add support for word accesses to debug/8250.S
Add 32-bit word access support to debug/8250.S and convert Picoxcell and SoCFPGA to this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/debug')
-rw-r--r--arch/arm/include/debug/8250.S24
-rw-r--r--arch/arm/include/debug/8250_32.S27
-rw-r--r--arch/arm/include/debug/picoxcell.S19
-rw-r--r--arch/arm/include/debug/socfpga.S21
4 files changed, 21 insertions, 70 deletions
diff --git a/arch/arm/include/debug/8250.S b/arch/arm/include/debug/8250.S
index 92cab395677a..7a2baf913aa0 100644
--- a/arch/arm/include/debug/8250.S
+++ b/arch/arm/include/debug/8250.S
@@ -14,14 +14,32 @@
14 ldr \rv, =CONFIG_DEBUG_UART_VIRT 14 ldr \rv, =CONFIG_DEBUG_UART_VIRT
15 .endm 15 .endm
16 16
17#ifdef CONFIG_DEBUG_UART_8250_WORD
18 .macro store, rd, rx:vararg
19 str \rd, \rx
20 .endm
21
22 .macro load, rd, rx:vararg
23 ldr \rd, \rx
24 .endm
25#else
26 .macro store, rd, rx:vararg
27 strb \rd, \rx
28 .endm
29
30 .macro load, rd, rx:vararg
31 ldrb \rd, \rx
32 .endm
33#endif
34
17#define UART_SHIFT CONFIG_DEBUG_UART_8250_SHIFT 35#define UART_SHIFT CONFIG_DEBUG_UART_8250_SHIFT
18 36
19 .macro senduart,rd,rx 37 .macro senduart,rd,rx
20 strb \rd, [\rx, #UART_TX << UART_SHIFT] 38 store \rd, [\rx, #UART_TX << UART_SHIFT]
21 .endm 39 .endm
22 40
23 .macro busyuart,rd,rx 41 .macro busyuart,rd,rx
241002: ldrb \rd, [\rx, #UART_LSR << UART_SHIFT] 421002: load \rd, [\rx, #UART_LSR << UART_SHIFT]
25 and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE 43 and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
26 teq \rd, #UART_LSR_TEMT | UART_LSR_THRE 44 teq \rd, #UART_LSR_TEMT | UART_LSR_THRE
27 bne 1002b 45 bne 1002b
@@ -29,7 +47,7 @@
29 47
30 .macro waituart,rd,rx 48 .macro waituart,rd,rx
31#ifdef CONFIG_DEBUG_UART_8250_FLOW_CONTROL 49#ifdef CONFIG_DEBUG_UART_8250_FLOW_CONTROL
321001: ldrb \rd, [\rx, #UART_MSR << UART_SHIFT] 501001: load \rd, [\rx, #UART_MSR << UART_SHIFT]
33 tst \rd, #UART_MSR_CTS 51 tst \rd, #UART_MSR_CTS
34 beq 1001b 52 beq 1001b
35#endif 53#endif
diff --git a/arch/arm/include/debug/8250_32.S b/arch/arm/include/debug/8250_32.S
deleted file mode 100644
index 8db01eeabbb4..000000000000
--- a/arch/arm/include/debug/8250_32.S
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * Copyright (c) 2011 Picochip Ltd., Jamie Iles
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit
9 * accesses to the 8250.
10 */
11
12#include <linux/serial_reg.h>
13
14 .macro senduart,rd,rx
15 str \rd, [\rx, #UART_TX << UART_SHIFT]
16 .endm
17
18 .macro busyuart,rd,rx
191002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT]
20 and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
21 teq \rd, #UART_LSR_TEMT | UART_LSR_THRE
22 bne 1002b
23 .endm
24
25 /* The UART's don't have any flow control IO's wired up. */
26 .macro waituart,rd,rx
27 .endm
diff --git a/arch/arm/include/debug/picoxcell.S b/arch/arm/include/debug/picoxcell.S
deleted file mode 100644
index bc1f07c49cd4..000000000000
--- a/arch/arm/include/debug/picoxcell.S
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * Copyright (c) 2011 Picochip Ltd., Jamie Iles
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 */
9
10#define UART_SHIFT 2
11#define PICOXCELL_UART1_BASE 0x80230000
12#define PHYS_TO_IO(x) (((x) & 0x00ffffff) | 0xfe000000)
13
14 .macro addruart, rp, rv, tmp
15 ldr \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE)
16 ldr \rp, =PICOXCELL_UART1_BASE
17 .endm
18
19#include "8250_32.S"
diff --git a/arch/arm/include/debug/socfpga.S b/arch/arm/include/debug/socfpga.S
deleted file mode 100644
index 966b2f994946..000000000000
--- a/arch/arm/include/debug/socfpga.S
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * Copyright (C) 1994-1999 Russell King
3 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#define UART_SHIFT 2
11#define DEBUG_LL_UART_OFFSET 0x00002000
12
13 .macro addruart, rp, rv, tmp
14 mov \rp, #DEBUG_LL_UART_OFFSET
15 orr \rp, \rp, #0x00c00000
16 orr \rv, \rp, #0xfe000000 @ virtual base
17 orr \rp, \rp, #0xff000000 @ physical base
18 .endm
19
20#include "8250_32.S"
21