From patchwork Wed Feb 12 17:44:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 1236973 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20170209 header.b=red4YHku; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.a=rsa-sha256 header.s=mail header.b=bvVSCoqd; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Hn8j43Z5z9sPK for ; Thu, 13 Feb 2020 04:44:53 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=RMZdIRUOKM04TC8Xi1mzpcfl33BkOMzLgzNFfI75GqU=; b=red 4YHkureF4AYTLVnS9FAdslzmPN1rZzsNHK2EUW1xHLXWgNYvmlk/C8MIaSJdQD1GKYuYJdK7f55Qp 66v5zzZP04egjEqacM9GaG8Lqa8HZSjAQ9GTxOuGCn2m2EL2iHovElUFMjtyLwM0G+wPMLQiwM7U6 TnWTuha1RiGXLlpcIsNeOfmtocTo9hwKpbP9ICugO0FInVROoOKtAvU8dBnJlqpQUZ3/Xp6mk6yqv DJB6jUdnsfVPGWFUdWAHeA3UdFXVQz8rPsPm/R3cUCClh3wXBD3quX2bckRMI+noCJ9heoXbQjZLB Xw6iUjFFkAbed5U8gDisTLrxa5sHTkw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1w4C-0008EM-5q; Wed, 12 Feb 2020 17:44:52 +0000 Received: from us03-smtprelay2.synopsys.com ([149.117.87.133] helo=smtprelay-out1.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1w49-0008DF-DO for linux-snps-arc@lists.infradead.org; Wed, 12 Feb 2020 17:44:50 +0000 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id DEF06C0630; Wed, 12 Feb 2020 17:44:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1581529488; bh=vdWoe+X6h+9QfPGSzqW5QiqRs7q+4fW/fqKVUnM7oAI=; h=From:To:Cc:Subject:Date:From; b=bvVSCoqdDHY+v7QiwvfHzn2NuvDVvj8xI2lUmn+PDVCkiwG812qx9N8Ra6+CinLcx Eyx1MSQ+RN5og9FL0VfhDPh1GfvXGwBNRdQgS7LZQrUTk9nxm9fwPt8I2SEfbxseXP VznrDxJrAjkBH4UdvCAniiC5mVfPqqutlhzjhghvlxdSEBWFzkDHy2CX5taBtFw29v 9mpJP8yNiSriDaANjRJRdC5TUS7MJDatfCMgJ1eWsyMRchNgzL8Yd17Y5CJFHH3FL6 pOTSmKf1zWtkk1DxLD4f76X4OdjAohGN4hzfBqm6wEfxQU4/FdT7yx1QgR2AYdtMSS 0Y4CoLh/jTr4A== Received: from ru20arcgnu1.internal.synopsys.com (ru20arcgnu1.internal.synopsys.com [10.121.9.48]) by mailhost.synopsys.com (Postfix) with ESMTP id 4E882A0067; Wed, 12 Feb 2020 17:44:45 +0000 (UTC) From: Alexey Brodkin To: u-boot@lists.denx.de Subject: [PATCH 1/3 v2] ARC: nSIM: switch from ARC UART to DW UART Date: Wed, 12 Feb 2020 20:44:41 +0300 Message-Id: <20200212174443.37707-1-abrodkin@synopsys.com> X-Mailer: git-send-email 2.16.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200212_094449_569932_E61183BC X-CRM114-Status: GOOD ( 10.92 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-snps-arc@lists.infradead.org, Alexey Brodkin , uboot-snps-arc@synopsys.com MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 --- Changes v1 -> v2: * Copyright year bumped to 2020. arch/arc/dts/nsim.dts | 12 +++++++----- configs/nsim_700_defconfig | 8 ++++---- configs/nsim_700be_defconfig | 8 ++++---- configs/nsim_hs38_defconfig | 8 ++++---- configs/nsim_hs38be_defconfig | 8 ++++---- 5 files changed, 23 insertions(+), 21 deletions(-) diff --git a/arch/arc/dts/nsim.dts b/arch/arc/dts/nsim.dts index 243ecb178e..43f281dfec 100644 --- a/arch/arc/dts/nsim.dts +++ b/arch/arc/dts/nsim.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright (C) 2015-2016 Synopsys, Inc. (www.synopsys.com) + * Copyright (C) 2015-2016, 2020 Synopsys, Inc. (www.synopsys.com) */ /dts-v1/; @@ -10,7 +10,7 @@ model = "snps,nsim"; aliases { - console = &arcuart0; + console = &uart0; }; cpu_card { @@ -22,9 +22,11 @@ }; }; - arcuart0: serial@0xc0fc1000 { - compatible = "snps,arc-uart"; - reg = <0xc0fc1000 0x100>; + uart0: serial@f0000000 { + compatible = "snps,dw-apb-uart"; + reg = <0xf0000000 0x1000>; + reg-shift = <2>; + reg-io-width = <4>; clock-frequency = <70000000>; }; diff --git a/configs/nsim_700_defconfig b/configs/nsim_700_defconfig index 5633113b09..2d4a58b178 100644 --- a/configs/nsim_700_defconfig +++ b/configs/nsim_700_defconfig @@ -1,13 +1,13 @@ CONFIG_ARC=y CONFIG_TARGET_NSIM=y CONFIG_SYS_TEXT_BASE=0x81000000 -CONFIG_DEBUG_UART_BASE=0xc0fc1000 +CONFIG_DEBUG_UART_BASE=0xf0000000 CONFIG_DEBUG_UART_CLOCK=70000000 CONFIG_SYS_CLK_FREQ=70000000 CONFIG_DEBUG_UART=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="console=ttyARC0,115200n8" +CONFIG_BOOTARGS="console=ttyS0,115200n8" CONFIG_SYS_PROMPT="nsim# " # CONFIG_CMD_SETEXPR is not set CONFIG_OF_CONTROL=y @@ -16,6 +16,6 @@ CONFIG_DEFAULT_DEVICE_TREE="nsim" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_DM_SERIAL=y -CONFIG_DEBUG_ARC_SERIAL=y -CONFIG_ARC_SERIAL=y +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYS_NS16550=y CONFIG_USE_PRIVATE_LIBGCC=y diff --git a/configs/nsim_700be_defconfig b/configs/nsim_700be_defconfig index 40f7ec7e1f..61eea91449 100644 --- a/configs/nsim_700be_defconfig +++ b/configs/nsim_700be_defconfig @@ -2,13 +2,13 @@ CONFIG_ARC=y CONFIG_CPU_BIG_ENDIAN=y CONFIG_TARGET_NSIM=y CONFIG_SYS_TEXT_BASE=0x81000000 -CONFIG_DEBUG_UART_BASE=0xc0fc1000 +CONFIG_DEBUG_UART_BASE=0xf0000000 CONFIG_DEBUG_UART_CLOCK=70000000 CONFIG_SYS_CLK_FREQ=70000000 CONFIG_DEBUG_UART=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="console=ttyARC0,115200n8" +CONFIG_BOOTARGS="console=ttyS0,115200n8" CONFIG_SYS_PROMPT="nsim# " # CONFIG_CMD_SETEXPR is not set CONFIG_OF_CONTROL=y @@ -17,6 +17,6 @@ CONFIG_DEFAULT_DEVICE_TREE="nsim" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_DM_SERIAL=y -CONFIG_DEBUG_ARC_SERIAL=y -CONFIG_ARC_SERIAL=y +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYS_NS16550=y CONFIG_USE_PRIVATE_LIBGCC=y diff --git a/configs/nsim_hs38_defconfig b/configs/nsim_hs38_defconfig index 2820a6fca3..ce68de3251 100644 --- a/configs/nsim_hs38_defconfig +++ b/configs/nsim_hs38_defconfig @@ -2,13 +2,13 @@ CONFIG_ARC=y CONFIG_ISA_ARCV2=y CONFIG_TARGET_NSIM=y CONFIG_SYS_TEXT_BASE=0x81000000 -CONFIG_DEBUG_UART_BASE=0xc0fc1000 +CONFIG_DEBUG_UART_BASE=0xf0000000 CONFIG_DEBUG_UART_CLOCK=70000000 CONFIG_SYS_CLK_FREQ=70000000 CONFIG_DEBUG_UART=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="console=ttyARC0,115200n8" +CONFIG_BOOTARGS="console=ttyS0,115200n8" CONFIG_SYS_PROMPT="nsim# " # CONFIG_CMD_SETEXPR is not set CONFIG_OF_CONTROL=y @@ -17,6 +17,6 @@ CONFIG_DEFAULT_DEVICE_TREE="nsim" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_DM_SERIAL=y -CONFIG_DEBUG_ARC_SERIAL=y -CONFIG_ARC_SERIAL=y +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYS_NS16550=y CONFIG_USE_PRIVATE_LIBGCC=y diff --git a/configs/nsim_hs38be_defconfig b/configs/nsim_hs38be_defconfig index e533fae2b1..5d2ea59d52 100644 --- a/configs/nsim_hs38be_defconfig +++ b/configs/nsim_hs38be_defconfig @@ -3,13 +3,13 @@ CONFIG_ISA_ARCV2=y CONFIG_CPU_BIG_ENDIAN=y CONFIG_TARGET_NSIM=y CONFIG_SYS_TEXT_BASE=0x81000000 -CONFIG_DEBUG_UART_BASE=0xc0fc1000 +CONFIG_DEBUG_UART_BASE=0xf0000000 CONFIG_DEBUG_UART_CLOCK=70000000 CONFIG_SYS_CLK_FREQ=70000000 CONFIG_DEBUG_UART=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="console=ttyARC0,115200n8" +CONFIG_BOOTARGS="console=ttyS0,115200n8" CONFIG_SYS_PROMPT="nsim# " # CONFIG_CMD_SETEXPR is not set CONFIG_OF_CONTROL=y @@ -18,6 +18,6 @@ CONFIG_DEFAULT_DEVICE_TREE="nsim" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_DM_SERIAL=y -CONFIG_DEBUG_ARC_SERIAL=y -CONFIG_ARC_SERIAL=y +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYS_NS16550=y CONFIG_USE_PRIVATE_LIBGCC=y From patchwork Wed Feb 12 17:44:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 1236972 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20170209 header.b=Eil6I33C; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.a=rsa-sha256 header.s=mail header.b=UWn4LiVV; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Hn8j39Ddz9s1x for ; Thu, 13 Feb 2020 04:44:53 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=J3eu877a+zK/rZaxbiTBiy7HRGS7j6/JXF3eWkqpcaA=; b=Eil6I33CJc2vol+zWotaWJUa7+ Q97LXyAMiJPjJCD2DA8o3HRVwJq9fryKDF+FaSs6gtdQpNL9KPTv65hHej3vqqaRNmJ7mEEm5sw7D SV5Z/e8gfH2/HaA782vlozBVt29lxbKbexo7ypAuDZVA6i+cJ2TGTZhe6jVSnUUP1IcCwoY8ptJfb QklmN87NVg2yAWnHbZsRqVkG9cwr4ZytdTCsYhSNPwlHKzoN9CW6A+qGeYcNb7adK0/EKwVmukMsV u4w1irh6cr6ZOsobpdsifLndtcS1bOZv4EYYuwNPPNnXyXTblyMzSwAFCN9Nu9DfOw9V3ESYP393o 43PXU+cw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1w4C-0008EA-1q; Wed, 12 Feb 2020 17:44:52 +0000 Received: from smtprelay-out1.synopsys.com ([149.117.87.133]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1w49-0008DH-FA for linux-snps-arc@lists.infradead.org; Wed, 12 Feb 2020 17:44:50 +0000 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 2FD86C0633; Wed, 12 Feb 2020 17:44:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1581529488; bh=eiY1ruU2g+KMtLVcZXgw8f3BWpGFypV1B6nLZhurYks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UWn4LiVV/NWXmlEWDy1i3gWjvKvrsmxxUlZ0KkgkT/uX5/mckg6N7HmJUhQqC3EE8 c6N60WRjIqpHyL0P5fTCNjM3PxNw+EBqzsJmsidgfEzos7iMyuH9tv91aRDIRYQcKy SM+IsOegUIpzBRUp09SnKVJES9n6UPnJuYOZPDgiL4gtggse3/3t0PFV1lLIf5MCDm U7DRZgzRPBb8nh/vp2IpYqfbFQJlbkMTqICeZGq+2zxcO7JXp/2q8K1CFA649HPDJ2 FRJdkf3ee70QTZSztBpJh4GAA2hgB9eCTbq1Ezwrp7cvoPXsqo7YCrwUHG2Yz2HO5S avZU+aUAB3EWw== Received: from ru20arcgnu1.internal.synopsys.com (ru20arcgnu1.internal.synopsys.com [10.121.9.48]) by mailhost.synopsys.com (Postfix) with ESMTP id 0E292A0073; Wed, 12 Feb 2020 17:44:45 +0000 (UTC) From: Alexey Brodkin To: u-boot@lists.denx.de Subject: [PATCH 2/3 v2] ARC: nsim_{700|700be|hs38be}_defconfigs: Disable networking Date: Wed, 12 Feb 2020 20:44:42 +0300 Message-Id: <20200212174443.37707-2-abrodkin@synopsys.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20200212174443.37707-1-abrodkin@synopsys.com> References: <20200212174443.37707-1-abrodkin@synopsys.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200212_094449_571331_CF7AD686 X-CRM114-Status: UNSURE ( 9.19 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-snps-arc@lists.infradead.org, Alexey Brodkin , uboot-snps-arc@synopsys.com MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org We don't have yet any brc700 or big-enadian platforms with networking support to run this particular configuration. Whenever QEMU for ARC supports arc700 or big-endian targets we may revisit this one. Signed-off-by: Alexey Brodkin --- No changes v1 -> v2. configs/nsim_700_defconfig | 1 + configs/nsim_700be_defconfig | 1 + configs/nsim_hs38be_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/configs/nsim_700_defconfig b/configs/nsim_700_defconfig index 2d4a58b178..6a38e2c246 100644 --- a/configs/nsim_700_defconfig +++ b/configs/nsim_700_defconfig @@ -14,6 +14,7 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_DEFAULT_DEVICE_TREE="nsim" CONFIG_SYS_RELOC_GD_ENV_ADDR=y +# CONFIG_NET is not set CONFIG_DM=y CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_SHIFT=2 diff --git a/configs/nsim_700be_defconfig b/configs/nsim_700be_defconfig index 61eea91449..d3ed84a415 100644 --- a/configs/nsim_700be_defconfig +++ b/configs/nsim_700be_defconfig @@ -15,6 +15,7 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_DEFAULT_DEVICE_TREE="nsim" CONFIG_SYS_RELOC_GD_ENV_ADDR=y +# CONFIG_NET is not set CONFIG_DM=y CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_SHIFT=2 diff --git a/configs/nsim_hs38be_defconfig b/configs/nsim_hs38be_defconfig index 5d2ea59d52..b074b4ca98 100644 --- a/configs/nsim_hs38be_defconfig +++ b/configs/nsim_hs38be_defconfig @@ -16,6 +16,7 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_DEFAULT_DEVICE_TREE="nsim" CONFIG_SYS_RELOC_GD_ENV_ADDR=y +# CONFIG_NET is not set CONFIG_DM=y CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_SHIFT=2 From patchwork Wed Feb 12 17:44:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 1236974 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20170209 header.b=K6eKeJty; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.a=rsa-sha256 header.s=mail header.b=h5iNrNPy; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Hn8l4pC2z9sRL for ; Thu, 13 Feb 2020 04:44:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=/BthUJZnFeFXBkjUbCT8os+b38SUPauzmm6aP2IzYjQ=; b=K6eKeJtyvINlPhyOiXu5Q1NInK zefR5So1eRktaAJXECnmP4laCM/kSERLoBDOt03NvzOfMBZEG0UZrJL0AQiY4UTPVvKz3P1fjqHn7 yIrDDG9vqJxs8SZNbNbLXmfTNoHEmAvF9hgERICS2twLWGwxj8GwZRJlSABp0ugZ5gb2TPzNYX9/c fZ6WzFqN7+Ilf/Gva/PtuCthw90Q5AhlphO8UPnu1Xo+RQLp4/hxxrJTOz7ZlA3u/sf/igWGecCv9 33JY7GiJG0yQMJm0MHQ3i5r2rGFA3cGTRr9iP91ePHbdz5YA1oaRjaxks6xF5JsdZS0P8s+9EL1pY AoXbc7FA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1w4E-0008FF-AL; Wed, 12 Feb 2020 17:44:54 +0000 Received: from smtprelay-out1.synopsys.com ([149.117.87.133]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1w4A-0008DG-3x for linux-snps-arc@lists.infradead.org; Wed, 12 Feb 2020 17:44:52 +0000 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 2A6B4C0631; Wed, 12 Feb 2020 17:44:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1581529488; bh=BVyotUCVpwyTgkIoEuOxKle2OgbER1Vx9ldbCp/S5Xo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h5iNrNPyn9rKQ6hYV39ZO3QJnQipmy+udwuQ6mlNXJZW/X3e0f4vzXLA+bCaltj+k Psf/aJZsyomc0mEXJftK7YjxO9sFZAIteWO/zgZckvlLOgLSyHFIAfFrgt/sma7O1X 8TKUKbGN+7y6pabt8YIk7r6fIAsGbMsykE2JVJqchYGnw9X727HNB122L6xqocyI4z dfp/GJ+8n0ZIVD+wHATuVMA1kKv8RH4IE/7w4TRCZF/MH3T3ATkPxDNuVHVTS3akvL WTUe/nYcElEH7ePUfpm4jHcRrDpPnYiWmrENpmmTNerYWj+ML/MKiA8+EDhrs6X2Pu M1j2cTrsJi5ww== Received: from ru20arcgnu1.internal.synopsys.com (ru20arcgnu1.internal.synopsys.com [10.121.9.48]) by mailhost.synopsys.com (Postfix) with ESMTP id 8B18BA0076; Wed, 12 Feb 2020 17:44:46 +0000 (UTC) From: Alexey Brodkin To: u-boot@lists.denx.de Subject: [PATCH 3/3 v2] ARC: nsim_hs38: Add support of Virtio NET & BLK Date: Wed, 12 Feb 2020 20:44:43 +0300 Message-Id: <20200212174443.37707-3-abrodkin@synopsys.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20200212174443.37707-1-abrodkin@synopsys.com> References: <20200212174443.37707-1-abrodkin@synopsys.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200212_094450_266289_1AE24AC4 X-CRM114-Status: GOOD ( 16.07 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-snps-arc@lists.infradead.org, Alexey Brodkin , uboot-snps-arc@synopsys.com MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Given now nsim_hs38 configuration is usable on QEMU and in QEMU we have Virtio working perfectly fine the next logical step is to add support of supported & known to work net & bkl to this config. Signed-off-by: Alexey Brodkin --- Changes v1 -> v2: * Instead of adding IRQ parent it might be much cleaner solution to just get rid of "interrupt" properties in Virtio nodes. Again that's all OK for now since we don't really sync Linux .dts and U-Boot's ones. It's not that it's super good though but that's what we have today :) arch/arc/Kconfig | 4 ++-- arch/arc/dts/nsim.dts | 24 ++++++++++++++++++++++++ board/synopsys/{ => nsim}/Kconfig | 3 +++ board/synopsys/nsim/MAINTAINERS | 6 ++++++ board/synopsys/nsim/Makefile | 7 +++++++ board/synopsys/nsim/nsim.c | 26 ++++++++++++++++++++++++++ configs/nsim_hs38_defconfig | 9 +++++++++ 7 files changed, 77 insertions(+), 2 deletions(-) rename board/synopsys/{ => nsim}/Kconfig (74%) create mode 100644 board/synopsys/nsim/MAINTAINERS create mode 100644 board/synopsys/nsim/Makefile create mode 100644 board/synopsys/nsim/nsim.c diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 0cb97207db..545fc3e243 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -160,7 +160,7 @@ config TARGET_TB100 bool "Support tb100" config TARGET_NSIM - bool "Support standalone nSIM & Free nSIM" + bool "Support ARC simulation & prototyping platforms" config TARGET_AXS101 bool "Support Synopsys Designware SDP board AXS101" @@ -184,10 +184,10 @@ config TARGET_IOT_DEVKIT endchoice source "board/abilis/tb100/Kconfig" -source "board/synopsys/Kconfig" source "board/synopsys/axs10x/Kconfig" source "board/synopsys/emsdp/Kconfig" source "board/synopsys/hsdk/Kconfig" source "board/synopsys/iot_devkit/Kconfig" +source "board/synopsys/nsim/Kconfig" endmenu diff --git a/arch/arc/dts/nsim.dts b/arch/arc/dts/nsim.dts index 43f281dfec..c2899ef2ea 100644 --- a/arch/arc/dts/nsim.dts +++ b/arch/arc/dts/nsim.dts @@ -30,4 +30,28 @@ clock-frequency = <70000000>; }; + virtio0: virtio@f0100000 { + compatible = "virtio,mmio"; + reg = <0xf0100000 0x2000>; + }; + + virtio1: virtio@f0102000 { + compatible = "virtio,mmio"; + reg = <0xf0102000 0x2000>; + }; + + virtio2: virtio@f0104000 { + compatible = "virtio,mmio"; + reg = <0xf0104000 0x2000>; + }; + + virtio3: virtio@f0106000 { + compatible = "virtio,mmio"; + reg = <0xf0106000 0x2000>; + }; + + virtio4: virtio@f0108000 { + compatible = "virtio,mmio"; + reg = <0xf0108000 0x2000>; + }; }; diff --git a/board/synopsys/Kconfig b/board/synopsys/nsim/Kconfig similarity index 74% rename from board/synopsys/Kconfig rename to board/synopsys/nsim/Kconfig index 27e5509b26..22287032bf 100644 --- a/board/synopsys/Kconfig +++ b/board/synopsys/nsim/Kconfig @@ -1,5 +1,8 @@ if TARGET_NSIM +config SYS_BOARD + default "nsim" + config SYS_VENDOR default "synopsys" diff --git a/board/synopsys/nsim/MAINTAINERS b/board/synopsys/nsim/MAINTAINERS new file mode 100644 index 0000000000..ad23c8338e --- /dev/null +++ b/board/synopsys/nsim/MAINTAINERS @@ -0,0 +1,6 @@ +ARC SIMULATION & PROTOTYPING PLATFORMS +M: Alexey Brodkin +S: Maintained +F: arch/arc/dts/nsim.dts +F: board/synopsys/nsim/ +F: configs/nsim_*_defconfig diff --git a/board/synopsys/nsim/Makefile b/board/synopsys/nsim/Makefile new file mode 100644 index 0000000000..6aaffffa73 --- /dev/null +++ b/board/synopsys/nsim/Makefile @@ -0,0 +1,7 @@ +# +# Copyright (C) 2020 Synopsys, Inc. All rights reserved. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += nsim.o diff --git a/board/synopsys/nsim/nsim.c b/board/synopsys/nsim/nsim.c new file mode 100644 index 0000000000..f384f707f6 --- /dev/null +++ b/board/synopsys/nsim/nsim.c @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2020 Synopsys, Inc. All rights reserved. + */ + +#include +#include +#include +#include + +int board_early_init_r(void) +{ + /* + * Make sure virtio bus is enumerated so that peripherals + * on the virtio bus can be discovered by their drivers + */ + virtio_init(); + + return 0; +} + +int checkboard(void) +{ + printf("Board: ARC virtual or prototyping platform\n"); + return 0; +}; diff --git a/configs/nsim_hs38_defconfig b/configs/nsim_hs38_defconfig index ce68de3251..6cd01a505b 100644 --- a/configs/nsim_hs38_defconfig +++ b/configs/nsim_hs38_defconfig @@ -9,14 +9,23 @@ CONFIG_DEBUG_UART=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200n8" +CONFIG_BOARD_EARLY_INIT_R=y CONFIG_SYS_PROMPT="nsim# " +CONFIG_CMD_DM=y # CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_DEFAULT_DEVICE_TREE="nsim" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y +CONFIG_BLK=y +CONFIG_HAVE_BLOCK_DEVICE=y +CONFIG_DM_ETH=y CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYS_NS16550=y +CONFIG_VIRTIO_MMIO=y +CONFIG_VIRTIO_NET=y +CONFIG_VIRTIO_BLK=y CONFIG_USE_PRIVATE_LIBGCC=y