Skip to content

Commit 58d0398

Browse files
niejarndb
authored andcommitted
ARM: zx: add low level debug support for zx296702
Use the UART0 peripheral for low level debug. Only the UART port 0 is currently supported. Signed-off-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent acede51 commit 58d0398

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

‎arch/arm/Kconfig.debug‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,18 @@ choice
11661166
For more details about semihosting, please see
11671167
chapter 8 of DUI0203I_rvct_developer_guide.pdf from ARM Ltd.
11681168

1169+
config DEBUG_ZTE_ZX
1170+
bool "Use ZTE ZX UART"
1171+
select DEBUG_UART_PL01X
1172+
depends on ARCH_ZX
1173+
help
1174+
Say Y here if you are enabling ZTE ZX296702 SOC and need
1175+
debug uart support.
1176+
1177+
This option is preferred over the platform specific
1178+
options; the platform specific options are deprecated
1179+
and will be soon removed.
1180+
11691181
config DEBUG_LL_UART_8250
11701182
bool "Kernel low-level debugging via 8250 UART"
11711183
help
@@ -1346,6 +1358,7 @@ config DEBUG_UART_PHYS
13461358
default 0x02531000 if DEBUG_KEYSTONE_UART1
13471359
default 0x03010fe0 if ARCH_RPC
13481360
default 0x07000000 if DEBUG_SUN9I_UART0
1361+
default 0x09405000 if DEBUG_ZTE_ZX
13491362
default 0x10009000 if DEBUG_REALVIEW_STD_PORT || \
13501363
DEBUG_VEXPRESS_UART0_CA9
13511364
default 0x1010c000 if DEBUG_REALVIEW_PB1176_PORT
@@ -1477,6 +1490,7 @@ config DEBUG_UART_VIRT
14771490
default 0xfb009000 if DEBUG_REALVIEW_STD_PORT
14781491
default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT
14791492
default 0xfc40ab00 if DEBUG_BRCMSTB_UART
1493+
default 0xfc705000 if DEBUG_ZTE_ZX
14801494
default 0xfcfe8600 if DEBUG_UART_BCM63XX
14811495
default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX
14821496
default 0xfd000000 if ARCH_SPEAR13XX

‎arch/arm/include/debug/pl01x.S‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
*/
1313
#include <linux/amba/serial.h>
1414

15+
#ifdef CONFIG_DEBUG_ZTE_ZX
16+
#undef UART01x_DR
17+
#undef UART01x_FR
18+
#define UART01x_DR 0x04
19+
#define UART01x_FR 0x14
20+
#endif
21+
1522
#ifdef CONFIG_DEBUG_UART_PHYS
1623
.macro addruart, rp, rv, tmp
1724
ldr \rp, =CONFIG_DEBUG_UART_PHYS

0 commit comments

Comments
 (0)