Commit 9515e41d38cc81046c9bc5c766552ce5e278b263

Authored by Alexey Brodkin
1 parent 26d4d77035

ARC: nSIM: switch from ARC UART to DW UART

Since v2019.06 DesingWare nSIM supports DesignWare UART simulation
and so we may switch from pretty unusual ARC UART to much more standard
DesignWare UART (which in case of U-Boot is just an ordinary 16650 UART).

This among other things makes built dinaries compatible with our other
platforms to name a few: FPGA-based HAPS boards, QEMU and even ZeBU.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

Showing 5 changed files with 23 additions and 21 deletions Side-by-side Diff

arch/arc/dts/nsim.dts
1 1 // SPDX-License-Identifier: GPL-2.0+
2 2 /*
3   - * Copyright (C) 2015-2016 Synopsys, Inc. (www.synopsys.com)
  3 + * Copyright (C) 2015-2016, 2020 Synopsys, Inc. (www.synopsys.com)
4 4 */
5 5 /dts-v1/;
6 6  
... ... @@ -10,7 +10,7 @@
10 10 model = "snps,nsim";
11 11  
12 12 aliases {
13   - console = &arcuart0;
  13 + console = &uart0;
14 14 };
15 15  
16 16 cpu_card {
... ... @@ -22,9 +22,11 @@
22 22 };
23 23 };
24 24  
25   - arcuart0: serial@0xc0fc1000 {
26   - compatible = "snps,arc-uart";
27   - reg = <0xc0fc1000 0x100>;
  25 + uart0: serial@f0000000 {
  26 + compatible = "snps,dw-apb-uart";
  27 + reg = <0xf0000000 0x1000>;
  28 + reg-shift = <2>;
  29 + reg-io-width = <4>;
28 30 clock-frequency = <70000000>;
29 31 };
30 32  
configs/nsim_700_defconfig
1 1 CONFIG_ARC=y
2 2 CONFIG_TARGET_NSIM=y
3 3 CONFIG_SYS_TEXT_BASE=0x81000000
4   -CONFIG_DEBUG_UART_BASE=0xc0fc1000
  4 +CONFIG_DEBUG_UART_BASE=0xf0000000
5 5 CONFIG_DEBUG_UART_CLOCK=70000000
6 6 CONFIG_SYS_CLK_FREQ=70000000
7 7 CONFIG_DEBUG_UART=y
8 8 CONFIG_BOOTDELAY=3
9 9 CONFIG_USE_BOOTARGS=y
10   -CONFIG_BOOTARGS="console=ttyARC0,115200n8"
  10 +CONFIG_BOOTARGS="console=ttyS0,115200n8"
11 11 CONFIG_SYS_PROMPT="nsim# "
12 12 # CONFIG_CMD_SETEXPR is not set
13 13 CONFIG_OF_CONTROL=y
... ... @@ -16,7 +16,7 @@
16 16 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
17 17 CONFIG_DM=y
18 18 CONFIG_DM_SERIAL=y
19   -CONFIG_DEBUG_ARC_SERIAL=y
20   -CONFIG_ARC_SERIAL=y
  19 +CONFIG_DEBUG_UART_SHIFT=2
  20 +CONFIG_SYS_NS16550=y
21 21 CONFIG_USE_PRIVATE_LIBGCC=y
configs/nsim_700be_defconfig
... ... @@ -2,13 +2,13 @@
2 2 CONFIG_CPU_BIG_ENDIAN=y
3 3 CONFIG_TARGET_NSIM=y
4 4 CONFIG_SYS_TEXT_BASE=0x81000000
5   -CONFIG_DEBUG_UART_BASE=0xc0fc1000
  5 +CONFIG_DEBUG_UART_BASE=0xf0000000
6 6 CONFIG_DEBUG_UART_CLOCK=70000000
7 7 CONFIG_SYS_CLK_FREQ=70000000
8 8 CONFIG_DEBUG_UART=y
9 9 CONFIG_BOOTDELAY=3
10 10 CONFIG_USE_BOOTARGS=y
11   -CONFIG_BOOTARGS="console=ttyARC0,115200n8"
  11 +CONFIG_BOOTARGS="console=ttyS0,115200n8"
12 12 CONFIG_SYS_PROMPT="nsim# "
13 13 # CONFIG_CMD_SETEXPR is not set
14 14 CONFIG_OF_CONTROL=y
... ... @@ -17,7 +17,7 @@
17 17 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
18 18 CONFIG_DM=y
19 19 CONFIG_DM_SERIAL=y
20   -CONFIG_DEBUG_ARC_SERIAL=y
21   -CONFIG_ARC_SERIAL=y
  20 +CONFIG_DEBUG_UART_SHIFT=2
  21 +CONFIG_SYS_NS16550=y
22 22 CONFIG_USE_PRIVATE_LIBGCC=y
configs/nsim_hs38_defconfig
... ... @@ -2,13 +2,13 @@
2 2 CONFIG_ISA_ARCV2=y
3 3 CONFIG_TARGET_NSIM=y
4 4 CONFIG_SYS_TEXT_BASE=0x81000000
5   -CONFIG_DEBUG_UART_BASE=0xc0fc1000
  5 +CONFIG_DEBUG_UART_BASE=0xf0000000
6 6 CONFIG_DEBUG_UART_CLOCK=70000000
7 7 CONFIG_SYS_CLK_FREQ=70000000
8 8 CONFIG_DEBUG_UART=y
9 9 CONFIG_BOOTDELAY=3
10 10 CONFIG_USE_BOOTARGS=y
11   -CONFIG_BOOTARGS="console=ttyARC0,115200n8"
  11 +CONFIG_BOOTARGS="console=ttyS0,115200n8"
12 12 CONFIG_SYS_PROMPT="nsim# "
13 13 # CONFIG_CMD_SETEXPR is not set
14 14 CONFIG_OF_CONTROL=y
... ... @@ -17,7 +17,7 @@
17 17 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
18 18 CONFIG_DM=y
19 19 CONFIG_DM_SERIAL=y
20   -CONFIG_DEBUG_ARC_SERIAL=y
21   -CONFIG_ARC_SERIAL=y
  20 +CONFIG_DEBUG_UART_SHIFT=2
  21 +CONFIG_SYS_NS16550=y
22 22 CONFIG_USE_PRIVATE_LIBGCC=y
configs/nsim_hs38be_defconfig
... ... @@ -3,13 +3,13 @@
3 3 CONFIG_CPU_BIG_ENDIAN=y
4 4 CONFIG_TARGET_NSIM=y
5 5 CONFIG_SYS_TEXT_BASE=0x81000000
6   -CONFIG_DEBUG_UART_BASE=0xc0fc1000
  6 +CONFIG_DEBUG_UART_BASE=0xf0000000
7 7 CONFIG_DEBUG_UART_CLOCK=70000000
8 8 CONFIG_SYS_CLK_FREQ=70000000
9 9 CONFIG_DEBUG_UART=y
10 10 CONFIG_BOOTDELAY=3
11 11 CONFIG_USE_BOOTARGS=y
12   -CONFIG_BOOTARGS="console=ttyARC0,115200n8"
  12 +CONFIG_BOOTARGS="console=ttyS0,115200n8"
13 13 CONFIG_SYS_PROMPT="nsim# "
14 14 # CONFIG_CMD_SETEXPR is not set
15 15 CONFIG_OF_CONTROL=y
... ... @@ -18,7 +18,7 @@
18 18 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
19 19 CONFIG_DM=y
20 20 CONFIG_DM_SERIAL=y
21   -CONFIG_DEBUG_ARC_SERIAL=y
22   -CONFIG_ARC_SERIAL=y
  21 +CONFIG_DEBUG_UART_SHIFT=2
  22 +CONFIG_SYS_NS16550=y
23 23 CONFIG_USE_PRIVATE_LIBGCC=y