Improvements for ARC UART
cover Improvements for ARC UART
* Move ARC_SERIAL to Kconfig
* Implement DEBUG_SERIAL in ARC_UART and
* Enable DEBUG_UART in nSIM boards
Alexey Brodkin (3):
serial: Convert ARC_SERIAL to Kconfig
serial/serial_arc: Implement debug serial
ARC: Enable debug UART on nSIM boards
configs/nsim_700_defconfig | 5 +++++ configs/nsim_700be_defconfig | 5 +++++ configs/nsim_hs38_defconfig | 5 +++++ configs/nsim_hs38be_defconfig | 5 +++++ drivers/serial/Kconfig | 16 ++++++++++++++++ drivers/serial/serial_arc.c | 26 ++++++++++++++++++++++++++ include/configs/nsim.h | 10 ---------- scripts/config_whitelist.txt | 1 - 8 files changed, 62 insertions(+), 11 deletions(-)
Signature · 1 line
2.17.0
PATCH 1/3 serial: Convert ARC_SERIAL to Kconfig
One step closer to completely Kconfig-driven target configuration in U-Boot :)
--- configs/nsim_700_defconfig | 1 + configs/nsim_700be_defconfig | 1 + configs/nsim_hs38_defconfig | 1 + configs/nsim_hs38be_defconfig | 1 + drivers/serial/Kconfig | 7 +++++++ include/configs/nsim.h | 10 ---------- scripts/config_whitelist.txt | 1 - 7 files changed, 11 insertions(+), 11 deletions(-)
configs/nsim_700_defconfig +1 -0
@@ -13,4 +13,5 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_DM=y CONFIG_DM_SERIAL=y +CONFIG_ARC_SERIAL=y CONFIG_USE_PRIVATE_LIBGCC=y
configs/nsim_700be_defconfig +1 -0
@@ -14,4 +14,5 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_DM=y CONFIG_DM_SERIAL=y +CONFIG_ARC_SERIAL=y CONFIG_USE_PRIVATE_LIBGCC=y
configs/nsim_hs38_defconfig +1 -0
@@ -14,4 +14,5 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_DM=y CONFIG_DM_SERIAL=y +CONFIG_ARC_SERIAL=y CONFIG_USE_PRIVATE_LIBGCC=y
configs/nsim_hs38be_defconfig +1 -0
@@ -15,4 +15,5 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_DM=y CONFIG_DM_SERIAL=y +CONFIG_ARC_SERIAL=y CONFIG_USE_PRIVATE_LIBGCC=y
drivers/serial/Kconfig +7 -0
@@ -425,6 +425,13 @@ config AR933X_UART tree binding to operate, please refer to the document at doc/device-tree-bindings/serial/qca,ar9330-uart.txt. +config ARC_SERIAL + bool "ARC UART support" + depends on DM_SERIAL + help + Select this to enable support for ARC UART now typically + only used in Synopsys DesignWare ARC simulators like nSIM. + config ATMEL_USART bool "Atmel USART support" help
include/configs/nsim.h +0 -10
@@ -24,16 +24,6 @@#define CONFIG_SYS_BOOTM_LEN SZ_32M#define CONFIG_SYS_LOAD_ADDR 0x82000000 -/* -* UART configuration -* -*/ -#define CONFIG_ARC_SERIAL - -/* -* Command line configuration -*/ -/* * Environment settings */
scripts/config_whitelist.txt +0 -1
@@ -47,7 +47,6 @@ CONFIG_ARCH_RMOBILE_EXTRAM_BOOT CONFIG_ARCH_TEGRA CONFIG_ARCH_USE_BUILTIN_BSWAP CONFIG_ARC_MMU_VER -CONFIG_ARC_SERIAL CONFIG_ARIES_M28_V10 CONFIG_ARMADA100 CONFIG_ARMADA100_FEC
Signature · 1 line
2.17.0
PATCH 2/3 serial/serial_arc: Implement debug serial
In reply to Alexey Brodkin--- drivers/serial/Kconfig | 9 +++++++++ drivers/serial/serial_arc.c | 26 ++++++++++++++++++++++++++ 2 files changed, 35 insertions(+)
drivers/serial/Kconfig +9 -0
@@ -197,6 +197,15 @@ config DEBUG_UART_AR933X driver will be available until the real driver model serial is running. +config DEBUG_ARC_SERIAL + bool "ARC UART" + depends on ARC_SERIAL + help + Select this to enable a debug UART using the ARC UART driver. + You will need to provide parameters to make this work. The + driver will be available until the real driver model serial is + running. + config DEBUG_UART_ATMEL bool "Atmel USART" help
drivers/serial/serial_arc.c +26 -0
@@ -130,3 +130,29 @@ U_BOOT_DRIVER(serial_arc) = { .ops = &arc_serial_ops, .flags = DM_FLAG_PRE_RELOC, }; + +#ifdef CONFIG_DEBUG_ARC_SERIAL +#include <debug_uart.h> + +static inline void _debug_uart_init (void ) +{ +struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_DEBUG_UART_BASE ; +int arc_console_baud =CONFIG_DEBUG_UART_CLOCK / (CONFIG_BAUDRATE *4 ) -1 ; + +writeb (arc_console_baud &0xff , ®s->baudl); +writeb ((arc_console_baud &0xff00 ) >>8 , ®s->baudh); +} + +static inline void _debug_uart_putc (int c) +{ +struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_DEBUG_UART_BASE ; + +while (!(readb (®s->status) &UART_TXEMPTY )) + ; + +writeb (c, ®s->data); +} + +DEBUG_UART_FUNCS + +#endif
Signature · 1 line
2.17.0
PATCH 3/3 ARC: Enable debug UART on nSIM boards
In reply to Alexey Brodkin--- configs/nsim_700_defconfig | 4 ++++ configs/nsim_700be_defconfig | 4 ++++ configs/nsim_hs38_defconfig | 4 ++++ configs/nsim_hs38be_defconfig | 4 ++++ 4 files changed, 16 insertions(+)
configs/nsim_700_defconfig +4 -0
@@ -3,6 +3,7 @@ CONFIG_TARGET_NSIM=y CONFIG_SYS_TEXT_BASE=0x81000000 CONFIG_SYS_CLK_FREQ=70000000 CONFIG_DEFAULT_DEVICE_TREE="nsim" +CONFIG_DEBUG_UART=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyARC0,115200n8"
@@ -13,5 +14,8 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_DM=y CONFIG_DM_SERIAL=y +CONFIG_DEBUG_ARC_SERIAL=y +CONFIG_DEBUG_UART_BASE=0xc0fc1000 +CONFIG_DEBUG_UART_CLOCK=70000000 CONFIG_ARC_SERIAL=y CONFIG_USE_PRIVATE_LIBGCC=y
configs/nsim_700be_defconfig +4 -0
@@ -4,6 +4,7 @@ CONFIG_TARGET_NSIM=y CONFIG_SYS_TEXT_BASE=0x81000000 CONFIG_SYS_CLK_FREQ=70000000 CONFIG_DEFAULT_DEVICE_TREE="nsim" +CONFIG_DEBUG_UART=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyARC0,115200n8"
@@ -14,5 +15,8 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_DM=y CONFIG_DM_SERIAL=y +CONFIG_DEBUG_ARC_SERIAL=y +CONFIG_DEBUG_UART_BASE=0xc0fc1000 +CONFIG_DEBUG_UART_CLOCK=70000000 CONFIG_ARC_SERIAL=y CONFIG_USE_PRIVATE_LIBGCC=y
configs/nsim_hs38_defconfig +4 -0
@@ -4,6 +4,7 @@ CONFIG_TARGET_NSIM=y CONFIG_SYS_TEXT_BASE=0x81000000 CONFIG_SYS_CLK_FREQ=70000000 CONFIG_DEFAULT_DEVICE_TREE="nsim" +CONFIG_DEBUG_UART=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyARC0,115200n8"
@@ -14,5 +15,8 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_DM=y CONFIG_DM_SERIAL=y +CONFIG_DEBUG_ARC_SERIAL=y +CONFIG_DEBUG_UART_BASE=0xc0fc1000 +CONFIG_DEBUG_UART_CLOCK=70000000 CONFIG_ARC_SERIAL=y CONFIG_USE_PRIVATE_LIBGCC=y
configs/nsim_hs38be_defconfig +4 -0
@@ -5,6 +5,7 @@ CONFIG_TARGET_NSIM=y CONFIG_SYS_TEXT_BASE=0x81000000 CONFIG_SYS_CLK_FREQ=70000000 CONFIG_DEFAULT_DEVICE_TREE="nsim" +CONFIG_DEBUG_UART=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyARC0,115200n8"
@@ -15,5 +16,8 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_DM=y CONFIG_DM_SERIAL=y +CONFIG_DEBUG_ARC_SERIAL=y +CONFIG_DEBUG_UART_BASE=0xc0fc1000 +CONFIG_DEBUG_UART_CLOCK=70000000 CONFIG_ARC_SERIAL=y CONFIG_USE_PRIVATE_LIBGCC=y
Signature · 1 line
2.17.0
cover Improvements for ARC UART
In reply to Alexey BrodkinHi Tom,
Quoted 9 lines · Alexey Brodkin
* Move
ARC_SERIALtoKconfig
* ImplementDEBUG_SERIALinARC_UARTand
* EnableDEBUG_UARTin nSIM boardsAlexey Brodkin (3):
serial: ConvertARC_SERIALtoKconfig
serial/serial_arc: Implement debug serial
ARC: Enable debug UART on nSIM boards
Quoted 9 lines
configs/nsim_700_defconfig | 5 +++++ configs/nsim_700be_defconfig | 5 +++++ configs/nsim_hs38_defconfig | 5 +++++ configs/nsim_hs38be_defconfig | 5 +++++ drivers/serial/Kconfig | 16 ++++++++++++++++ drivers/serial/serial_arc.c | 26 ++++++++++++++++++++++++++ include/configs/nsim.h | 10 ---------- scripts/config_whitelist.txt | 1 - 8 files changed, 62 insertions(+), 11 deletions(-)
Do you want to pull this series yourself or I may push it via my tree (in which case I'll add another similar series from Eugeniy, see
https://patchwork.ozlabs.org/project/uboot/list/?series=42321
which BTW is a pre-requisite because of generic ARC fixup in
https://patchwork.ozlabs.org/patch/907993/).
-Alexey
cover Improvements for ARC UART
Quoted 22 lines · Alexey Brodkin
Hi Tom,
Quoted 9 lines · Alexey Brodkin
* Move
ARC_SERIALtoKconfig
* ImplementDEBUG_SERIALinARC_UARTand
* EnableDEBUG_UARTin nSIM boardsAlexey Brodkin (3):
serial: ConvertARC_SERIALtoKconfig
serial/serial_arc: Implement debug serial
ARC: Enable debug UART on nSIM boardsQuoted 9 lines
configs/nsim_700_defconfig | 5 +++++ configs/nsim_700be_defconfig | 5 +++++ configs/nsim_hs38_defconfig | 5 +++++ configs/nsim_hs38be_defconfig | 5 +++++ drivers/serial/Kconfig | 16 ++++++++++++++++ drivers/serial/serial_arc.c | 26 ++++++++++++++++++++++++++ include/configs/nsim.h | 10 ---------- scripts/config_whitelist.txt | 1 - 8 files changed, 62 insertions(+), 11 deletions(-)
Quoted 6 lines
Do you want to pull this series yourself or I may push it via my tree (in which case I'll add another similar series from Eugeniy, see
https://patchwork.ozlabs.org/project/uboot/list/?series=42321
which BTW is a pre-requisite because of generic ARC fixup in
https://patchwork.ozlabs.org/patch/907993/).
You can do this via the your tree, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180524/eb0cdb01/attachment.sig>