From patchwork Mon Oct 31 11:21:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiang W X-Patchwork-Id: 1697106 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=w/G1clVn; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=JNCp9IY4; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N19k01Rsqz23lc for ; Mon, 31 Oct 2022 22:22:47 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pH9cyVJvPKQlHYg8Y3pWYHGBfLE535hHlepIIVBgYwI=; b=w/G1clVnoYaWiQ J4ljlO/o7zaEnUhVi7QHFuLwb58lhyzQlOcu9GefeiNXXle2D5aUPme5fk4xgVLRNT3rlaqLuwRji 6l4ZPIqQIJoch3VurjVdLMf1lF6l1hcKeXryKKLdX1NxXovb/a4QkA5lOFH7LcYDB5Ul97ugyRRHy vrsvhTIxk28w7CszkY/2+Ip7jiPrjHYK2zpbATozXMWr6uzlTDO3/pakOeYm3ETGZuevGH61llDBV BySfu3rls4j+tuZyklNRLqEPpB+S+Zv2eqPVE/d68hD37BlByjJJxIUokGquYVHN4jYKJnS9mUrHu /gIZF8ff7iJQHtr1jOcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1opSs6-00BCEk-Cs; Mon, 31 Oct 2022 11:22:26 +0000 Received: from m12.mail.163.com ([123.126.96.234]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1opSs1-00BCCH-W1 for opensbi@lists.infradead.org; Mon, 31 Oct 2022 11:22:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=iMTfI 5A7l3H3WtxEGqWqi/XKXypI3Iul1w8S4YYWRDo=; b=JNCp9IY45LuUUBHKdLGd4 knSdcTvO+V7WJXibzHOjTGR1WohwF3uH0emMRme9qcyAkHR2IsliMnMrQPmlaOOb nWhg54abGUip7GF8QGrehPgJA6hLaLwENfUYL3pHtzGofbjO6O07cIz76pKsfGyW 9C6MxRbBmUQ1Da8b07p/Aw= Received: from x390.lan (unknown [58.247.140.171]) by smtp13 (Coremail) with SMTP id feRpCgDn867ar19jI3gRAA--.25192S3; Mon, 31 Oct 2022 19:22:16 +0800 (CST) From: Xiang W To: opensbi@lists.infradead.org Cc: anup@brainfault.org, Xiang W Subject: [PATCH 1/2] lib: utils/fdt: Remove redundant code Date: Mon, 31 Oct 2022 19:21:44 +0800 Message-Id: <20221031112145.126615-2-wxjstz@126.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221031112145.126615-1-wxjstz@126.com> References: <20221031112145.126615-1-wxjstz@126.com> MIME-Version: 1.0 X-CM-TRANSID: feRpCgDn867ar19jI3gRAA--.25192S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7tFW3uFWfWF4xZrWDKryfWFg_yoW8GFyxpa 43K3sakrn7tF1fKFZ3KF4kAanrCa15Wry7Jr4fXa97ta4DZw1xtr1UKr1IkFW5t345ZF4Y yrs5Xryjy3WDX3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0piUPEfUUUUU= X-Originating-IP: [58.247.140.171] X-CM-SenderInfo: pz0m23b26rjloofrz/1tbikwirOlpEFVkhXwAAsm X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221031_042222_504527_BC8797CE X-CRM114-Status: UNSURE ( 6.90 ) 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: uart->reg_offset and uart->reg_io_width are only used on uart8250 and not required on other platforms. Remove for sifive and gaisler. Signed-off-by: Xiang W --- lib/utils/fdt/fdt_helper.c | 12 1 file changed, 12 deletions(-) Content analysis details: (-0.2 points, 5.0 required) 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.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [wxjstz[at]126.com] -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_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 uart->reg_offset and uart->reg_io_width are only used on uart8250 and not required on other platforms. Remove for sifive and gaisler. Signed-off-by: Xiang W Reviewed-by: Atish Patra Reviewed-by: Anup Patel --- lib/utils/fdt/fdt_helper.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/utils/fdt/fdt_helper.c b/lib/utils/fdt/fdt_helper.c index d390436..cdd0b35 100644 --- a/lib/utils/fdt/fdt_helper.c +++ b/lib/utils/fdt/fdt_helper.c @@ -25,10 +25,6 @@ #define DEFAULT_SIFIVE_UART_FREQ 0 #define DEFAULT_SIFIVE_UART_BAUD 115200 -#define DEFAULT_SIFIVE_UART_REG_SHIFT 0 -#define DEFAULT_SIFIVE_UART_REG_IO_WIDTH 4 - -#define DEFAULT_GAISLER_UART_REG_IO_WIDTH 4 #define DEFAULT_SHAKTI_UART_FREQ 50000000 #define DEFAULT_SHAKTI_UART_BAUD 115200 @@ -363,10 +359,6 @@ int fdt_parse_gaisler_uart_node(void *fdt, int nodeoffset, if (rc) return rc; - /* For Gaisler APBUART, the reg-shift and reg-io-width are fixed .*/ - uart->reg_shift = DEFAULT_UART_REG_SHIFT; - uart->reg_io_width = DEFAULT_GAISLER_UART_REG_IO_WIDTH; - return 0; } @@ -394,10 +386,6 @@ int fdt_parse_sifive_uart_node(void *fdt, int nodeoffset, if (rc) return rc; - /* For SiFive UART, the reg-shift and reg-io-width are fixed .*/ - uart->reg_shift = DEFAULT_SIFIVE_UART_REG_SHIFT; - uart->reg_io_width = DEFAULT_SIFIVE_UART_REG_IO_WIDTH; - return 0; }