aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2015-01-09 12:34:03 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-01-21 10:49:40 -0500
commit4d31e66412955b20081d6966c271a71d4abcefd7 (patch)
treef8cf99b71d85fe9e21a5ab1452996d9e908ef078 /arch/arm
parentc26b999353339c235b9e166739926d0199eeecbf (diff)
ARM: 8272/1: netx: Migrate DEBUG_LL macros to shared directory
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> Acked-by: Arnd Bergmann <arnd.bergmann@linaro.org> Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig.debug16
-rw-r--r--arch/arm/include/debug/netx.S (renamed from arch/arm/mach-netx/include/mach/debug-macro.S)22
2 files changed, 25 insertions, 13 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index ec25d746b4dd..ff43ea38fe1f 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -503,6 +503,13 @@ choice
503 Say Y here if you want kernel low-level debugging support 503 Say Y here if you want kernel low-level debugging support
504 on Vybrid based platforms. 504 on Vybrid based platforms.
505 505
506 config DEBUG_NETX_UART
507 bool "Kernel low-level debugging messages via NetX UART"
508 depends on ARCH_NETX
509 help
510 Say Y here if you want kernel low-level debugging support
511 on Hilscher NetX based platforms.
512
506 config DEBUG_NOMADIK_UART 513 config DEBUG_NOMADIK_UART
507 bool "Kernel low-level debugging messages via NOMADIK UART" 514 bool "Kernel low-level debugging messages via NOMADIK UART"
508 depends on ARCH_NOMADIK 515 depends on ARCH_NOMADIK
@@ -1231,6 +1238,7 @@ config DEBUG_LL_INCLUDE
1231 DEBUG_IMX6SX_UART 1238 DEBUG_IMX6SX_UART
1232 default "debug/ks8695.S" if DEBUG_KS8695_UART 1239 default "debug/ks8695.S" if DEBUG_KS8695_UART
1233 default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM 1240 default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM
1241 default "debug/netx.S" if DEBUG_NETX_UART
1234 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART 1242 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
1235 default "debug/renesas-scif.S" if DEBUG_R7S72100_SCIF2 1243 default "debug/renesas-scif.S" if DEBUG_R7S72100_SCIF2
1236 default "debug/renesas-scif.S" if DEBUG_RCAR_GEN1_SCIF0 1244 default "debug/renesas-scif.S" if DEBUG_RCAR_GEN1_SCIF0
@@ -1276,6 +1284,7 @@ config DEBUG_UART_BCM63XX
1276 1284
1277config DEBUG_UART_PHYS 1285config DEBUG_UART_PHYS
1278 hex "Physical base address of debug UART" 1286 hex "Physical base address of debug UART"
1287 default 0x00100a00 if DEBUG_NETX_UART
1279 default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0 1288 default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0
1280 default 0x01c28000 if DEBUG_SUNXI_UART0 1289 default 0x01c28000 if DEBUG_SUNXI_UART0
1281 default 0x01c28400 if DEBUG_SUNXI_UART1 1290 default 0x01c28400 if DEBUG_SUNXI_UART1
@@ -1364,7 +1373,8 @@ config DEBUG_UART_PHYS
1364 depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ 1373 depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
1365 DEBUG_LL_UART_EFM32 || \ 1374 DEBUG_LL_UART_EFM32 || \
1366 DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \ 1375 DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \
1367 DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_R7S72100_SCIF2 || \ 1376 DEBUG_MSM_UART || DEBUG_NETX_UART || \
1377 DEBUG_QCOM_UARTDM || DEBUG_R7S72100_SCIF2 || \
1368 DEBUG_RCAR_GEN1_SCIF0 || DEBUG_RCAR_GEN1_SCIF2 || \ 1378 DEBUG_RCAR_GEN1_SCIF0 || DEBUG_RCAR_GEN1_SCIF2 || \
1369 DEBUG_RCAR_GEN2_SCIF0 || DEBUG_RCAR_GEN2_SCIF2 || \ 1379 DEBUG_RCAR_GEN2_SCIF0 || DEBUG_RCAR_GEN2_SCIF2 || \
1370 DEBUG_RMOBILE_SCIFA0 || DEBUG_RMOBILE_SCIFA1 || \ 1380 DEBUG_RMOBILE_SCIFA0 || DEBUG_RMOBILE_SCIFA1 || \
@@ -1373,6 +1383,7 @@ config DEBUG_UART_PHYS
1373 1383
1374config DEBUG_UART_VIRT 1384config DEBUG_UART_VIRT
1375 hex "Virtual base address of debug UART" 1385 hex "Virtual base address of debug UART"
1386 default 0xe0000a00 if DEBUG_NETX_UART
1376 default 0xe0010fe0 if ARCH_RPC 1387 default 0xe0010fe0 if ARCH_RPC
1377 default 0xe1000000 if DEBUG_MSM_UART 1388 default 0xe1000000 if DEBUG_MSM_UART
1378 default 0xf0000be0 if ARCH_EBSA110 1389 default 0xf0000be0 if ARCH_EBSA110
@@ -1449,7 +1460,8 @@ config DEBUG_UART_VIRT
1449 default DEBUG_UART_PHYS if !MMU 1460 default DEBUG_UART_PHYS if !MMU
1450 depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ 1461 depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
1451 DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \ 1462 DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \
1452 DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \ 1463 DEBUG_MSM_UART || DEBUG_NETX_UART || \
1464 DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \
1453 DEBUG_UART_BCM63XX || DEBUG_ASM9260_UART 1465 DEBUG_UART_BCM63XX || DEBUG_ASM9260_UART
1454 1466
1455config DEBUG_UART_8250_SHIFT 1467config DEBUG_UART_8250_SHIFT
diff --git a/arch/arm/mach-netx/include/mach/debug-macro.S b/arch/arm/include/debug/netx.S
index 247781e096e2..81e1b2af70f7 100644
--- a/arch/arm/mach-netx/include/mach/debug-macro.S
+++ b/arch/arm/include/debug/netx.S
@@ -1,5 +1,4 @@
1/* arch/arm/mach-netx/include/mach/debug-macro.S 1/*
2 *
3 * Debugging macro include header 2 * Debugging macro include header
4 * 3 *
5 * Copyright (C) 1994-1999 Russell King 4 * Copyright (C) 1994-1999 Russell King
@@ -11,26 +10,27 @@
11 * 10 *
12*/ 11*/
13 12
14#include "hardware.h" 13#define UART_DATA 0
14#define UART_FLAG 0x18
15#define UART_FLAG_BUSY (1 << 3)
15 16
16 .macro addruart, rp, rv, tmp 17 .macro addruart, rp, rv, tmp
17 mov \rp, #0x00000a00 18 ldr \rp, =CONFIG_DEBUG_UART_PHYS
18 orr \rv, \rp, #io_p2v(0x00100000) @ virtual 19 ldr \rv, =CONFIG_DEBUG_UART_VIRT
19 orr \rp, \rp, #0x00100000 @ physical
20 .endm 20 .endm
21 21
22 .macro senduart,rd,rx 22 .macro senduart,rd,rx
23 str \rd, [\rx, #0] 23 str \rd, [\rx, #UART_DATA]
24 .endm 24 .endm
25 25
26 .macro busyuart,rd,rx 26 .macro busyuart,rd,rx
271002: ldr \rd, [\rx, #0x18] 271002: ldr \rd, [\rx, #UART_FLAG]
28 tst \rd, #(1 << 3) 28 tst \rd, #UART_FLAG_BUSY
29 bne 1002b 29 bne 1002b
30 .endm 30 .endm
31 31
32 .macro waituart,rd,rx 32 .macro waituart,rd,rx
331001: ldr \rd, [\rx, #0x18] 331001: ldr \rd, [\rx, #UART_FLAG]
34 tst \rd, #(1 << 3) 34 tst \rd, #UART_FLAG_BUSY
35 bne 1001b 35 bne 1001b
36 .endm 36 .endm