From: rmk+kernel@arm.linux.org.uk (Russell King)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC v2 07/14] ARM: debug: add support for word accesses to debug/8250.S
Date: Tue, 16 Jul 2013 17:40:12 +0100 [thread overview]
Message-ID: <E1Uz8IO-00047s-LQ@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20130716163243.GY21614@n2100.arm.linux.org.uk>
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>
---
arch/arm/Kconfig.debug | 14 ++++++++++++--
arch/arm/include/debug/8250.S | 24 +++++++++++++++++++++---
arch/arm/include/debug/8250_32.S | 27 ---------------------------
arch/arm/include/debug/picoxcell.S | 19 -------------------
arch/arm/include/debug/socfpga.S | 21 ---------------------
5 files changed, 33 insertions(+), 72 deletions(-)
delete mode 100644 arch/arm/include/debug/8250_32.S
delete mode 100644 arch/arm/include/debug/picoxcell.S
delete mode 100644 arch/arm/include/debug/socfpga.S
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 0ba460d..0e8202e 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -451,6 +451,7 @@ choice
config DEBUG_PICOXCELL_UART
depends on ARCH_PICOXCELL
bool "Use PicoXcell UART for low-level debug"
+ select DEBUG_UART_8250
help
Say Y here if you want kernel low-level debugging support
on PicoXcell based platforms.
@@ -593,6 +594,7 @@ choice
config DEBUG_SOCFPGA_UART
depends on ARCH_SOCFPGA
bool "Use SOCFPGA UART for low-level debug"
+ select DEBUG_UART_8250
help
Say Y here if you want kernel low-level debugging support
on SOCFPGA based platforms.
@@ -851,9 +853,7 @@ config DEBUG_LL_INCLUDE
default "debug/nomadik.S" if DEBUG_NOMADIK_UART
default "debug/nspire.S" if DEBUG_NSPIRE_CX_UART
default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
- default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1
- default "debug/socfpga.S" if DEBUG_SOCFPGA_UART
default "debug/sti.S" if DEBUG_STI_UART
default "debug/tegra.S" if DEBUG_TEGRA_UART
default "debug/u300.S" if DEBUG_U300_UART
@@ -886,6 +886,7 @@ config DEBUG_UART_PHYS
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 0xc8000000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN
default 0xc8000003 if ARCH_IXP4XX && CPU_BIG_ENDIAN
@@ -897,6 +898,7 @@ config DEBUG_UART_PHYS
default 0xf1012000 if ARCH_DOVE || ARCH_KIRKWOOD || ARCH_MV78XX0 || \
ARCH_ORION5X
default 0xfe800000 if ARCH_IOP32X
+ default 0xffc02000 if DEBUG_SOCFPGA_UART
default 0xffd82340 if ARCH_IOP13XX
default 0xfffff700 if ARCH_IOP33X
depends on DEBUG_UART_8250
@@ -915,6 +917,7 @@ config DEBUG_UART_VIRT
default 0xfe012000 if ARCH_ORION5X
default 0xfe017000 if DEBUG_MMP_UART2
default 0xfe018000 if DEBUG_MMP_UART3
+ default 0xfe230000 if DEBUG_PICOXCELL_UART
default 0xfe800000 if ARCH_IOP32X
default 0xfeb24000 if DEBUG_RK3X_UART0
default 0xfeb26000 if DEBUG_RK3X_UART1
@@ -922,6 +925,7 @@ config DEBUG_UART_VIRT
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 0xfec02000 if DEBUG_SOCFPGA_UART
default 0xfed12000 if ARCH_KIRKWOOD
default 0xfee003f8 if FOOTBRIDGE
default 0xfee20000 if DEBUG_NSPIRE_CLASSIC_UART
@@ -937,6 +941,12 @@ config DEBUG_UART_8250_SHIFT
default 0 if FOOTBRIDGE || ARCH_IOP32X
default 2
+config DEBUG_UART_8250_WORD
+ bool "Use 32-bit accesses for 8250 UART"
+ depends on DEBUG_UART_8250
+ depends on DEBUG_UART_8250_SHIFT >= 2
+ default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART
+
config DEBUG_UART_8250_FLOW_CONTROL
bool "Enable flow control for 8250 UART"
depends on DEBUG_UART_8250
diff --git a/arch/arm/include/debug/8250.S b/arch/arm/include/debug/8250.S
index 92cab39..7a2baf9 100644
--- a/arch/arm/include/debug/8250.S
+++ b/arch/arm/include/debug/8250.S
@@ -14,14 +14,32 @@
ldr \rv, =CONFIG_DEBUG_UART_VIRT
.endm
+#ifdef CONFIG_DEBUG_UART_8250_WORD
+ .macro store, rd, rx:vararg
+ str \rd, \rx
+ .endm
+
+ .macro load, rd, rx:vararg
+ ldr \rd, \rx
+ .endm
+#else
+ .macro store, rd, rx:vararg
+ strb \rd, \rx
+ .endm
+
+ .macro load, rd, rx:vararg
+ ldrb \rd, \rx
+ .endm
+#endif
+
#define UART_SHIFT CONFIG_DEBUG_UART_8250_SHIFT
.macro senduart,rd,rx
- strb \rd, [\rx, #UART_TX << UART_SHIFT]
+ store \rd, [\rx, #UART_TX << UART_SHIFT]
.endm
.macro busyuart,rd,rx
-1002: ldrb \rd, [\rx, #UART_LSR << UART_SHIFT]
+1002: load \rd, [\rx, #UART_LSR << UART_SHIFT]
and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
teq \rd, #UART_LSR_TEMT | UART_LSR_THRE
bne 1002b
@@ -29,7 +47,7 @@
.macro waituart,rd,rx
#ifdef CONFIG_DEBUG_UART_8250_FLOW_CONTROL
-1001: ldrb \rd, [\rx, #UART_MSR << UART_SHIFT]
+1001: load \rd, [\rx, #UART_MSR << UART_SHIFT]
tst \rd, #UART_MSR_CTS
beq 1001b
#endif
diff --git a/arch/arm/include/debug/8250_32.S b/arch/arm/include/debug/8250_32.S
deleted file mode 100644
index 8db01ee..0000000
--- a/arch/arm/include/debug/8250_32.S
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2011 Picochip Ltd., Jamie Iles
- *
- * 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
- * published by the Free Software Foundation.
- *
- * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit
- * accesses to the 8250.
- */
-
-#include <linux/serial_reg.h>
-
- .macro senduart,rd,rx
- str \rd, [\rx, #UART_TX << UART_SHIFT]
- .endm
-
- .macro busyuart,rd,rx
-1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT]
- and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
- teq \rd, #UART_LSR_TEMT | UART_LSR_THRE
- bne 1002b
- .endm
-
- /* The UART's don't have any flow control IO's wired up. */
- .macro waituart,rd,rx
- .endm
diff --git a/arch/arm/include/debug/picoxcell.S b/arch/arm/include/debug/picoxcell.S
deleted file mode 100644
index bc1f07c..0000000
--- a/arch/arm/include/debug/picoxcell.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (c) 2011 Picochip Ltd., Jamie Iles
- *
- * 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
- * published by the Free Software Foundation.
- *
- */
-
-#define UART_SHIFT 2
-#define PICOXCELL_UART1_BASE 0x80230000
-#define PHYS_TO_IO(x) (((x) & 0x00ffffff) | 0xfe000000)
-
- .macro addruart, rp, rv, tmp
- ldr \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE)
- ldr \rp, =PICOXCELL_UART1_BASE
- .endm
-
-#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 966b2f9..0000000
--- a/arch/arm/include/debug/socfpga.S
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 1994-1999 Russell King
- * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
- *
- * 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
- * published by the Free Software Foundation.
- */
-
-#define UART_SHIFT 2
-#define DEBUG_LL_UART_OFFSET 0x00002000
-
- .macro addruart, rp, rv, tmp
- mov \rp, #DEBUG_LL_UART_OFFSET
- orr \rp, \rp, #0x00c00000
- orr \rv, \rp, #0xfe000000 @ virtual base
- orr \rp, \rp, #0xff000000 @ physical base
- .endm
-
-#include "8250_32.S"
-
--
1.7.4.4
next prev parent reply other threads:[~2013-07-16 16:40 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-16 16:32 [PATCH RFC v2 0/14] Clean up debugging support Russell King - ARM Linux
2013-07-16 16:34 ` [PATCH RFC v2 01/14] ARM: debug: fix wording error in DEBUG_LL_UART_NONE option help Russell King
2013-07-16 16:35 ` [PATCH RFC v2 02/14] ARM: debug: clean up low level kernel debugging selection Russell King
2013-07-16 16:36 ` [PATCH RFC v2 03/14] ARM: debug: provide 8250 debug uart flow control configuration option Russell King
2013-07-16 16:37 ` [PATCH RFC v2 04/14] ARM: debug: provide 8250 debug uart register shift " Russell King
2013-07-16 18:38 ` Santosh Shilimkar
2013-07-16 19:16 ` Russell King - ARM Linux
2013-07-16 19:24 ` Russell King - ARM Linux
2013-07-16 20:09 ` Santosh Shilimkar
2013-07-16 16:38 ` [PATCH RFC v2 05/14] ARM: debug: provide 8250 debug uart phys/virt address configuration options Russell King
2013-07-16 16:39 ` [PATCH RFC v2 06/14] ARM: debug: move 8250 debug include into arch/arm/include/debug/ Russell King
2013-07-16 16:40 ` Russell King [this message]
2013-07-16 16:41 ` [PATCH RFC v2 08/14] ARM: debug: provide PL01x debug uart phys/virt address configuration options Russell King
2013-07-17 9:26 ` Pawel Moll
2013-07-16 16:42 ` [PATCH RFC v2 09/14] ARM: debug: move PL01X debug include into arch/arm/include/debug/ Russell King
2013-07-16 16:43 ` [PATCH RFC v2 10/14] ARM: debug: provide generic option choices for 8250 and PL01x ports Russell King
2013-07-16 16:44 ` [PATCH RFC v2 11/14] ARM: debug: remove DEBUG_ROCKCHIP_UART Russell King
2013-07-16 16:45 ` [PATCH RFC v2 12/14] ARM: debug: move keystone debug to generic 8250 code Russell King
2013-07-16 18:35 ` Santosh Shilimkar
2013-07-16 16:46 ` [PATCH RFC v2 13/14] ARM: debug: move davinci " Russell King
2013-07-17 12:05 ` Sekhar Nori
2013-07-17 17:02 ` Russell King - ARM Linux
2013-07-18 14:08 ` Sekhar Nori
2013-07-16 16:47 ` [PATCH RFC v2 14/14] ARM: debug: move Spear debug to generic PL01x code Russell King
2013-07-17 5:18 ` Viresh Kumar
2013-07-16 23:36 ` [PATCH RFC v2 0/14] Clean up debugging support H Hartley Sweeten
2013-07-17 17:04 ` Russell King - ARM Linux
2013-07-17 17:51 ` H Hartley Sweeten
2013-07-20 16:43 ` Andrew Lunn
2013-07-22 11:06 ` Russell King - ARM Linux
2013-07-22 15:53 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1Uz8IO-00047s-LQ@rmk-PC.arm.linux.org.uk \
--to=rmk+kernel@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.