From patchwork Wed Dec 8 21:43:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1565504 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=XXYMKUUU; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=svanheule.net header.i=@svanheule.net header.a=rsa-sha256 header.s=mail1707 header.b=VwSnlEyH; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4J8W4g1LFRz9sXS for ; Thu, 9 Dec 2021 08:48:19 +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=/3WXnmmmtAl6GQCyv1x5dagE6suPHAu1NuVr4TjxcBA=; b=XXYMKUUUW6Fgn3 sCnzjgsGkAHthyGYYrNlxoTxtr4t4Q9MVazsPe6G8ioBVVTr2pHZ1Z1xSzncZLQJXJ2qd4ARnJJ1J nDK9ifzNWwE3Wc10/2OZCEULFfLsVuPkzYrm+9OBpfMF35umYJNnmXmvovIiSznijkHLFAyGZa0Gw 9+0rcxZ0gdsWM62LonX0Oinl3rX+WBJiz7j3/nYfmZyDMHQQAGwGaQGCv1tYbZaOug93FbgfC8NYL +J7OR2nJP0SYoiUF8jzWF6kVy42RHh9FTJ6raFMKjh3QANvn+6UXeMjl9P3pPFd3ujBz+4yghUFHV OeFNYoGEL5I3qJvtYnSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mv4jT-00EHXa-RR; Wed, 08 Dec 2021 21:44:12 +0000 Received: from polaris.svanheule.net ([2a00:c98:2060:a004:1::200]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mv4in-00EHPg-NX for openwrt-devel@lists.openwrt.org; Wed, 08 Dec 2021 21:43:32 +0000 Received: from terra.local.svanheule.net (unknown [IPv6:2a02:a03f:eafe:c901:4e6f:a4e9:6d71:a770]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sander@svanheule.net) by polaris.svanheule.net (Postfix) with ESMTPSA id C8D7427E13E; Wed, 8 Dec 2021 22:43:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1638999801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9etxxQ3/Dr0tCDIHsKRsjljPrKCQ6NUfZn6SfDdinEQ=; b=VwSnlEyH7xdKf6gYJGTZLP6GBe0WaRavntv0uOxcqQ6Ir+eeWfJZmRkf6KdbqWXs2GG3w5 nJGXTZVeOQJ7k9GqktEnvX0X7OTFtx13F9cnxHJyt0/Q9Fdr+gZBCIT6JoWJSb5CQE78Nj Wh7Em8zlL+ZBaK26SMVWFxMXToW8QYzI+rfd5nh38MjZE/NHGngQJ8GGXmGamHGsZrBx57 D8CWZEJG77wHzAwELhmtq49dsXLSgjF9fpbslfes1gjFrXpMXz/5Nk/K3+uP4KzLdoCTDH SehtOIZBc67+5V2ohobA7z1dsHP0L5x3zkDH5rnQYjy8Z9BBpoC2hGonHhZPdQ== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: INAGAKI Hiroshi , Birger Koblitz , John Crispin , Sander Vanheule Subject: [PATCH 04/13] realtek: use fixed-clock as CPU clock Date: Wed, 8 Dec 2021 22:43:00 +0100 Message-Id: <20211208214309.233041-5-sander@svanheule.net> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211208214309.233041-1-sander@svanheule.net> References: <20211208214309.233041-1-sander@svanheule.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211208_134329_936695_EB9570B2 X-CRM114-Status: UNSURE ( 9.51 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) 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: CPU clock definition in devicetree should be specified per CPU, not in the cpus node. This modification causes plat_init_time() to not find the CPU frequency in the devicetree any more, but it can fal [...] Content analysis details: (-2.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [2a00:c98:2060:a004:1:0:0:200 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -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: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org CPU clock definition in devicetree should be specified per CPU, not in the cpus node. This modification causes plat_init_time() to not find the CPU frequency in the devicetree any more, but it can fall back to the (identical) default. Co-developed-by: INAGAKI Hiroshi Signed-off-by: INAGAKI Hiroshi Signed-off-by: Sander Vanheule --- target/linux/realtek/dts-5.10/rtl838x.dtsi | 9 ++++++++- target/linux/realtek/dts-5.10/rtl930x.dtsi | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/target/linux/realtek/dts-5.10/rtl838x.dtsi b/target/linux/realtek/dts-5.10/rtl838x.dtsi index 899c1731fb51..835fc4a8f8c3 100644 --- a/target/linux/realtek/dts-5.10/rtl838x.dtsi +++ b/target/linux/realtek/dts-5.10/rtl838x.dtsi @@ -56,11 +56,12 @@ cpus { #address-cells = <1>; #size-cells = <0>; - frequency = <500000000>; cpu@0 { compatible = "mips,mips4KEc"; reg = <0>; + clocks = <&cpu_clk>; + clock-names = "cpu"; }; }; @@ -68,6 +69,12 @@ bootargs = "console=ttyS0,115200"; }; + cpu_clk: cpu_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <500000000>; + }; + lx_clk: lx_clk { compatible = "fixed-clock"; #clock-cells = <0>; diff --git a/target/linux/realtek/dts-5.10/rtl930x.dtsi b/target/linux/realtek/dts-5.10/rtl930x.dtsi index 991e9e2f9a28..3a9b0e23c470 100644 --- a/target/linux/realtek/dts-5.10/rtl930x.dtsi +++ b/target/linux/realtek/dts-5.10/rtl930x.dtsi @@ -56,11 +56,12 @@ cpus { #address-cells = <1>; #size-cells = <0>; - frequency = <800000000>; cpu@0 { compatible = "mips,mips34Kc"; reg = <0>; + clocks = <&cpu_clk>; + clock-names = "cpu"; }; }; @@ -80,6 +81,12 @@ interrupt-controller; }; + cpu_clk: cpu_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <800000000>; + }; + lx_clk: lx_clk { compatible = "fixed-clock"; #clock-cells = <0>;