linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: daniel.thompson@linaro.org (Daniel Thompson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8 6/9] arm: netx: Migrate DEBUG_LL macros to shared directory
Date: Tue, 19 Aug 2014 15:48:32 +0100	[thread overview]
Message-ID: <1408459715-10151-7-git-send-email-daniel.thompson@linaro.org> (raw)
In-Reply-To: <1408459715-10151-1-git-send-email-daniel.thompson@linaro.org>

As part of the migration we introduce DEBUG_UART_PHYS/DEBUG_UART_VIRT
which default to UART1 but allow a user to configure UART2 or UART3.
We also introduce symbolic names for the registers and flags.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Arnd Bergmann <arnd.bergmann@linaro.org>
Cc: linux-arm-kernel at lists.infradead.org
---
 arch/arm/Kconfig.debug                        | 17 +++++++++++--
 arch/arm/include/debug/netx.S                 | 36 +++++++++++++++++++++++++++
 arch/arm/mach-netx/include/mach/debug-macro.S | 36 ---------------------------
 3 files changed, 51 insertions(+), 38 deletions(-)
 create mode 100644 arch/arm/include/debug/netx.S
 delete mode 100644 arch/arm/mach-netx/include/mach/debug-macro.S

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 01f4ee2..d71427e 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -447,6 +447,14 @@ choice
 		  Say Y here if you want kernel low-level debugging support
 		  on Vybrid based platforms.
 
+	config DEBUG_NETX_UART
+		bool "Kernel low-level debugging messages via NetX UART"
+		depends on ARCH_NETX
+		select DEBUG_UART_NETX
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  on Hilscher NetX based platforms.
+
 	config DEBUG_NOMADIK_UART
 		bool "Kernel low-level debugging messages via NOMADIK UART"
 		depends on ARCH_NOMADIK
@@ -1074,6 +1082,7 @@ config DEBUG_LL_INCLUDE
 				 DEBUG_IMX6SX_UART
 	default "debug/ks8695.S" if DEBUG_KS8695_UART
 	default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM
+	default "debug/netx.S" if DEBUG_NETX_UART
 	default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
 	default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART
 	default "debug/s5pv210.S" if DEBUG_S5PV210_UART
@@ -1106,6 +1115,7 @@ config DEBUG_UART_8250
 
 config DEBUG_UART_PHYS
 	hex "Physical base address of debug UART"
+	default 0x00100a00 if DEBUG_NETX_UART
 	default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0
 	default 0x01c28000 if DEBUG_SUNXI_UART0
 	default 0x01c28400 if DEBUG_SUNXI_UART1
@@ -1176,10 +1186,12 @@ config DEBUG_UART_PHYS
 	depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
 		DEBUG_LL_UART_EFM32 || \
 		DEBUG_UART_8250 || DEBUG_UART_PL01X || \
-		DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART
+		DEBUG_MSM_UART || DEBUG_NETX_UART || DEBUG_QCOM_UARTDM || \
+		DEBUG_S3C24XX_UART
 
 config DEBUG_UART_VIRT
 	hex "Virtual base address of debug UART"
+	default 0xe0000a00 if DEBUG_NETX_UART
 	default 0xe0010fe0 if ARCH_RPC
 	default 0xe1000000 if DEBUG_MSM_UART
 	default 0xf0000be0 if ARCH_EBSA110
@@ -1247,7 +1259,8 @@ config DEBUG_UART_VIRT
 	default DEBUG_UART_PHYS if !MMU
 	depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
 		DEBUG_UART_8250 || DEBUG_UART_PL01X || \
-		DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART
+		DEBUG_MSM_UART || DEBUG_NETX_UART || DEBUG_QCOM_UARTDM || \
+		DEBUG_S3C24XX_UART
 
 config DEBUG_UART_8250_SHIFT
 	int "Register offset shift for the 8250 debug UART"
diff --git a/arch/arm/include/debug/netx.S b/arch/arm/include/debug/netx.S
new file mode 100644
index 0000000..cf7522a
--- /dev/null
+++ b/arch/arm/include/debug/netx.S
@@ -0,0 +1,36 @@
+/*
+ * Debugging macro include header
+ *
+ *  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_DATA 0
+#define UART_FLAG 0x18
+#define UART_FLAG_BUSY (1 << 3)
+
+		.macro	addruart, rp, rv, tmp
+		ldr	\rp, =CONFIG_DEBUG_UART_PHYS
+		ldr	\rp, =CONFIG_DEBUG_UART_VIRT
+		.endm
+
+		.macro	senduart,rd,rx
+		str	\rd, [\rx, #UART_DATA]
+		.endm
+
+		.macro	busyuart,rd,rx
+1002:		ldr	\rd, [\rx, #UART_FLAG]
+		tst	\rd, #UART_FLAG_BUSY
+		bne	1002b
+		.endm
+
+		.macro	waituart,rd,rx
+1001:		ldr	\rd, [\rx, #UART_FLAG]
+		tst	\rd, #UART_FLAG_BUSY
+		bne	1001b
+		.endm
diff --git a/arch/arm/mach-netx/include/mach/debug-macro.S b/arch/arm/mach-netx/include/mach/debug-macro.S
deleted file mode 100644
index 247781e..0000000
--- a/arch/arm/mach-netx/include/mach/debug-macro.S
+++ /dev/null
@@ -1,36 +0,0 @@
-/* arch/arm/mach-netx/include/mach/debug-macro.S
- *
- * Debugging macro include header
- *
- *  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.
- *
-*/
-
-#include "hardware.h"
-
-		.macro	addruart, rp, rv, tmp
-		mov	\rp, #0x00000a00
-		orr	\rv, \rp, #io_p2v(0x00100000)	@ virtual
-		orr	\rp, \rp, #0x00100000		@ physical
-		.endm
-
-		.macro	senduart,rd,rx
-		str	\rd, [\rx, #0]
-		.endm
-
-		.macro	busyuart,rd,rx
-1002:		ldr	\rd, [\rx, #0x18]
-		tst	\rd, #(1 << 3)
-		bne	1002b
-		.endm
-
-		.macro	waituart,rd,rx
-1001:		ldr	\rd, [\rx, #0x18]
-		tst	\rd, #(1 << 3)
-		bne	1001b
-		.endm
-- 
1.9.3

  parent reply	other threads:[~2014-08-19 14:48 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-04 11:17 [PATCH] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X) Daniel Thompson
2014-04-04 11:39 ` Arnd Bergmann
2014-04-04 14:02   ` Daniel Thompson
2014-04-04 14:14   ` Paul Bolle
2014-04-04 14:52     ` Paul Bolle
2014-04-04 14:41 ` Russell King - ARM Linux
2014-04-04 15:18   ` Daniel Thompson
2014-04-04 14:47 ` [PATCH v2] " Daniel Thompson
2014-04-04 15:41   ` [PATCH v3] " Daniel Thompson
2014-04-07 12:48     ` Daniel Thompson
2014-04-07 15:54     ` [PATCH v4 0/5] " Daniel Thompson
2014-04-07 15:54       ` [PATCH v4 1/5] ARM: versatile: Enable DEBUG_LL_UART_PL01X Daniel Thompson
2014-04-07 15:54       ` [PATCH v4 2/5] ARM: ep93xx: " Daniel Thompson
2014-04-07 15:54       ` [PATCH v4 3/5] ARM: Conceal DEBUG_LL_UART_NONE from unsupported platforms Daniel Thompson
2014-04-07 15:54       ` [PATCH v4 4/5] arm: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX Daniel Thompson
2014-04-07 15:54       ` [PATCH v4 5/5] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X) Daniel Thompson
2014-04-24 16:00       ` [RESEND PATCH v5 0/5] " Daniel Thompson
2014-04-24 16:00         ` [RESEND PATCH v5 1/5] ARM: versatile: Enable DEBUG_LL_UART_PL01X Daniel Thompson
2014-04-24 16:00         ` [RESEND PATCH v5 2/5] ARM: ep93xx: " Daniel Thompson
2014-04-24 16:00         ` [RESEND PATCH v5 3/5] ARM: Conceal DEBUG_LL_UART_NONE from unsupported platforms Daniel Thompson
2014-04-24 16:00         ` [RESEND PATCH v5 4/5] arm: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX Daniel Thompson
2014-04-24 16:00         ` [RESEND PATCH v5 5/5] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X) Daniel Thompson
2014-05-23 15:10         ` [RESEND PATCH v5 0/5] " Daniel Thompson
2014-05-23 15:10           ` [RESEND PATCH v5 1/5] ARM: versatile: Enable DEBUG_LL_UART_PL01X Daniel Thompson
2014-05-23 15:10           ` [RESEND PATCH v5 2/5] ARM: ep93xx: " Daniel Thompson
2014-05-23 15:10           ` [RESEND PATCH v5 3/5] ARM: Conceal DEBUG_LL_UART_NONE from unsupported platforms Daniel Thompson
2014-05-23 15:35             ` Arnd Bergmann
2014-05-26 13:39               ` Arnd Bergmann
2014-05-27 13:13                 ` Daniel Thompson
2014-05-27 13:37                   ` Arnd Bergmann
2014-05-27 13:52                     ` Daniel Thompson
2014-05-23 15:10           ` [RESEND PATCH v5 4/5] arm: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX Daniel Thompson
2014-05-23 15:10           ` [RESEND PATCH v5 5/5] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X) Daniel Thompson
2014-05-27 16:00           ` [PATCH v6 0/5] " Daniel Thompson
2014-05-27 16:00             ` [PATCH v6 1/5] ARM: versatile: Enable DEBUG_LL_UART_PL01X Daniel Thompson
2014-05-27 16:00             ` [PATCH v6 2/5] ARM: ep93xx: " Daniel Thompson
2014-05-27 16:00             ` [PATCH v6 3/5] ARM: Hide DEBUG_LL_UART_NONE from unsupported platforms Daniel Thompson
2014-05-27 16:00             ` [PATCH v6 4/5] arm: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX Daniel Thompson
2014-05-27 16:00             ` [PATCH v6 5/5] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X) Daniel Thompson
2014-06-30 11:30             ` [PATCH v7 0/4] " Daniel Thompson
2014-06-30 11:30               ` [PATCH v7 1/4] ARM: versatile: Enable DEBUG_LL_UART_PL01X Daniel Thompson
2014-06-30 11:30               ` [PATCH v7 2/4] ARM: ep93xx: " Daniel Thompson
2014-06-30 11:30               ` [PATCH v7 3/4] arm: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX Daniel Thompson
2014-06-30 11:30               ` [PATCH v7 4/4] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X) Daniel Thompson
2014-06-30 13:20               ` [PATCH v7 0/4] " Arnd Bergmann
2014-07-12 10:16               ` Russell King - ARM Linux
2014-07-12 11:10                 ` Russell King - ARM Linux
2014-07-14  9:05                   ` Daniel Thompson
2014-07-14 10:39                     ` Daniel Thompson
2014-07-14 15:27                     ` Arnd Bergmann
2014-07-15 10:32                       ` Arnd Bergmann
2014-07-15 10:54                         ` Daniel Thompson
2014-08-19 14:48               ` [PATCH v8 0/9] " Daniel Thompson
2014-08-19 14:48                 ` [PATCH v8 1/9] arm: versatile: Enable DEBUG_LL_UART_PL01X Daniel Thompson
2014-08-19 14:48                 ` [PATCH v8 2/9] arm: ep93xx: " Daniel Thompson
2014-08-19 14:48                 ` [PATCH v8 3/9] arm: Remove DEBUG_LL_UART_NONE Daniel Thompson
2014-08-19 14:48                 ` [PATCH v8 4/9] arm: ks8695: Migrate debug_ll macros to shared directory Daniel Thompson
2014-08-19 14:48                 ` [PATCH v8 5/9] arm: omap1: Migrate debug_ll macros to use 8250.S Daniel Thompson
2014-08-19 14:48                 ` Daniel Thompson [this message]
2014-09-15 16:34                   ` [PATCH v8 6/9] arm: netx: Migrate DEBUG_LL macros to shared directory Paul Bolle
2014-09-15 21:47                     ` Daniel Thompson
2014-09-16 22:37                       ` Daniel Thompson
2014-08-19 14:48                 ` [PATCH v8 7/9] arm: sa1100: " Daniel Thompson
2014-08-19 14:48                 ` [PATCH v8 8/9] arm: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX Daniel Thompson
2014-08-19 14:48                 ` [PATCH v8 9/9] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X) Daniel Thompson
2014-08-19 15:16                 ` [PATCH v9 0/9] " Daniel Thompson
2014-08-19 15:16                   ` [PATCH v9 1/9] arm: versatile: Enable DEBUG_LL_UART_PL01X Daniel Thompson
2014-08-19 15:16                   ` [PATCH v9 2/9] arm: ep93xx: " Daniel Thompson
2014-08-19 15:16                   ` [PATCH v9 3/9] arm: Remove DEBUG_LL_UART_NONE Daniel Thompson
2014-08-19 15:16                   ` [PATCH v9 4/9] arm: ks8695: Migrate debug_ll macros to shared directory Daniel Thompson
2014-08-21 11:46                     ` Greg Ungerer
2014-09-01  9:04                       ` Daniel Thompson
2014-08-19 15:16                   ` [PATCH v9 5/9] arm: omap1: Migrate debug_ll macros to use 8250.S Daniel Thompson
2014-09-08 23:04                     ` Tony Lindgren
2014-08-19 15:16                   ` [PATCH v9 6/9] arm: netx: Migrate DEBUG_LL macros to shared directory Daniel Thompson
2014-08-19 15:16                   ` [PATCH v9 7/9] arm: sa1100: " Daniel Thompson
2014-08-19 15:16                   ` [PATCH v9 8/9] arm: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX Daniel Thompson
2014-08-19 15:16                   ` [PATCH v9 9/9] arm: Fix DEBUG_LL for multi-platform kernels (without PL01X) Daniel Thompson

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=1408459715-10151-7-git-send-email-daniel.thompson@linaro.org \
    --to=daniel.thompson@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).