From patchwork Fri May 14 01:16:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1478270 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=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=RxTW33lc; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=WleY/Q6P; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ESmC4lfv; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (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 4Fh9bD6k9sz9sWW for ; Fri, 14 May 2021 11:16:24 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XVVD6/q1P7qMJviEnuwxBdKkpmU+t4XiQ5SETPEstoU=; b=RxTW33lcJ/yqqM l74yPsBDb2L/yfnCJkc3y8sHYAYF6vwH+9y4XoXK2HAdQ33ULmm6hARKH8viMZcaMpJKMxxk1ILVx zBrxf4Z2kOirRVAXoaDa8I8ZFdcIwfCT42LptgPOQT9jZDLiTVLbJlqkQDNTecJq4fpSiXkGRA0R6 WLgPiGlWsAos0x6Ml8LPfg5tttdd6wKjUZmN0nwNo8uyJqSpfh4/HrBBxhAXkw4qSV9apyV96OPFw 1g9zo25ZypCeXz575xQplAceYGcXe9RTEPxU/HvwoDqaF9z8X2vpkcQEj0ATgdrElGDSq0sDOOEVT 9D4yWQk8b3SB/xOZibaA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhMR5-006qiY-LB; Fri, 14 May 2021 01:16:15 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhMR3-006qiP-L6 for opensbi@desiato.infradead.org; Fri, 14 May 2021 01:16:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=WLyLQma6lGFcUEGJmBG6gbRlcPcuSVu3mbm2r8vxU5M=; b=WleY/Q6Podf5Qhm71nbx8JJs5+ GmxGxFIUghduwTLWGf6ubjvUFfYeVfdgb/fglIaruGrrFg9x4Wrzvuircy+JmmwK4mggEmZf1npr2 fOf1PzY6dYRWujJhASuWGwHX30gHdQJVsjb/nwKkWf2Q9SAqbNVSpLLLfC1f2ZnrRfRGKOQyLlKzT aqEQS5WECTGP8qdf+t0g8uYgIM3aBhZHMRAbGssLHHDyVK0xfvKo+7rh8bYvml9wJg9avCX5ykyRP DLHDpxysHxS7CGgFfCf0/ax98Jysxwjq1d7qjDed7pcsa6QkMnO+RZLFK9zETsC437gZF7lC9R2LV +B8cMGAQ==; Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhMR1-00BeNg-1z for opensbi@lists.infradead.org; Fri, 14 May 2021 01:16:12 +0000 Received: by mail-ej1-x62e.google.com with SMTP id j14so1073424ejy.1 for ; Thu, 13 May 2021 18:16:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=WLyLQma6lGFcUEGJmBG6gbRlcPcuSVu3mbm2r8vxU5M=; b=ESmC4lfvMWeWu2I8J2mg5luasWdUWV1urlu0LoptEpIoOgBvIRbOi68q5jPqbpPvHU u2T/Uqcnv04iURVqgG9Z+2nmNk0MNb/rhzWF5GEqSWuRDQu2RpVAnj34kd1PRphXSBvx mDG0rY5OoTG64OcyCFdmxrbhm63hI9DOcBYMbucSBpYmhv9uHQ6KqjB+P5zAEj6mCWKf tjlZbEWeZBFoBPiBKEPv+/0HLcGdpLMGheonv4K1gebzEng1/qfo+A8URmlPx5zJXQg/ msF5BL5RH3R6IxVxKPF4Gp5O6AfLctLvCB34ZnGRcKztM3ILH8y05whzYnBAaA9esCZw cKQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=WLyLQma6lGFcUEGJmBG6gbRlcPcuSVu3mbm2r8vxU5M=; b=C+YRhLaBCWiLglHUNwv4Vy1gmSzj/ULDJTzR2ULUP8wp59QCX+zFNuoiG3N/ryjJP2 Jm6CIlsxVgc7tVg91Aa4W7xsY6gL+WjOzua6ZQrootqvTedENqGg8z9yzfYEWte6nRQB kNIonjJftw2FDrrBk7yRqesnF3Hq8OhL9hVwun2KtEHLhEKaFsq1qsopDwXUsJQsJ+qn kDsVAINY6e9lCSaorQxPYETijlCS5rvS7cYjb+oudQBAyRIZqybubKcvWsMheHz4/I1C ZJvWETIHkvzKLDBAD27KzRd+oJj0y431BAiLN4pKtB7o+NLHOH3a5Ixz1qEOzoUJxo9j ZOAQ== X-Gm-Message-State: AOAM530FMxqQWNDjRYfXNGTEsnTyR5cu9POAFM2rYAOPxs4o1AIx3fQ0 NlF6VxjnZWeYjK9hLLsa9DwuOsrAxtue6w== X-Google-Smtp-Source: ABdhPJzSk0K2f/UEKQ4rhQlPJkPEzuipDSoCVfHOmrRske/MP2rx7PxOedONCEZQCLg5z7S9MH+AIw== X-Received: by 2002:a17:906:f894:: with SMTP id lg20mr9009336ejb.355.1620954969673; Thu, 13 May 2021 18:16:09 -0700 (PDT) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id z12sm3395524edr.17.2021.05.13.18.16.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 18:16:09 -0700 (PDT) From: Bin Meng To: Anup Patel , opensbi@lists.infradead.org Subject: [PATCH] lib: utils/serial: Support Synopsys DesignWare APB UART Date: Fri, 14 May 2021 09:16:13 +0800 Message-Id: <20210514011613.2183141-1-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210513_181611_137410_CBFABB96 X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Synopsys DesignWare APB UART is seen on the StarFive JH7100 SoC. Its programming interface is compatible with the existing 8250 UART driver. Simply add its compatible string to the driver makes it wor [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:62e listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [bmeng.cn[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Synopsys DesignWare APB UART is seen on the StarFive JH7100 SoC. Its programming interface is compatible with the existing 8250 UART driver. Simply add its compatible string to the driver makes it work with the StarFive JH7100 SoC on a BeagleV board. With this patch, the generic platform firmware can be used out of the box on the BeagleV board. Signed-off-by: Bin Meng Reviewed-by: Anup Patel --- lib/utils/serial/fdt_serial_uart8250.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/utils/serial/fdt_serial_uart8250.c b/lib/utils/serial/fdt_serial_uart8250.c index 918193a..36f364c 100644 --- a/lib/utils/serial/fdt_serial_uart8250.c +++ b/lib/utils/serial/fdt_serial_uart8250.c @@ -28,6 +28,7 @@ static int serial_uart8250_init(void *fdt, int nodeoff, static const struct fdt_match serial_uart8250_match[] = { { .compatible = "ns16550" }, { .compatible = "ns16550a" }, + { .compatible = "snps,dw-apb-uart" }, { }, };