diff options
author | Arnd Bergmann <arnd@arndb.de> | 2014-11-21 07:04:06 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2014-11-21 07:04:06 -0500 |
commit | 6febbf472b6f3df1b6a137fe246ac88dcd5b2c0e (patch) | |
tree | 96d30ffad60888ff22285782950564c3eea87d0b | |
parent | 00f879bed45148612e1065ac26e46a7a39e5c8d9 (diff) | |
parent | 7a2071c58f36450fbf44a27d2e5d371c18534a25 (diff) |
Merge tag 'renesas-soc4-for-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc
Pull "Fourth Round of Renesas ARM Based SoC Updates for v3.19" from Simon Horman:
* Add early debugging support using SCIF(A)
* tag 'renesas-soc4-for-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
ARM: shmobile: Add early debugging support using SCIF(A)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | MAINTAINERS | 1 | ||||
-rw-r--r-- | arch/arm/Kconfig.debug | 80 | ||||
-rw-r--r-- | arch/arm/include/debug/renesas-scif.S | 52 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7740.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7779.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh7372.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh73a0.c | 1 |
7 files changed, 136 insertions, 1 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 3c6427190be2..617ed6a03341 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1387,6 +1387,7 @@ F: arch/arm/configs/lager_defconfig | |||
1387 | F: arch/arm/configs/mackerel_defconfig | 1387 | F: arch/arm/configs/mackerel_defconfig |
1388 | F: arch/arm/configs/marzen_defconfig | 1388 | F: arch/arm/configs/marzen_defconfig |
1389 | F: arch/arm/configs/shmobile_defconfig | 1389 | F: arch/arm/configs/shmobile_defconfig |
1390 | F: arch/arm/include/debug/renesas-scif.S | ||
1390 | F: arch/arm/mach-shmobile/ | 1391 | F: arch/arm/mach-shmobile/ |
1391 | F: drivers/sh/ | 1392 | F: drivers/sh/ |
1392 | 1393 | ||
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index a52884351e4f..e4917aebc31f 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -664,6 +664,64 @@ choice | |||
664 | Say Y here if you want kernel low-level debugging support | 664 | Say Y here if you want kernel low-level debugging support |
665 | on Rockchip RK32xx based platforms. | 665 | on Rockchip RK32xx based platforms. |
666 | 666 | ||
667 | config DEBUG_R7S72100_SCIF2 | ||
668 | bool "Kernel low-level debugging messages via SCIF2 on R7S72100" | ||
669 | depends on ARCH_R7S72100 | ||
670 | help | ||
671 | Say Y here if you want kernel low-level debugging support | ||
672 | via SCIF2 on Renesas RZ/A1H (R7S72100). | ||
673 | |||
674 | config DEBUG_RCAR_GEN1_SCIF0 | ||
675 | bool "Kernel low-level debugging messages via SCIF0 on R8A7778" | ||
676 | depends on ARCH_R8A7778 | ||
677 | help | ||
678 | Say Y here if you want kernel low-level debugging support | ||
679 | via SCIF0 on Renesas R-Car M1A (R8A7778). | ||
680 | |||
681 | config DEBUG_RCAR_GEN1_SCIF2 | ||
682 | bool "Kernel low-level debugging messages via SCIF2 on R8A7779" | ||
683 | depends on ARCH_R8A7779 | ||
684 | help | ||
685 | Say Y here if you want kernel low-level debugging support | ||
686 | via SCIF2 on Renesas R-Car H1 (R8A7779). | ||
687 | |||
688 | config DEBUG_RCAR_GEN2_SCIF0 | ||
689 | bool "Kernel low-level debugging messages via SCIF0 on R8A7790/R8A7791/R8A7793)" | ||
690 | depends on ARCH_R8A7790 || ARCH_R8A7791 || ARCH_R8A7793 | ||
691 | help | ||
692 | Say Y here if you want kernel low-level debugging support | ||
693 | via SCIF0 on Renesas R-Car H2 (R8A7790), M2-W (R8A7791), or | ||
694 | M2-N (R8A7793). | ||
695 | |||
696 | config DEBUG_RCAR_GEN2_SCIF2 | ||
697 | bool "Kernel low-level debugging messages via SCIF2 on R8A7794" | ||
698 | depends on ARCH_R8A7794 | ||
699 | help | ||
700 | Say Y here if you want kernel low-level debugging support | ||
701 | via SCIF2 on Renesas R-Car E2 (R8A7794). | ||
702 | |||
703 | config DEBUG_RMOBILE_SCIFA0 | ||
704 | bool "Kernel low-level debugging messages via SCIFA0 on R8A73A4/SH7372" | ||
705 | depends on ARCH_R8A73A4 || ARCH_SH7372 | ||
706 | help | ||
707 | Say Y here if you want kernel low-level debugging support | ||
708 | via SCIFA0 on Renesas R-Mobile APE6 (R8A73A4) or SH-Mobile | ||
709 | AP4 (SH7372). | ||
710 | |||
711 | config DEBUG_RMOBILE_SCIFA1 | ||
712 | bool "Kernel low-level debugging messages via SCIFA1 on R8A7740" | ||
713 | depends on ARCH_R8A7740 | ||
714 | help | ||
715 | Say Y here if you want kernel low-level debugging support | ||
716 | via SCIFA1 on Renesas R-Mobile A1 (R8A7740). | ||
717 | |||
718 | config DEBUG_RMOBILE_SCIFA4 | ||
719 | bool "Kernel low-level debugging messages via SCIFA4 on SH73A0" | ||
720 | depends on ARCH_SH73A0 | ||
721 | help | ||
722 | Say Y here if you want kernel low-level debugging support | ||
723 | via SCIFA4 on Renesas SH-Mobile AG5 (SH73A0). | ||
724 | |||
667 | config DEBUG_S3C_UART0 | 725 | config DEBUG_S3C_UART0 |
668 | depends on PLAT_SAMSUNG | 726 | depends on PLAT_SAMSUNG |
669 | select DEBUG_EXYNOS_UART if ARCH_EXYNOS | 727 | select DEBUG_EXYNOS_UART if ARCH_EXYNOS |
@@ -1105,6 +1163,14 @@ config DEBUG_LL_INCLUDE | |||
1105 | DEBUG_IMX6SX_UART | 1163 | DEBUG_IMX6SX_UART |
1106 | default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM | 1164 | default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM |
1107 | default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART | 1165 | default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART |
1166 | default "debug/renesas-scif.S" if DEBUG_R7S72100_SCIF2 | ||
1167 | default "debug/renesas-scif.S" if DEBUG_RCAR_GEN1_SCIF0 | ||
1168 | default "debug/renesas-scif.S" if DEBUG_RCAR_GEN1_SCIF2 | ||
1169 | default "debug/renesas-scif.S" if DEBUG_RCAR_GEN2_SCIF0 | ||
1170 | default "debug/renesas-scif.S" if DEBUG_RCAR_GEN2_SCIF2 | ||
1171 | default "debug/renesas-scif.S" if DEBUG_RMOBILE_SCIFA0 | ||
1172 | default "debug/renesas-scif.S" if DEBUG_RMOBILE_SCIFA1 | ||
1173 | default "debug/renesas-scif.S" if DEBUG_RMOBILE_SCIFA4 | ||
1108 | default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART | 1174 | default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART |
1109 | default "debug/s5pv210.S" if DEBUG_S5PV210_UART | 1175 | default "debug/s5pv210.S" if DEBUG_S5PV210_UART |
1110 | default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 | 1176 | default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 |
@@ -1199,6 +1265,12 @@ config DEBUG_UART_PHYS | |||
1199 | default 0xd4018000 if DEBUG_MMP_UART3 | 1265 | default 0xd4018000 if DEBUG_MMP_UART3 |
1200 | default 0xe0000000 if ARCH_SPEAR13XX | 1266 | default 0xe0000000 if ARCH_SPEAR13XX |
1201 | default 0xe4007000 if DEBUG_HIP04_UART | 1267 | default 0xe4007000 if DEBUG_HIP04_UART |
1268 | default 0xe6c40000 if DEBUG_RMOBILE_SCIFA0 | ||
1269 | default 0xe6c50000 if DEBUG_RMOBILE_SCIFA1 | ||
1270 | default 0xe6c80000 if DEBUG_RMOBILE_SCIFA4 | ||
1271 | default 0xe6e58000 if DEBUG_RCAR_GEN2_SCIF2 | ||
1272 | default 0xe6e60000 if DEBUG_RCAR_GEN2_SCIF0 | ||
1273 | default 0xe8008000 if DEBUG_R7S72100_SCIF2 | ||
1202 | default 0xf0000be0 if ARCH_EBSA110 | 1274 | default 0xf0000be0 if ARCH_EBSA110 |
1203 | default 0xf040ab00 if DEBUG_BRCMSTB_UART | 1275 | default 0xf040ab00 if DEBUG_BRCMSTB_UART |
1204 | default 0xf1012000 if DEBUG_MVEBU_UART_ALTERNATE | 1276 | default 0xf1012000 if DEBUG_MVEBU_UART_ALTERNATE |
@@ -1212,13 +1284,19 @@ config DEBUG_UART_PHYS | |||
1212 | default 0xff690000 if DEBUG_RK32_UART2 | 1284 | default 0xff690000 if DEBUG_RK32_UART2 |
1213 | default 0xffc02000 if DEBUG_SOCFPGA_UART | 1285 | default 0xffc02000 if DEBUG_SOCFPGA_UART |
1214 | default 0xffd82340 if ARCH_IOP13XX | 1286 | default 0xffd82340 if ARCH_IOP13XX |
1287 | default 0xffe40000 if DEBUG_RCAR_GEN1_SCIF0 | ||
1288 | default 0xffe42000 if DEBUG_RCAR_GEN1_SCIF2 | ||
1215 | default 0xfff36000 if DEBUG_HIGHBANK_UART | 1289 | default 0xfff36000 if DEBUG_HIGHBANK_UART |
1216 | default 0xfffe8600 if DEBUG_UART_BCM63XX | 1290 | default 0xfffe8600 if DEBUG_UART_BCM63XX |
1217 | default 0xfffff700 if ARCH_IOP33X | 1291 | default 0xfffff700 if ARCH_IOP33X |
1218 | depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ | 1292 | depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ |
1219 | DEBUG_LL_UART_EFM32 || \ | 1293 | DEBUG_LL_UART_EFM32 || \ |
1220 | DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \ | 1294 | DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \ |
1221 | DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \ | 1295 | DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_R7S72100_SCIF2 || \ |
1296 | DEBUG_RCAR_GEN1_SCIF0 || DEBUG_RCAR_GEN1_SCIF2 || \ | ||
1297 | DEBUG_RCAR_GEN2_SCIF0 || DEBUG_RCAR_GEN2_SCIF2 || \ | ||
1298 | DEBUG_RMOBILE_SCIFA0 || DEBUG_RMOBILE_SCIFA1 || \ | ||
1299 | DEBUG_RMOBILE_SCIFA4 || DEBUG_S3C24XX_UART || \ | ||
1222 | DEBUG_UART_BCM63XX | 1300 | DEBUG_UART_BCM63XX |
1223 | 1301 | ||
1224 | config DEBUG_UART_VIRT | 1302 | config DEBUG_UART_VIRT |
diff --git a/arch/arm/include/debug/renesas-scif.S b/arch/arm/include/debug/renesas-scif.S new file mode 100644 index 000000000000..97820a8df51a --- /dev/null +++ b/arch/arm/include/debug/renesas-scif.S | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * Renesas SCIF(A) debugging macro include header | ||
3 | * | ||
4 | * Based on r8a7790.S | ||
5 | * | ||
6 | * Copyright (C) 2012-2013 Renesas Electronics Corporation | ||
7 | * Copyright (C) 1994-1999 Russell King | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #define SCIF_PHYS CONFIG_DEBUG_UART_PHYS | ||
15 | #define SCIF_VIRT ((SCIF_PHYS & 0x00ffffff) | 0xfd000000) | ||
16 | |||
17 | #if CONFIG_DEBUG_UART_PHYS < 0xe6e00000 | ||
18 | /* SCIFA */ | ||
19 | #define FTDR 0x20 | ||
20 | #define FSR 0x14 | ||
21 | #else | ||
22 | /* SCIF */ | ||
23 | #define FTDR 0x0c | ||
24 | #define FSR 0x10 | ||
25 | #endif | ||
26 | |||
27 | #define TDFE (1 << 5) | ||
28 | #define TEND (1 << 6) | ||
29 | |||
30 | .macro addruart, rp, rv, tmp | ||
31 | ldr \rp, =SCIF_PHYS | ||
32 | ldr \rv, =SCIF_VIRT | ||
33 | .endm | ||
34 | |||
35 | .macro waituart, rd, rx | ||
36 | 1001: ldrh \rd, [\rx, #FSR] | ||
37 | tst \rd, #TDFE | ||
38 | beq 1001b | ||
39 | .endm | ||
40 | |||
41 | .macro senduart, rd, rx | ||
42 | strb \rd, [\rx, #FTDR] | ||
43 | ldrh \rd, [\rx, #FSR] | ||
44 | bic \rd, \rd, #TEND | ||
45 | strh \rd, [\rx, #FSR] | ||
46 | .endm | ||
47 | |||
48 | .macro busyuart, rd, rx | ||
49 | 1001: ldrh \rd, [\rx, #FSR] | ||
50 | tst \rd, #TEND | ||
51 | beq 1001b | ||
52 | .endm | ||
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index b77c226ab891..c3712239fe29 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
@@ -71,6 +71,7 @@ static struct map_desc r8a7740_io_desc[] __initdata = { | |||
71 | 71 | ||
72 | void __init r8a7740_map_io(void) | 72 | void __init r8a7740_map_io(void) |
73 | { | 73 | { |
74 | debug_ll_io_init(); | ||
74 | iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc)); | 75 | iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc)); |
75 | } | 76 | } |
76 | 77 | ||
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 136078ab9407..434d1504066a 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -70,6 +70,7 @@ static struct map_desc r8a7779_io_desc[] __initdata = { | |||
70 | 70 | ||
71 | void __init r8a7779_map_io(void) | 71 | void __init r8a7779_map_io(void) |
72 | { | 72 | { |
73 | debug_ll_io_init(); | ||
73 | iotable_init(r8a7779_io_desc, ARRAY_SIZE(r8a7779_io_desc)); | 74 | iotable_init(r8a7779_io_desc, ARRAY_SIZE(r8a7779_io_desc)); |
74 | } | 75 | } |
75 | 76 | ||
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 769ff008571d..322e2dc3fa36 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -60,6 +60,7 @@ static struct map_desc sh7372_io_desc[] __initdata = { | |||
60 | 60 | ||
61 | void __init sh7372_map_io(void) | 61 | void __init sh7372_map_io(void) |
62 | { | 62 | { |
63 | debug_ll_io_init(); | ||
63 | iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc)); | 64 | iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc)); |
64 | } | 65 | } |
65 | 66 | ||
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 3447ca7e90d9..fa7cab820ab9 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
@@ -58,6 +58,7 @@ static struct map_desc sh73a0_io_desc[] __initdata = { | |||
58 | 58 | ||
59 | void __init sh73a0_map_io(void) | 59 | void __init sh73a0_map_io(void) |
60 | { | 60 | { |
61 | debug_ll_io_init(); | ||
61 | iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); | 62 | iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); |
62 | } | 63 | } |
63 | 64 | ||