From patchwork Mon Aug 26 16:38:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13778312 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96528C5321D for ; Mon, 26 Aug 2024 17:45:29 +0000 (UTC) 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:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HSDgk6CH+3fRK8aPrBbFkTQ/WdLVizg5BZLGcw4xQs0=; b=hYJTdlgk3BWv2h hTkbNPj3aT9gBvFPjVA6VTiZZSjjNQxtj6v6LNtbGGGmGrGlDCs8YVCzstv08icw9/qt2Wtb7kQvt MohYZ0avAzmvs1tr5PdutmRIs+woq63PfTAj68a8fJ8bOlSog+uFZmwMw6yaT30dhpH7s2tZY/aFM PZPN6gNOl0teo5BkUWhN0ibMwuh+LPby55kXFmNWhdVu2/nG0Wz5grAnBPfCNrbj2W6Eec5wCWXXJ 9lK0Qc5ZvMxI2B0kUKgxTrLs6yyAcq9jTcVFFk+2QFYnN8IxJYrvz3MxFCnmcaF/XxRQp0dxKyr2C OCu3DOf4XqfemrVDKNGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sidmN-00000008HX7-2MgN; Mon, 26 Aug 2024 17:45:23 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sicjP-000000082XZ-28dA; Mon, 26 Aug 2024 16:38:16 +0000 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a86a69bfcdaso14424366b.0; Mon, 26 Aug 2024 09:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724690293; x=1725295093; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=aDq9hlxq5SKiY7D4NwdJ+sg4GlIHm5Ue+KqwIBMJ4ck=; b=ltDMXo65bBKASV948lIeyosDWox0lSBK2H5hHx0de0xCNYV+uxLnahxes31UaEpkIa N61erYpCx31W38IwP+d8dkpNKKoGAntXZgc8l8krYAikpaBLjNA0CCtFEc30h6VUPQzj FZKEH9XDiZIvFuqcWOTGBN9wBVrk1dzGhvF/YhHen64UrX6FAbHIOocoIBlNtdIi8Vqm k8t3YdI/Dp+UVE69/IDn2an2YKzSKyx42fwk1BT5YfRIded0RcBpiMmB4O0crwQD8l/T zWFPOmdzJPdxR+h6YTqfXRF5D+DiOGLsts88e7X3Xxjlfb6FI+KWUzMWe/0AEyE8X8n7 BXVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724690293; x=1725295093; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aDq9hlxq5SKiY7D4NwdJ+sg4GlIHm5Ue+KqwIBMJ4ck=; b=dozMJFp7LCgENKG/pwWNpxZhDNllpU92CB5hB8TWEgGk7FAf0ow8QPuiBBS3vBVx7O abZY0k7FH3HYYzw3aDw9AYP5/h45Catoy3jvB460zn58Z4f1vs5KsIAzCoXOIg+fUpCV 797YPVRzNc2wZ8CkXD33Kplstzm3JcFEXo0iiUWuaTQvTwVJDT8CZDLMGprCVOiNHgW7 xnj0lYw5rXVP67fCXrXfhdZoywNb6X/Kp8o+rrRyNyEMPLTcVO2xQpqXHB6sPlVDDj6b DVy/Gn9bxQlWGzPMYcOg3hfGi2/pgnu+/dTOfcjEaclCI2+s/pj/xeXAHQjf6j03t3Y0 VgPg== X-Forwarded-Encrypted: i=1; AJvYcCVqWIyD61RIf/e7Yuj/tzR+cbVryzcNfzWBKyNqpmsenzy5Xs+Qe3mO3fGgH1P7BxbpX9IgtGAf3waii1obd4k=@lists.infradead.org, AJvYcCWmNhBlItBqZnLIpiOcxnchpE2IMs0bszfwrt3fdQRH949j3wD7BYLVISw6uGUE4f9cef3grmtMKwizleFgV9z/@lists.infradead.org X-Gm-Message-State: AOJu0YwzwuiHJRnk1J9IJvikG+XIbV14ilRKz6HxO//kdCzkY7jwicgX BkRlx9iCLJDsWYkPVqiloD9wkr0igaIrbEZgAuQj6hjVClOecvVM X-Google-Smtp-Source: AGHT+IHLIDKav6SmXKB/LiGyu/BHEreiTXzj+YTCi5/nF4P/IeOMyHMupH0woRlDT69S6BqXYTtVag== X-Received: by 2002:a17:907:3da0:b0:a7a:acae:341b with SMTP id a640c23a62f3a-a86a550a4eemr453225566b.9.1724690293070; Mon, 26 Aug 2024 09:38:13 -0700 (PDT) Received: from ?IPV6:2a02:a449:4071:1:32d0:42ff:fe10:6983? ([2a02:a449:4071:1:32d0:42ff:fe10:6983]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f436bc7sm685795766b.116.2024.08.26.09.38.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Aug 2024 09:38:12 -0700 (PDT) Message-ID: <5ad12808-61f5-4e3b-801e-85231375b6a6@gmail.com> Date: Mon, 26 Aug 2024 18:38:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Johan Jonker Subject: [PATCH v1 1/9] clk: rockchip: px30: Drop CLK_NR_CLKS CLKPMU_NR_CLKS usage To: heiko@sntech.de Cc: robh@kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> Content-Language: en-US In-Reply-To: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_093815_587939_ACD73DD2 X-CRM114-Status: GOOD ( 10.97 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org In order to get rid of CLK_NR_CLKS and CLKPMU_NR_CLKS and be able to drop it from the bindings, use rockchip_clk_find_max_clk_id helper to find the highest clock id. Signed-off-by: Johan Jonker --- drivers/clk/rockchip/clk-px30.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) -- 2.39.2 diff --git a/drivers/clk/rockchip/clk-px30.c b/drivers/clk/rockchip/clk-px30.c index b58619eb412b..caf7c0e6e479 100644 --- a/drivers/clk/rockchip/clk-px30.c +++ b/drivers/clk/rockchip/clk-px30.c @@ -1002,6 +1002,7 @@ static const char *const px30_cru_critical_clocks[] __initconst = { static void __init px30_clk_init(struct device_node *np) { struct rockchip_clk_provider *ctx; + unsigned long clk_nr_clks; void __iomem *reg_base; reg_base = of_iomap(np, 0); @@ -1010,7 +1011,9 @@ static void __init px30_clk_init(struct device_node *np) return; } - ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); + clk_nr_clks = rockchip_clk_find_max_clk_id(px30_clk_branches, + ARRAY_SIZE(px30_clk_branches)) + 1; + ctx = rockchip_clk_init(np, reg_base, clk_nr_clks); if (IS_ERR(ctx)) { pr_err("%s: rockchip clk init failed\n", __func__); iounmap(reg_base); @@ -1043,6 +1046,7 @@ CLK_OF_DECLARE(px30_cru, "rockchip,px30-cru", px30_clk_init); static void __init px30_pmu_clk_init(struct device_node *np) { struct rockchip_clk_provider *ctx; + unsigned long clkpmu_nr_clks; void __iomem *reg_base; reg_base = of_iomap(np, 0); @@ -1051,7 +1055,9 @@ static void __init px30_pmu_clk_init(struct device_node *np) return; } - ctx = rockchip_clk_init(np, reg_base, CLKPMU_NR_CLKS); + clkpmu_nr_clks = rockchip_clk_find_max_clk_id(px30_clk_pmu_branches, + ARRAY_SIZE(px30_clk_pmu_branches)) + 1; + ctx = rockchip_clk_init(np, reg_base, clkpmu_nr_clks); if (IS_ERR(ctx)) { pr_err("%s: rockchip pmu clk init failed\n", __func__); return; From patchwork Mon Aug 26 16:38:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13778165 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C8105C5321D for ; Mon, 26 Aug 2024 16:39:53 +0000 (UTC) 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:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NRBPW1w1errIDxQ9HIXpeEr8JEahZgECeUKleTeQToU=; b=W8UAebcP6xDk8/ Vf9i5F+Jeus5GJimGz9wEST4wKnUrK/n8rnyXzMLpS9xgOjwT4xumrEl2j9/7gGED/dxDelrY7wzs syp6N5BIb9XxiQxdoEfob9vQD7ocZHumk3H7IwiFukXPSYGEooqqPAgImanSU6XzDFFn24xCuBHSN OtF073fivxyKIxy8abVl3+ETfe15PvO8gopgZjjQKtg4GpvLoOF4Ie0DMEeWU2DWJ7H3u8QlVAU0m HVZ0ybPD7TRdBJcMO00bY2Tm1eQ5ayCwatE9J9HqEtRe2stZzjk05U7kSksT+/jrEAR0KaEIfp4iU GCmW7NaYYg1O4uDHOVhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sickx-000000082u7-03X2; Mon, 26 Aug 2024 16:39:51 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sicjc-000000082cq-3UwO; Mon, 26 Aug 2024 16:38:30 +0000 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5bef259a71fso652150a12.1; Mon, 26 Aug 2024 09:38:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724690307; x=1725295107; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=yhq/9WJku/9EgEbho9+8mkKwaS95Mme88p8ubN0Cp18=; b=h+Kypi1Ai0c8Yh+bOsMXEsns9lnHZMjOsF3gAJhSTDBzuMw755KQX37FJty4LXctV6 Tllqh6aHE7RLeQqSm0+CSn6ks5hCk/PWyUzv1002/cbsMYXNzes9mfx5sH6xCoSUY+Ii b6Eutd7YXKmImKEOI5k6rjDnBnNDkTDcUftYaDCl/D9jg/W7zlKD9ZB+7eIILfvrMbX+ oopfjZ7iE7hO4xRT5sPp6hJxXU9GnSLqs1Fw37s6Fy067/sSCxRSQuT75VT4QzT4gx5n ErYgL/ut6OJ/35gI4h0fZru9FqLNqf1kitoCKyd6HQ6WzpBQg2/rXl1gAVilVJJOCJo4 NN7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724690307; x=1725295107; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yhq/9WJku/9EgEbho9+8mkKwaS95Mme88p8ubN0Cp18=; b=O+qMPOot/ybP90kZFjjU3nijNc5ilQqM2W5XdtXS74ptY5LE9KEhtyQSgmVB0iT/vQ gYRvd6vSz0Vunwv4pVk/4KCikVHbmdmq+peymYEgE42sw293Qomz670W5nwpdJ4RTGjW 2l8qBAQI43ciPm5FtC4nQ2w3G1J3E2XADxTBi3OFL3XCdSLUB6aY1ToqIg+Zn+bGn7yN EPcjqBvjnB84wQASTK11+Lh2zAynl1EVL8PHwLdmX4tzEka/UkfygFdGlg7YBOYm568q C2Zrv9QEEmW0PGD6CufOt3m53WLURDU+bRRyzYY9YjcF7aON1X6pkoGHVewbBqfxlP2+ hu/w== X-Forwarded-Encrypted: i=1; AJvYcCW5TRMKnofjWZRhF9wNzxNbSBaVBS2NuIuIbHtj9SIf6VSctMtG3dc/cojo92BCyyNwPK9lOWuGd0oOwgHqC4ui@lists.infradead.org, AJvYcCX9iIfME4SnS6qMYOjkIwAT8sge5BmuCPQei5uUjWOMkWfeuK+ALP8vUR6k0mMEpDSJw9KfoLfv3jCjNGVrYMM=@lists.infradead.org X-Gm-Message-State: AOJu0YzmRkfkpt05urh9aXCPlg56wED4ylb+6jQl9iUzJrpuG0WPn7Rt foiYT71S4Qja/o3te+THfRBISpDMrGZgVpVHc+G/j83x65t6hNej X-Google-Smtp-Source: AGHT+IHJJKkoN0mudLhREuJFqK/RBwRijj8qeEa1gtLmFiRUc9gIA1e33tIg7ucKuVXcnXRqVW0BTA== X-Received: by 2002:a17:907:7d91:b0:a80:ed7a:c114 with SMTP id a640c23a62f3a-a86a4ea63cemr395278666b.0.1724690306550; Mon, 26 Aug 2024 09:38:26 -0700 (PDT) Received: from ?IPV6:2a02:a449:4071:1:32d0:42ff:fe10:6983? ([2a02:a449:4071:1:32d0:42ff:fe10:6983]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f4361c3sm682266466b.114.2024.08.26.09.38.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Aug 2024 09:38:26 -0700 (PDT) Message-ID: Date: Mon, 26 Aug 2024 18:38:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Johan Jonker Subject: [PATCH v1 2/9] clk: rockchip: rk3036: Drop CLK_NR_CLKS usage To: heiko@sntech.de Cc: robh@kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> Content-Language: en-US In-Reply-To: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_093828_908854_242DB474 X-CRM114-Status: GOOD ( 11.56 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org In order to get rid of CLK_NR_CLKS and be able to drop it from the bindings, use rockchip_clk_find_max_clk_id helper to find the highest clock id. Signed-off-by: Johan Jonker --- drivers/clk/rockchip/clk-rk3036.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.39.2 diff --git a/drivers/clk/rockchip/clk-rk3036.c b/drivers/clk/rockchip/clk-rk3036.c index d644bc155ec6..d341ce0708aa 100644 --- a/drivers/clk/rockchip/clk-rk3036.c +++ b/drivers/clk/rockchip/clk-rk3036.c @@ -436,6 +436,7 @@ static const char *const rk3036_critical_clocks[] __initconst = { static void __init rk3036_clk_init(struct device_node *np) { struct rockchip_clk_provider *ctx; + unsigned long clk_nr_clks; void __iomem *reg_base; struct clk *clk; @@ -452,7 +453,9 @@ static void __init rk3036_clk_init(struct device_node *np) writel_relaxed(HIWORD_UPDATE(0x2, 0x3, 10), reg_base + RK2928_CLKSEL_CON(13)); - ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); + clk_nr_clks = rockchip_clk_find_max_clk_id(rk3036_clk_branches, + ARRAY_SIZE(rk3036_clk_branches)) + 1; + ctx = rockchip_clk_init(np, reg_base, clk_nr_clks); if (IS_ERR(ctx)) { pr_err("%s: rockchip clk init failed\n", __func__); iounmap(reg_base); From patchwork Mon Aug 26 16:38:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13778166 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C88E9C5321E for ; Mon, 26 Aug 2024 16:40:41 +0000 (UTC) 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:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=g1ef0ZgIeytgtGeqF1Ltuq+G3tCdvYhTbP9LP4eoH3A=; b=y9nYJ53DamO6o1 YJ4BiqmFTOiu7g0ZGj6bz+qIMOcDlOIKFBZqBIpSv6NL/loR+kcmdPmleyEL9rRtHtwUu+f+hwmKY +djQws6txTnRbRD/5KKtzYgpPenyZLQ/hBm201F9IDyVSoLi8xYo3EZVsiw50JTFNtzUC9wIla0+w aJvmC2W9UjRPXLvLQ1+HeP9q3qd+8hjHBm+GhvlTxMfJpiJ7ffjt1Kol09MT9GKI18QD39s/boNvq 9gtiF5LWxxmn1l6vh5KXxek8gcRuLCy48kLgReI6TUd73pHHlkC7wfieRB4L8vhRcDz/G86HW6cCV 2woHnFzj9q2nJVx+fkYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siclj-0000000837q-0ifZ; Mon, 26 Aug 2024 16:40:39 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sicjq-000000082gy-3LD0; Mon, 26 Aug 2024 16:38:44 +0000 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-53345fe848eso1019459e87.2; Mon, 26 Aug 2024 09:38:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724690320; x=1725295120; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=752Mrptz3EsbmUrr2Glsdy9heW92gw97tgRdBEx4Wo0=; b=NTAqYKhx5XRHv25z5RG4e8Q8UIrtkBV4Pv0KdMp3iIDpN3FPR65Ss98XEWRmh0FQst I/7hj9TA4y6u7wvEMACfqqcsjqOvNgUS5Lhl78NQyhKlIEU/q8gjgJLrVyr4DcsXkm7u UuKE3lyc7wcjllbNp0n0hoBM2tIzw/kxu6P9rLhXDWfsU0aWh++KGUU08c5LHFO6e/Sb n5NMAyyLDHd1h4g1BVYiCJ0GRxsU9C+RmRAB9dnUCeReKcIIa6wtWN9kH92fnERK0gvj zgrbPKlIerkCIAe1N3SI3uGFXp2Cru3vNM8wdpqILJZBjBB78zx82/+H14CmXpbtjAdX YwCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724690320; x=1725295120; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=752Mrptz3EsbmUrr2Glsdy9heW92gw97tgRdBEx4Wo0=; b=TCzY87/YhOg6GR0eqRU0W+Ln7C0TqlwoYeODiXeChYQzRZcvFGRCKO9lS275HaZy5l nPiv581zDhqfdgtXTEy02UZXmJ/4sVdYQz/XMx0AgqbUGcuvw/7WnjD58lZ5qcvEB86Z fquoaLY5LRFkqpBAtGyGJSvWZiZhzETFWrWCcHmD/kDPUr6W9UGCSwpAjkib/k+v+J4j GZJ+KSNcXE5RLNLIdTDpLfMNOYlGSa7Bi2NMw0eZRM5wJ1ohGOc6H5bCW6uyDwKxCrP7 9L/V1bUFbEbhMWnwfjsX2iPfLBx2MI4g0eVHZ0wz0UMPDJlHK9Palqd152892TKhWhiO 5vAQ== X-Forwarded-Encrypted: i=1; AJvYcCUZImwVwtPKM3JYHi1K5UKLDWpZWDxRJJAh/88r79bae/WjA9jGMUNtsq48l442/a6Qb/G9ApLmU3FLA4Ea74Z1@lists.infradead.org, AJvYcCWQ8f7YrrqB5rEvq5L3xQ0mvCWzFZFsWK8QmaMckEggkDJeyL6f9kYJtW8yf7x5T64vSW4024w3bgr9CNi1Fig=@lists.infradead.org X-Gm-Message-State: AOJu0YxNtK1EEPyXRh0y67X94d1Iy+gtdwxcQ2jI0KBFo/S+kXeLr8Un /9b6vd8ncoXwXbynPHW7clCWjdg0ou2nhV6aNxDwfJDvDHbwLg9O X-Google-Smtp-Source: AGHT+IGc/UAzFSmVQIQ+Hglo1jjzZjGNfHpwVXB7AZL+IUlmod8yK3tbxu7FQIRBiL9BAjkK0n1CwA== X-Received: by 2002:a05:6512:b11:b0:533:dde:bf07 with SMTP id 2adb3069b0e04-534387be364mr5038397e87.5.1724690320147; Mon, 26 Aug 2024 09:38:40 -0700 (PDT) Received: from ?IPV6:2a02:a449:4071:1:32d0:42ff:fe10:6983? ([2a02:a449:4071:1:32d0:42ff:fe10:6983]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484b29sm680320966b.162.2024.08.26.09.38.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Aug 2024 09:38:39 -0700 (PDT) Message-ID: <2ee6f0a5-a1bb-4b62-ae6b-8f3828f8eccc@gmail.com> Date: Mon, 26 Aug 2024 18:38:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Johan Jonker Subject: [PATCH v1 3/9] clk: rockchip: rk3228: Drop CLK_NR_CLKS usage To: heiko@sntech.de Cc: robh@kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> Content-Language: en-US In-Reply-To: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_093842_892056_5CF9BE19 X-CRM114-Status: GOOD ( 11.51 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org In order to get rid of CLK_NR_CLKS and be able to drop it from the bindings, use rockchip_clk_find_max_clk_id helper to find the highest clock id. Signed-off-by: Johan Jonker --- drivers/clk/rockchip/clk-rk3228.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.39.2 diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c index 7343d2d7676b..ed602c27b624 100644 --- a/drivers/clk/rockchip/clk-rk3228.c +++ b/drivers/clk/rockchip/clk-rk3228.c @@ -683,6 +683,7 @@ static const char *const rk3228_critical_clocks[] __initconst = { static void __init rk3228_clk_init(struct device_node *np) { struct rockchip_clk_provider *ctx; + unsigned long clk_nr_clks; void __iomem *reg_base; reg_base = of_iomap(np, 0); @@ -691,7 +692,9 @@ static void __init rk3228_clk_init(struct device_node *np) return; } - ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); + clk_nr_clks = rockchip_clk_find_max_clk_id(rk3228_clk_branches, + ARRAY_SIZE(rk3228_clk_branches)) + 1; + ctx = rockchip_clk_init(np, reg_base, clk_nr_clks); if (IS_ERR(ctx)) { pr_err("%s: rockchip clk init failed\n", __func__); iounmap(reg_base); From patchwork Mon Aug 26 16:38:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13778341 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8B6ECC5321D for ; Mon, 26 Aug 2024 19:00:31 +0000 (UTC) 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:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gMey2aw7MWISQqWw+GQ51x280RvNVXsCy5YSL9aIU2A=; b=nv8DgGLpbYvxOL GOi23gcqPezzkgvkvHLlV19Z0XYFUE9vBPoUs3R83lDkti80jqoG4/jd/7YnX1liOO866NiNaHf9k JPwEJKiUE3cLYYWcfR20Q6x4+7BSnrZmIB5a8fVwPaRdu+UbVW7mmBchL6zHlMnD1p0jISQ/U78ag mYXKI+tIr+y4QqoRmXJDUv7HN0BuQ3Fx4Nfi4oRvyj38L82KU2wGxbAwhiYYt1rY+FJ7CKLFKl2d6 TDQXMKLFLDvrIIZYbFupM//E9xxIQNB8r+VSOKaSWNTfybJBpC3qf7MrdFESFNUG2thcSH+9IkK87 nB0+X4cJyJjczFkNcHbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siewz-00000008QPM-2eGL; Mon, 26 Aug 2024 19:00:25 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sick2-000000082kd-0L9F; Mon, 26 Aug 2024 16:38:55 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5bef259a71fso652242a12.1; Mon, 26 Aug 2024 09:38:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724690332; x=1725295132; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=EZu/jBjd1Q70dpjtoHTLkvik+k0qgpVx09i6KQH3MDg=; b=KHDPSYFzQoI6qn0CiXzeBO9PHrDFIblS2/YRknewA8v4zqmymCyg2rnbG3jBfaLoIw SwHThViMlr5Sj0RNgdYbgQQQsfDA2MZYKi7UQ7xnhzyqyDVYHE1ivvuOvGlqS8bnaSL5 bBkFQIFakuh/Us/hvQwu4esC+JABmLRzJcAHHj0g7ZhQmJieweOOwENHMaYQxB/XvI9e DRYd5Ny6bEOWxgWlMioVwrPyappdTz/l59pZp6JuKgqwZQBmL/zI3E72l+PL2TSgXDyp v+ExAyTIc4c5iZVMCmOy8raKkctqCLaUOO5QzWp9S4AQOBMuOLXYv/j4R3BCtfvT0z/B nQjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724690332; x=1725295132; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EZu/jBjd1Q70dpjtoHTLkvik+k0qgpVx09i6KQH3MDg=; b=X+nqBkoc3BK28qJ2noOVMy2q7CZw31WtAE2TiVKKftb29IRqEf7/CUPDg4aNwVGef6 WA5AjCkYXHyfEQ1y3Y+HUg35LMhbhuh8SLvKPoh1bcUZxLN1RXxXDqKhFV2H3VFXqI/e zGnLHk6tRkLR68DQOLoVlAZdYrExUDBaQd39JRY15oSq5iDVHczIfJK8lyBe+aFZHYVI RY8vrzggPdn9FT5Ctpu7ex4EofEV6t/IIO5/vNqMINxJKeRdEQoRfuWCySaTCcvdQ8pr wlhmsjryl9tezn3j7Kcj7cj6ymRpImXqk00+xdM7zw9GTIaRDDraE+fe55zIlyHL6o13 BV6w== X-Forwarded-Encrypted: i=1; AJvYcCVmaECCMjh3ZnmSq005ALD7F7Xo+UnC0/y18XZQjbABc1ZUHzQZ/Q91jB0kLQ7HZdxbGIe4gCfAY18nEYF0Qfo=@lists.infradead.org, AJvYcCW3/W8Tkg4m/ITHf0Fraei+ot5KgdulnKoQntYASOnhVd56M+Vh/R6VHGODdeSiUGqRq5wmMnaWdt/O3EXYNkyY@lists.infradead.org X-Gm-Message-State: AOJu0Ywkzi0/UnM/nYAxVjgU3npUQu75UgzCJs4doLbVICKEitnbirUl sj9UKw91GD9jmv6TXBKqjzb/qb7NfMMXi6mj8FoFlVn5MlN4HnWW X-Google-Smtp-Source: AGHT+IF5/mm796lJvJrh2R57EkeRqBcf4GBAINfr26Gtc7NdeyL4EuQ0tSkGoqsTXngxQRCUC4zWNw== X-Received: by 2002:a17:907:9724:b0:a7a:9f0f:ab1b with SMTP id a640c23a62f3a-a86a54bb7e9mr373585766b.7.1724690332196; Mon, 26 Aug 2024 09:38:52 -0700 (PDT) Received: from ?IPV6:2a02:a449:4071:1:32d0:42ff:fe10:6983? ([2a02:a449:4071:1:32d0:42ff:fe10:6983]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f4363b5sm684267966b.133.2024.08.26.09.38.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Aug 2024 09:38:51 -0700 (PDT) Message-ID: Date: Mon, 26 Aug 2024 18:38:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Johan Jonker Subject: [PATCH v1 4/9] clk: rockchip: rk3288: Drop CLK_NR_CLKS usage To: heiko@sntech.de Cc: robh@kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> Content-Language: en-US In-Reply-To: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_093854_180185_75ED85CE X-CRM114-Status: GOOD ( 11.15 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org In order to get rid of CLK_NR_CLKS and be able to drop it from the bindings, use rockchip_clk_find_max_clk_id helper to find the highest clock id. Signed-off-by: Johan Jonker --- drivers/clk/rockchip/clk-rk3288.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.39.2 diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c index baa5aebd3277..90d329216064 100644 --- a/drivers/clk/rockchip/clk-rk3288.c +++ b/drivers/clk/rockchip/clk-rk3288.c @@ -932,6 +932,7 @@ static void __init rk3288_common_init(struct device_node *np, enum rk3288_variant soc) { struct rockchip_clk_provider *ctx; + unsigned long clk_nr_clks; rk3288_cru_base = of_iomap(np, 0); if (!rk3288_cru_base) { @@ -939,7 +940,9 @@ static void __init rk3288_common_init(struct device_node *np, return; } - ctx = rockchip_clk_init(np, rk3288_cru_base, CLK_NR_CLKS); + clk_nr_clks = rockchip_clk_find_max_clk_id(rk3288_clk_branches, + ARRAY_SIZE(rk3288_clk_branches)) + 1; + ctx = rockchip_clk_init(np, rk3288_cru_base, clk_nr_clks); if (IS_ERR(ctx)) { pr_err("%s: rockchip clk init failed\n", __func__); iounmap(rk3288_cru_base); From patchwork Mon Aug 26 16:39:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13778167 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65BB5C5321E for ; Mon, 26 Aug 2024 16:42:18 +0000 (UTC) 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:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=b/3gy5TVFpZGgp++gf78/Cp1U1/JSej/xxFmWe7Nt/A=; b=VK5ifGEulCXO4O Hd4BOMSEHYxwPsd+PxD90CLSc8Kq+MIjK5b0zDmfxCh2YpWMiA6Uw+7GqDVcWbmI9gtJsCpYmZ4G7 cJ24JRKf0tRb2RoDU77/kx8ZwxMk3t6FVNdB/vekDNp4ZzClHJ5pQpQoSnPXXpSRFstRHfCRPASN1 MFiiGgOlB+2SuFRQMyESVI+k2cojySwX6mVArgMsMIbCZw8AXgZD+6H3sPcH8ImAb+Sec/OmKcuVf ow/iHNPO/CJEJk6hvU8e8/vhF7ZFwRm4o19McQac9/Iph4GGvzi6bGFUxAskFBUVLXNrDcvCBE3dD PBQNfvbZ1CK6HjbFJf0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sicnF-000000083YX-1ihX; Mon, 26 Aug 2024 16:42:13 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sickE-000000082mS-0ZvU; Mon, 26 Aug 2024 16:39:07 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5334832fb94so1004593e87.0; Mon, 26 Aug 2024 09:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724690344; x=1725295144; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=0pQNjRvPbGFwIbtiuAF6ctUFukzjUNsN4+HfbcLCR3o=; b=jWdg257ZDeeeiqf/g8IGnj4zFcBmVf8G0/Ol/DQHdHUszkDolvuJsU6Db6vcXlM/QF 7QtGO6f79d326OGInlwxKFq97z839ajvmZyifX+w1p4Rr+PHo+jYlIidMsz2/ilhhGF4 SL36ZgvYdlUv36Y6K4XLhedJis8M8Bx/u2xsl5xemQHgqm3BW5mhTRsThk6F25ghnSRG 37BseVuzUDvimbSgp9uw6LYJAUZesqUQB8AwXx/ARI2VQ93X0byxyp0nGb+XS0SBu4Tj o/HGwgSkY8bKdfL47IIjYzrx2rvhOdkiiBkbNUO6r7XCRq1ytNYrHzr85ipxbI9JrolT x+6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724690344; x=1725295144; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0pQNjRvPbGFwIbtiuAF6ctUFukzjUNsN4+HfbcLCR3o=; b=pPn0PNqmBEusNycCr//KTLQ2mleiRqnGodRbfZEKqWfl4/3AIGHOrwYYFgBHGE3sRR byoomFZghiZT2hDr7ihzJtcBatz89Q/tPJ2Qd4VW/51znJ6U5Q2XijFIpnWQuO7nVsLp u+hhZQCqUJGxOU4Gx9Tg+DGiB8ABkxTUpSX6wCiB7dA2AgKgH+2ZSghdjJNkBRE3cjnA af/kdeGG5o8NnS3B4c8IGT/CgOjUC78SsojglsLFF0PcoIgy2yMFrOi2dL9ahz4nykXz FprXsVAwPHee4y8Ym4l4ehX4bDR9+16SM7NgbRMgNVEFk6mpZiXeGLxi5hwiriE6s2jn 3NEQ== X-Forwarded-Encrypted: i=1; AJvYcCVgG0tXBzur5LUcK1ZSUVsr6RmWUPvhN29FSsMZ40qaGIqQXuWbQSpFJ7FF9+DVsXc6pd+/etNj+iLjXPN0BBE=@lists.infradead.org, AJvYcCVxCOG8Joy/cw7YwL2rklvpRqd28zbDCzG+Ofa983pxrSCoz4rKZ+L7mkBPkDwCdvjczQMj9/W/rOLa3EKHddZR@lists.infradead.org X-Gm-Message-State: AOJu0YyvxjUQPx/7J71Ako4EhQRDmDmzQQpVlPi1Nhkbnj6jiez/IRdb kPjkB16IimqZTSF5/u/9t76HzeYHrL8mLxkfjiSMPcQ13fJCenzr X-Google-Smtp-Source: AGHT+IEM7G/1hSJu1S8jVW53HPtYBrabXkywCD2sERfCFLDL6cK0F7718zBUberYt362t0n/nsDo3A== X-Received: by 2002:a05:6512:1592:b0:52f:c142:6530 with SMTP id 2adb3069b0e04-534387c4976mr3999893e87.6.1724690343597; Mon, 26 Aug 2024 09:39:03 -0700 (PDT) Received: from ?IPV6:2a02:a449:4071:1:32d0:42ff:fe10:6983? ([2a02:a449:4071:1:32d0:42ff:fe10:6983]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f484b51sm696457466b.146.2024.08.26.09.39.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Aug 2024 09:39:03 -0700 (PDT) Message-ID: <9fbca2d8-f904-4913-ba05-8715e748a454@gmail.com> Date: Mon, 26 Aug 2024 18:39:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Johan Jonker Subject: [PATCH v1 5/9] clk: rockchip: rk3308: Drop CLK_NR_CLKS usage To: heiko@sntech.de Cc: robh@kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> Content-Language: en-US In-Reply-To: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_093906_217956_AB2EB8CE X-CRM114-Status: GOOD ( 11.51 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org In order to get rid of CLK_NR_CLKS and be able to drop it from the bindings, use rockchip_clk_find_max_clk_id helper to find the highest clock id. Signed-off-by: Johan Jonker --- drivers/clk/rockchip/clk-rk3308.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.39.2 diff --git a/drivers/clk/rockchip/clk-rk3308.c b/drivers/clk/rockchip/clk-rk3308.c index db3396c3e6e9..95a9512a41a3 100644 --- a/drivers/clk/rockchip/clk-rk3308.c +++ b/drivers/clk/rockchip/clk-rk3308.c @@ -917,6 +917,7 @@ static const char *const rk3308_critical_clocks[] __initconst = { static void __init rk3308_clk_init(struct device_node *np) { struct rockchip_clk_provider *ctx; + unsigned long clk_nr_clks; void __iomem *reg_base; reg_base = of_iomap(np, 0); @@ -925,7 +926,9 @@ static void __init rk3308_clk_init(struct device_node *np) return; } - ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); + clk_nr_clks = rockchip_clk_find_max_clk_id(rk3308_clk_branches, + ARRAY_SIZE(rk3308_clk_branches)) + 1; + ctx = rockchip_clk_init(np, reg_base, clk_nr_clks); if (IS_ERR(ctx)) { pr_err("%s: rockchip clk init failed\n", __func__); iounmap(reg_base); From patchwork Mon Aug 26 16:39:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13778188 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D84F4C5321D for ; Mon, 26 Aug 2024 16:43:04 +0000 (UTC) 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:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eeXcK+YBFEU8fu+BGEmhEuQ1Lrb2yOUBisv/W+pet4s=; b=B6VHBh6eWe6K8O HZVjrW49lHCOXWYJXdF0ft2BfUOZad8ISlZ0ckDrQnV2TCoENrILrT9inhyQe8zOq5DWCSnmuvwpo 6+53GzlVQpT0YXPRcHYQKfkmWqh2zdrPihXUUoewm5j/PSt6yLddZU0n5HXsPsN1Rt7qqZDl3/25L jBJ91+5kp4H7KWxKrBvZjrbfmNBBRUqguTAtZGnG7cZ5RVT+HdrbNM2OWTolJl5EeTvUJ7OSYvWjm upttjwiIgobZZIUqpoUC8dAW64GnpPVq/64pZdHNIUPxesY3glpnGKXPf7DTqOoNpOuQLj63dqfKa rSN5e3ZaDyvEXWkG+U3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sico1-000000083qH-0uf8; Mon, 26 Aug 2024 16:43:01 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sickT-000000082pL-0me4; Mon, 26 Aug 2024 16:39:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:References:Cc:To:Subject:From:MIME-Version:Date:Message-ID: Sender:Reply-To:Content-ID:Content-Description; bh=tOSmg+U9ko9Cd03A5hlrj+MTA2zfydTPh5GQ0xhJtAk=; b=Hhx4GcokOUHU/v6wg2XXbw2Guo VJ9OQfK7PhQNqer9ORXhkwMF5Cd2RBC0LQr228KGdAB7d1PWLbNRK+1MqXPGR6Ygu18bPOBk7+EFl PBSTAgKF+3LSQDSTPMiGzUsdOVXMmKaFO074WolXCu8trxO0ItPuVOraP6I7gTnriB0OvKig+7p0z JWDXWHSOtJgPuxxVXZXX4kVZJq7Be6xiDJG2BMFz2D8N5OpAE9Sf/nUcOknpeNBA3eEOrkZh0q5vm HQZNBjlEkj/TdB3chnZkPBtAs/9PiKsvzsjXD/D5lnLHVwKNmBNSvZlpyIkYNLcZCA0tD+EfDS4oH WjMwPYSQ==; Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sickQ-0000000AgPZ-0Zeg; Mon, 26 Aug 2024 16:39:20 +0000 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5beceb61e62so622688a12.3; Mon, 26 Aug 2024 09:39:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724690355; x=1725295155; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=tOSmg+U9ko9Cd03A5hlrj+MTA2zfydTPh5GQ0xhJtAk=; b=era8zXhQjVro3pF38al2ncus1tNzPOOvKgvTX59gfdA6wPJSsPEUGSsDTz9MxMoFaL trDv5aOjAbXXOcY+MB1UmhP/HT8/ZeBelW2ZgrqlghHVJXciqEMBbO1EqAI+2mNM5LpU oDX33ebheKLf1tzqXLwoh61VNtIlncA3B/1IzdNROrEoMR7/GlXnwB7qO6LMw0Wzthzy 9X4l4w0NFNFxl8iY6g7Lwo7Pzc/SpYtyyM2z3iPmZZbg3XWUNDqz3sg6Jedl8KkOvm7c EB5D26fMiKUS+Pf6HTpHomU3wcaxaogUK1hcgMnXWswYjfDMMcx4s3zgwMwbfTvZVt1D yzrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724690355; x=1725295155; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tOSmg+U9ko9Cd03A5hlrj+MTA2zfydTPh5GQ0xhJtAk=; b=obq8kSeJNds3e6ShNwKdDjk5wm4rxrHocgZ8a4o8zcFs/ZdT/T6wGDrpW9zA/TW/vD MVOk9b9kPr4HACLRtapaaZ0NwZKAerzYpvJDaD6MLarQIS8Rh0ovjK6f8GZcLqRrwhUl /1hnPKkmFLbZQlDpUeJPDAuMmSeTdLV545nrf0Unz7TzR/+q7Gzzcchq35uT51bnXwZY kFyG4MjZdi2WGHvrSQR7JTOWSJrQoPB/mmHOj6XkkXITAcZh29qMNsrpN9ImIYHCDYf+ fsVvcD8M0/4ltdfZaXyUzyq6YwA+vEe53QV13V47ubobFriV25q/0xoW677vz3TNQqXn lCfA== X-Forwarded-Encrypted: i=1; AJvYcCUel/tiZt+x6FzVBUqdRJjN5fKTLtAVo8cDWL5OxHTrzOaeBiZQVIxtQ3hp+AK9SajgQ5Hb35Na9yhul08Sjzk=@lists.infradead.org, AJvYcCUft0nizTRKTX4z49eeYeo0W7jNLveShSwTaDjFCgLZlxN/+v7MfZOtV6xr0hXJtWuIT8Mhwp9IyMGdJlVa7bFx@lists.infradead.org X-Gm-Message-State: AOJu0YzuULTe1mxF4ePqmzLvoz+Afs47BGZqlE/DXx3ICf5GXljhNiDc E/xNMXnrgSQnU6/G1LHnl0nkudLmGberc3eVy5q/1vpg9t1rRugi X-Google-Smtp-Source: AGHT+IG1NTXW7GOuJLnWfkEVMy5ehfNd0YoEsMP2KyOoOKtU5dmeMYDV86OyxSCX9fEeyld4pF2lcQ== X-Received: by 2002:a05:6402:4307:b0:5be:9bc5:f698 with SMTP id 4fb4d7f45d1cf-5c08910dbdemr4226209a12.0.1724690354491; Mon, 26 Aug 2024 09:39:14 -0700 (PDT) Received: from ?IPV6:2a02:a449:4071:1:32d0:42ff:fe10:6983? ([2a02:a449:4071:1:32d0:42ff:fe10:6983]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c0515a961esm5781754a12.83.2024.08.26.09.39.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Aug 2024 09:39:14 -0700 (PDT) Message-ID: <38ea6be0-3596-49ec-8de9-aef9c7f2bbb6@gmail.com> Date: Mon, 26 Aug 2024 18:39:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Johan Jonker Subject: [PATCH v1 6/9] clk: rockchip: rk3328: Drop CLK_NR_CLKS usage To: heiko@sntech.de Cc: robh@kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> Content-Language: en-US In-Reply-To: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_173918_346013_A54BEE84 X-CRM114-Status: GOOD ( 11.46 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org In order to get rid of CLK_NR_CLKS and be able to drop it from the bindings, use rockchip_clk_find_max_clk_id helper to find the highest clock id. Signed-off-by: Johan Jonker --- drivers/clk/rockchip/clk-rk3328.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.39.2 diff --git a/drivers/clk/rockchip/clk-rk3328.c b/drivers/clk/rockchip/clk-rk3328.c index 267ab54937d3..3bb87b27b662 100644 --- a/drivers/clk/rockchip/clk-rk3328.c +++ b/drivers/clk/rockchip/clk-rk3328.c @@ -881,6 +881,7 @@ static const char *const rk3328_critical_clocks[] __initconst = { static void __init rk3328_clk_init(struct device_node *np) { struct rockchip_clk_provider *ctx; + unsigned long clk_nr_clks; void __iomem *reg_base; reg_base = of_iomap(np, 0); @@ -889,7 +890,9 @@ static void __init rk3328_clk_init(struct device_node *np) return; } - ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); + clk_nr_clks = rockchip_clk_find_max_clk_id(rk3328_clk_branches, + ARRAY_SIZE(rk3328_clk_branches)) + 1; + ctx = rockchip_clk_init(np, reg_base, clk_nr_clks); if (IS_ERR(ctx)) { pr_err("%s: rockchip clk init failed\n", __func__); iounmap(reg_base); From patchwork Mon Aug 26 16:39:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13778189 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55BE6C5321E for ; Mon, 26 Aug 2024 16:43:53 +0000 (UTC) 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:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=u/pUGCpyLRYjOCeEsZTedUIQtFSDg6KhcDBUzYlmfUA=; b=jDPJ60O0MTyjJK nwhWH8w4hFf7V/oW1ys35nFTxykZ7WojrFycjx+Kjey8AXSn5y115ry3x+YvqLpgIcc0ll7aJBIXx bmF+vHY2uBbps3nWkFR+enwi0U98EgJJhf/NzesR/tx2460llKy9/SRBmhPIiewsAyaIi9IcggzC2 rdhNujfOfoYc74FnswMfgf21DhB8kpn7dEAW2Puvd/PvtvDxlG7999r6arAc8IWSZPisIjwHl8zld BmeVDaFXPDNhllWsKOiTtqnplwCjeuqkwQar4cPAgcK7WzsOIuT6ziYwRn2BwLRVpv9fjK6wxgYE5 Q6DD1EMGlAC1u8Re2GMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sicon-0000000842S-0qKz; Mon, 26 Aug 2024 16:43:49 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sickg-000000082rU-244w; Mon, 26 Aug 2024 16:39:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:References:Cc:To:Subject:From:MIME-Version:Date:Message-ID: Sender:Reply-To:Content-ID:Content-Description; bh=+i2AlGYsoxr4BsaWm8n7FjsczEQSUj3cbbi624qx9q0=; b=IXr9kDNkOyxomlLhZtEKg+hELp nrg+DMiMOeTqpKysyvfcxSAIpoQ0/cAl527kW6GmwEGHvINxVYJfRwUtEhXlOGy6hjOEadAXQGelJ KJ9FU9AfTlU2Bg3cL3lCjW4eKLXrqqGQ5pN+Zb7apzJZnEoGfCbqJWEIb0w5wDDrmmJk0wnFSqNji XQAKVm8ixlz5H8xYUqz8kuAznPlNCtZIcIWw9usyqLRh75NKW8KlxlQ7a6PiY0SHyCBlizNHHbVOT rzsNpaYbt/pL16/EDroMj0fAYMzjQ1pcQ+Yt9+nf24ET7SbXx7vKELx2qMm6PaD/b3462rQ2GwCn5 yIpgUffg==; Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sickd-0000000AgRb-0BNV; Mon, 26 Aug 2024 16:39:33 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2f3f99ccb76so1954361fa.0; Mon, 26 Aug 2024 09:39:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724690367; x=1725295167; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=+i2AlGYsoxr4BsaWm8n7FjsczEQSUj3cbbi624qx9q0=; b=XvBS4idCvd9fmz911ZZwpJcZG5GJMds1i7OUdG97IgtoGYJaNCjZiEV1dsWs3g9rHX wBa+avMFbCxU9kyQNBRo2AF2+/TjfPcUJZpHHXqVG1vSvev0BvbQgsuZmh2MU7FRLSmw /lOCTJ9PF59FklL/5t+z2oSD5TVodcUXCYfUPVcjUt3bjzWAb49i+OXI10Ev1BeEw5xh Lt0zwltip2ay2M7ddz8I3dDfX1CTSYhuLXUIqAmIapOD5sKIHpXnPQNCG3dfrCsHiyrF IpPluEiw9gtfH62IHj3BUziton6k4alrLJKNG1O7rkRJQvY6isHbERzeqJJrqoSKEISz ADXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724690367; x=1725295167; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+i2AlGYsoxr4BsaWm8n7FjsczEQSUj3cbbi624qx9q0=; b=Cix1dkNL+Uto4iurmEcZ6+Cji/2GN3rmEYxx/8cdtmjvtM/jQvzcnqSoNoGIRpW+F1 xuS/ix3UsQe9uRTqp2ZV8FIcIBLKFzS7WTJ5BwRdS88elLFN6i2UgHsQjSIGVzXz696/ jRUcyF9SzmXvaF3v+S1wHiif/j/TexXv/l0za1np5XY02v0IeI3OeBBc6D7+7rSYpT/w z2e9Dvrn4FxL2b1DX3pBFFdskA504Gkh/cHO9HXWZuz/qf+DoteEXiC28ROJG88MX1uz AUiHHFJQ4y4g1dPcdTXC2teHNhiHq777rGsDwpR048njlOepCqUKfK4tm/vvA3CmsdCK 5caw== X-Forwarded-Encrypted: i=1; AJvYcCWZdvYfgsVWmruLWFdg8ucxi5DeUSKK+aSpKFwkUGICFN5XvSsj+KwKIXaIvotPu+4LB3BO3vpTeinF5vDzwk5Y@lists.infradead.org, AJvYcCXpS2YX1gTYC1fsvKTbos9zNmD9buXFtr/Rlr4BZnngNXkQ1k6hP2LmgikrePA7o9np2//bBXRHbsvZgfUta6c=@lists.infradead.org X-Gm-Message-State: AOJu0YyGLxbtohHS+Vd7JyB+R+2td2Kxt3Tb2kFYUh4G8bQ0yoQgX5ii cn0eBCF7hvvTwZehRf459uzE8aebhEupk+SWXbUADKGgOmcXxjls X-Google-Smtp-Source: AGHT+IFlY9yEz9cwzKGmpwql9VSj73wxFguXPTKKyguV45o2cj0X7EvoITq5F+dR8W084K0HOgqukA== X-Received: by 2002:a2e:bea3:0:b0:2f0:29e7:4dc2 with SMTP id 38308e7fff4ca-2f4f4944d49mr48761801fa.5.1724690366281; Mon, 26 Aug 2024 09:39:26 -0700 (PDT) Received: from ?IPV6:2a02:a449:4071:1:32d0:42ff:fe10:6983? ([2a02:a449:4071:1:32d0:42ff:fe10:6983]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c04a3cb0b2sm6101451a12.22.2024.08.26.09.39.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Aug 2024 09:39:25 -0700 (PDT) Message-ID: <2a19c3cc-5f4d-4d03-90b2-e0bb13b0502f@gmail.com> Date: Mon, 26 Aug 2024 18:39:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Johan Jonker Subject: [PATCH v1 7/9] clk: rockchip: rk3368: Drop CLK_NR_CLKS usage To: heiko@sntech.de Cc: robh@kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> Content-Language: en-US In-Reply-To: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_173931_311889_1F1A9C6C X-CRM114-Status: GOOD ( 11.46 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org In order to get rid of CLK_NR_CLKS and be able to drop it from the bindings, use rockchip_clk_find_max_clk_id helper to find the highest clock id. Signed-off-by: Johan Jonker --- drivers/clk/rockchip/clk-rk3368.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.39.2 diff --git a/drivers/clk/rockchip/clk-rk3368.c b/drivers/clk/rockchip/clk-rk3368.c index 2c50cc2cc6db..04391e4e2874 100644 --- a/drivers/clk/rockchip/clk-rk3368.c +++ b/drivers/clk/rockchip/clk-rk3368.c @@ -866,6 +866,7 @@ static const char *const rk3368_critical_clocks[] __initconst = { static void __init rk3368_clk_init(struct device_node *np) { struct rockchip_clk_provider *ctx; + unsigned long clk_nr_clks; void __iomem *reg_base; reg_base = of_iomap(np, 0); @@ -874,7 +875,9 @@ static void __init rk3368_clk_init(struct device_node *np) return; } - ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); + clk_nr_clks = rockchip_clk_find_max_clk_id(rk3368_clk_branches, + ARRAY_SIZE(rk3368_clk_branches)) + 1; + ctx = rockchip_clk_init(np, reg_base, clk_nr_clks); if (IS_ERR(ctx)) { pr_err("%s: rockchip clk init failed\n", __func__); iounmap(reg_base); From patchwork Mon Aug 26 16:39:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13778190 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 61DEAC5321D for ; Mon, 26 Aug 2024 16:44:41 +0000 (UTC) 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:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hM9TXZTf5Tq6Cb8hvWtcknn8sOyEAPlrohr0D6jsoSc=; b=Zrmrf9aOJsFLHF AuhQbaJy7cR6GYG8763r9z5xQFD1l5LHJ4f8LBdSBczmD5Z6UpTMqpYuy4X5XnAvHqDmqFNM6dnV6 OgBszWqK/bOX2jpobSzVFugnhofPyoS5CYEEOKxmEcaNzH1ToNkgeEoCOw2BtPDpQoWGRP2ihGne5 xFOpelJUaEa/GH5giypIfZcNqFDwoVJsB/DCzArydHU+A8z54TP1h15eKWhdi+HZ41upq5H2ZnVSL fIIPjSgdJVUcghjS6TSXReb7oYBJCM3vs716oF/yWxYbl4B0VxFXKy49moNFyNIBNbHml9OZcQt0C wUd9e+sibYiI/MVpy3Gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sicpZ-000000084Gt-3cQg; Mon, 26 Aug 2024 16:44:37 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sickp-000000082sL-1YCP; Mon, 26 Aug 2024 16:39:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:References:Cc:To:Subject:From:MIME-Version:Date:Message-ID: Sender:Reply-To:Content-ID:Content-Description; bh=FLEI1Cb2UP4A1vC0h0p4/XVr36pqAHZWOGV9GNwqygk=; b=eGT0yP8kLw8JP7nIIDEHOKpjF6 7AzBmQCfllrbFBOJUOwAmjVNykMhboAmwotCkR3YIU9jo+Ish7hd/frkjxpEUa8xpAZgrYFp3n0D5 PfXpyAAj7LRC2N2QcnH6/M5qBB2DGs4/dLu7zbTgUqFiTPjD8Rc5RJFgkb43syW0vGdZvjPC2vXV5 c6mYWDsC+gjMrJBmMWsnp7rxxVQZQZ+r07zerFzhnqekpvtkLmB5Upa1/mGXkV52lPKI6n9P+9O5j 5BIarPeqiJcLtwPU/BjQuPIMQJEOO4ebQy7FzGq6tcp15Ou6G2eaqRk4VybwS83Al1uoetS7oYMQa VpYS8DTQ==; Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sickm-0000000AgTl-0TeF; Mon, 26 Aug 2024 16:39:42 +0000 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a86a1abc05eso18821566b.0; Mon, 26 Aug 2024 09:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724690377; x=1725295177; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=FLEI1Cb2UP4A1vC0h0p4/XVr36pqAHZWOGV9GNwqygk=; b=LITtLIlaRX1tipXOmgWpLgaHQp2sonXURHg94FnszE0B1G/rulDzoZgmpW65WfjmZQ XoO+PXlTAyxmLUfj2s0TNymGy+lBDLkBxEQSVqb9xPVeAtnehbj53WupSd/iV26FSD3W 8Rg+mhmF52qje7YnTIj1WuABJeadJklYWgA/svNogOZr6XffrX/zRNHdyOUk5Fjs21P1 C6wY5uT2hjbKsWsFQT2ZAoFoPzAtWRbnjbBEblgHcbTaronT4cUA76vLcItyPcyqh69t 05AKKpJG0cmUZ053bqPM2ZFw+BEwksXjGZDOaBAC9VdMsskuEbUhCYrscYW4kXet+HbF cJFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724690377; x=1725295177; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FLEI1Cb2UP4A1vC0h0p4/XVr36pqAHZWOGV9GNwqygk=; b=H7W+JHy/I2w6HE1VdywzQMaI9moSWSlG2jv5KQSbvSCrsXXWsvdrYKtTdt2S/p7CWE rpn3Y8eGGItPaEogvLc9PFJHYelGzmUc5j4xBAuc0l+5yGDBfbrCepM9fwMACzd2L/zk fetGP/O5GPi9h22ZCgWP5c0kHQ6egVyoXg6jpbJjl6rurLyEDpM/1Xiuewvdzg58Ag5X jz6fV+S6oXQ4ndfq3Gg89xFaNaKW50Z4ZzBxHN2s9+XLjLKP0Qqb4/bKBRT6Snty/mzW R6gYvwMQDLJNoBV/3HM/Gn6V33IEjrVM4RErP5RS+xe9Ly+NHnOvSr4hXGla/N5/wWNv 3xCg== X-Forwarded-Encrypted: i=1; AJvYcCVvNQJYRxFk8HcEGtcu9w3u6Ed/ntfv3cgFhZzLew4wFwNH8AZk5UdUQtbNz1A6hOE5bhnyniRMnSJpZNxaUAI=@lists.infradead.org, AJvYcCX0SXJQnNz5mDJOCDWI7g2VPPY/LtIhE5gOqMzoLFXrUQb47IXyFSNGCCCvqd+IOWVIvMGTe+kdWL9LXDDYxAMn@lists.infradead.org X-Gm-Message-State: AOJu0YzL7wDzsTGQCwwBVwbGvCBn4z/y6GfqQZ6pru7KtX6S3LBaZZda FIvt2mkg4nZdJCR3pHTmaHpdduyX4mJZ4NZPT0zJhSgbY/QpvJrY X-Google-Smtp-Source: AGHT+IHL+FuBwtBkHSQziYl5NkPCUp/kCmo45U6Hon3dXAoeItbf4Y2lDeqQXqnhrhLcmTgJXrrRqQ== X-Received: by 2002:a17:907:7e9a:b0:a7a:b895:6571 with SMTP id a640c23a62f3a-a86a550b68dmr508411966b.9.1724690377077; Mon, 26 Aug 2024 09:39:37 -0700 (PDT) Received: from ?IPV6:2a02:a449:4071:1:32d0:42ff:fe10:6983? ([2a02:a449:4071:1:32d0:42ff:fe10:6983]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f220cfesm685727266b.1.2024.08.26.09.39.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Aug 2024 09:39:36 -0700 (PDT) Message-ID: <45f83b1f-64f8-4ea5-bc93-ebf7507a9709@gmail.com> Date: Mon, 26 Aug 2024 18:39:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Johan Jonker Subject: [PATCH v1 8/9] clk: rockchip: rk3399: Drop CLK_NR_CLKS CLKPMU_NR_CLKS usage To: heiko@sntech.de Cc: robh@kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> Content-Language: en-US In-Reply-To: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_173940_377116_704771AD X-CRM114-Status: GOOD ( 10.82 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org In order to get rid of CLK_NR_CLKS and CLKPMU_NR_CLKS and be able to drop it from the bindings, use rockchip_clk_find_max_clk_id helper to find the highest clock id. Signed-off-by: Johan Jonker --- drivers/clk/rockchip/clk-rk3399.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) -- 2.39.2 diff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers/clk/rockchip/clk-rk3399.c index 4f1a5782c230..c2b243d7a5e2 100644 --- a/drivers/clk/rockchip/clk-rk3399.c +++ b/drivers/clk/rockchip/clk-rk3399.c @@ -1531,6 +1531,7 @@ static const char *const rk3399_pmucru_critical_clocks[] __initconst = { static void __init rk3399_clk_init(struct device_node *np) { struct rockchip_clk_provider *ctx; + unsigned long clk_nr_clks; void __iomem *reg_base; reg_base = of_iomap(np, 0); @@ -1539,7 +1540,9 @@ static void __init rk3399_clk_init(struct device_node *np) return; } - ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); + clk_nr_clks = rockchip_clk_find_max_clk_id(rk3399_clk_branches, + ARRAY_SIZE(rk3399_clk_branches)) + 1; + ctx = rockchip_clk_init(np, reg_base, clk_nr_clks); if (IS_ERR(ctx)) { pr_err("%s: rockchip clk init failed\n", __func__); iounmap(reg_base); @@ -1577,6 +1580,7 @@ CLK_OF_DECLARE(rk3399_cru, "rockchip,rk3399-cru", rk3399_clk_init); static void __init rk3399_pmu_clk_init(struct device_node *np) { struct rockchip_clk_provider *ctx; + unsigned long clkpmu_nr_clks; void __iomem *reg_base; reg_base = of_iomap(np, 0); @@ -1585,7 +1589,9 @@ static void __init rk3399_pmu_clk_init(struct device_node *np) return; } - ctx = rockchip_clk_init(np, reg_base, CLKPMU_NR_CLKS); + clkpmu_nr_clks = rockchip_clk_find_max_clk_id(rk3399_clk_pmu_branches, + ARRAY_SIZE(rk3399_clk_pmu_branches)) + 1; + ctx = rockchip_clk_init(np, reg_base, clkpmu_nr_clks); if (IS_ERR(ctx)) { pr_err("%s: rockchip pmu clk init failed\n", __func__); iounmap(reg_base); From patchwork Mon Aug 26 16:39:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13778191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 59AB9C5472D for ; Mon, 26 Aug 2024 16:45:27 +0000 (UTC) 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:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eONJBHm/ad236V4wexPlA3sQsyK5B4kpeloTxxV3lT0=; b=JIPp+kALIHiaaU HQ6qN0p6aLS/gI5g/Fuw6D8kzsz430S1bc5OtIIzK8ts+TeoPwOui0fVKGTbGwt2Tnao6/t3o/fCm kY83oZvg1tuVHMeWd1ROzhwGDuNppGxszpDNe7PPWMVve+mGqpQt+0R19mRlKtDH50cGFJySmiqNW IrebLXV+ZrsWaLuL8TiLWcXJGR5OOiN6HUK8boj2KdbaOxErHEJ/8/6fImJzUCnUgy85T1RPSC3T3 XCOmNG5sRJ3snAYxFDbmQULDriBtrlgmmQWofPP4yk/xwPb0AkRGuEgUYtxl7TvETsIIQsGVlTKIr PUvkh9nNPtAHKKBdg2ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sicqK-000000084PY-1b3b; Mon, 26 Aug 2024 16:45:24 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sickv-000000082tU-3hfs; Mon, 26 Aug 2024 16:39:51 +0000 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5bec50de77fso617845a12.2; Mon, 26 Aug 2024 09:39:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724690388; x=1725295188; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=xEBnzy+nuAfpfauBPCGu34CbakxHPVG1Dzjy87tNiYM=; b=FkN/C7X+84RK3SLBFqr87Jar/ScrgRWijAh8QkLMku3NjVlT4qLXS7AUtV7dRqpCdV xqGTdMk9mYkkjqFb+/QmhoDSlW5xzeocI+Afw1uB1yovpFS60rZULiwQo7RTBCI7t2XB NKPVhtdVqvBNTdFXglFSlpQPsd11yEdWHWz2JpL+OqpkLaN+XYu+AfnxXeG1u7kfw3MI Mwn5Hqy6GgceOzJXOAOgLNDFLCa53sIn4yUf0/24DHkuHMwXqAVAB7O3SJfZCqpK1zFx VREM6iSLjV8yRr9beEzFDk86H+9pSDiJtGXok4w5E+NmkCqmTcihFvv8ARPL6SXPsNfE eKwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724690388; x=1725295188; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xEBnzy+nuAfpfauBPCGu34CbakxHPVG1Dzjy87tNiYM=; b=SQqb0yYT9dLm1f3WUgCFW/lC4Sh4zrVjRVtXJxhtSlBg0RweL20+/1Izuka6ptBd75 31pp21UF5vZDJuFiHstUjMeM1cj4lNZMgZoXqPXfXZk9m3dUbT/mSXM1H2zQ6pZ1xtSU niWswX5eGjcmbWflR5Py8TJiN6XLPOsOFKerJIe4edITv7euKDr3i7LH+0Jp88Dwu/37 99bSzYuMrdVRuJZg2YDt43ODP120JghzKDl5yO+iGZe0KqTaeDwzmIUbqARJug5gvQt9 2rQHpPw9fTB5OqFpc1+1QUdgRoUYPnuhiSZyCBFtV2um4d8rCdUlNHn1i0id9Y2EHel2 ERvw== X-Forwarded-Encrypted: i=1; AJvYcCVmTI0PJ6lzmTJcaJ4iHNROlunhVbepuy0Lv/8piId3XdDgVsrZXFHtAI4OLfIQMZ5E0VYoYkBp7hn5kQWlY7C9@lists.infradead.org, AJvYcCX15VqpsHHLdveTYbk38oBh6rKowy1H+9l4VhEKs3zaKsKy0IDB8bcx53UrNeyHxZqB4T1AheJuuJ7TyrW5A3o=@lists.infradead.org X-Gm-Message-State: AOJu0YwvOnJVkI9guUMLQUmQ5vgMQm3WtLtLIvHXmk7xEZQJyTjse+dj PLtJsJTpi+l8kAnT76J3scRYv2/Kfix4E4tVHVw2cTnk6P+h8G+E X-Google-Smtp-Source: AGHT+IHbARgAmNxg4Cbi+E0/YnVBks6tDcx14l7inz4Q0CkixJluT8YVLmjj50b/VKagIKSP8C8PsA== X-Received: by 2002:a17:907:7e95:b0:a80:a193:a509 with SMTP id a640c23a62f3a-a86a5188f38mr526531166b.2.1724690387597; Mon, 26 Aug 2024 09:39:47 -0700 (PDT) Received: from ?IPV6:2a02:a449:4071:1:32d0:42ff:fe10:6983? ([2a02:a449:4071:1:32d0:42ff:fe10:6983]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f47bedcsm695577866b.145.2024.08.26.09.39.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Aug 2024 09:39:47 -0700 (PDT) Message-ID: Date: Mon, 26 Aug 2024 18:39:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Johan Jonker Subject: [PATCH v1 9/9] dt-bindings: clock: rockchip: remove CLK_NR_CLKS and CLKPMU_NR_CLKS To: heiko@sntech.de Cc: robh@kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> Content-Language: en-US In-Reply-To: <416cdaf2-fef2-471d-a03a-837775d6e7dc@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_093949_959046_133A2710 X-CRM114-Status: UNSURE ( 9.60 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org CLK_NR_CLKS and CLKPMU_NR_CLKS should not be part of the binding. Remove since the kernel code no longer uses it. Signed-off-by: Johan Jonker Acked-by: Conor Dooley --- include/dt-bindings/clock/px30-cru.h | 4 ---- include/dt-bindings/clock/rk3036-cru.h | 2 -- include/dt-bindings/clock/rk3228-cru.h | 2 -- include/dt-bindings/clock/rk3288-cru.h | 2 -- include/dt-bindings/clock/rk3308-cru.h | 2 -- include/dt-bindings/clock/rk3328-cru.h | 2 -- include/dt-bindings/clock/rk3368-cru.h | 2 -- include/dt-bindings/clock/rk3399-cru.h | 4 ---- 8 files changed, 20 deletions(-) -- 2.39.2 diff --git a/include/dt-bindings/clock/px30-cru.h b/include/dt-bindings/clock/px30-cru.h index 5b1416fcde6f..a2abf1995c34 100644 --- a/include/dt-bindings/clock/px30-cru.h +++ b/include/dt-bindings/clock/px30-cru.h @@ -175,8 +175,6 @@ #define PCLK_CIF 352 #define PCLK_OTP_PHY 353 -#define CLK_NR_CLKS (PCLK_OTP_PHY + 1) - /* pmu-clocks indices */ #define PLL_GPLL 1 @@ -195,8 +193,6 @@ #define PCLK_GPIO0_PMU 20 #define PCLK_UART0_PMU 21 -#define CLKPMU_NR_CLKS (PCLK_UART0_PMU + 1) - /* soft-reset indices */ #define SRST_CORE0_PO 0 #define SRST_CORE1_PO 1 diff --git a/include/dt-bindings/clock/rk3036-cru.h b/include/dt-bindings/clock/rk3036-cru.h index a96a9870ad59..99cc617e1e54 100644 --- a/include/dt-bindings/clock/rk3036-cru.h +++ b/include/dt-bindings/clock/rk3036-cru.h @@ -94,8 +94,6 @@ #define HCLK_CPU 477 #define HCLK_PERI 478 -#define CLK_NR_CLKS (HCLK_PERI + 1) - /* soft-reset indices */ #define SRST_CORE0 0 #define SRST_CORE1 1 diff --git a/include/dt-bindings/clock/rk3228-cru.h b/include/dt-bindings/clock/rk3228-cru.h index de550ea56eeb..138b6ce514dd 100644 --- a/include/dt-bindings/clock/rk3228-cru.h +++ b/include/dt-bindings/clock/rk3228-cru.h @@ -146,8 +146,6 @@ #define HCLK_S_CRYPTO 477 #define HCLK_PERI 478 -#define CLK_NR_CLKS (HCLK_PERI + 1) - /* soft-reset indices */ #define SRST_CORE0_PO 0 #define SRST_CORE1_PO 1 diff --git a/include/dt-bindings/clock/rk3288-cru.h b/include/dt-bindings/clock/rk3288-cru.h index 33819acbfc56..c6034b01b050 100644 --- a/include/dt-bindings/clock/rk3288-cru.h +++ b/include/dt-bindings/clock/rk3288-cru.h @@ -195,8 +195,6 @@ #define HCLK_CPU 477 #define HCLK_PERI 478 -#define CLK_NR_CLKS (HCLK_PERI + 1) - /* soft-reset indices */ #define SRST_CORE0 0 #define SRST_CORE1 1 diff --git a/include/dt-bindings/clock/rk3308-cru.h b/include/dt-bindings/clock/rk3308-cru.h index d97840f9ee2e..ce4cd72b9d3d 100644 --- a/include/dt-bindings/clock/rk3308-cru.h +++ b/include/dt-bindings/clock/rk3308-cru.h @@ -212,8 +212,6 @@ #define PCLK_CAN 233 #define PCLK_OWIRE 234 -#define CLK_NR_CLKS (PCLK_OWIRE + 1) - /* soft-reset indices */ /* cru_softrst_con0 */ diff --git a/include/dt-bindings/clock/rk3328-cru.h b/include/dt-bindings/clock/rk3328-cru.h index 555b4ff660ae..8885a2e98c65 100644 --- a/include/dt-bindings/clock/rk3328-cru.h +++ b/include/dt-bindings/clock/rk3328-cru.h @@ -201,8 +201,6 @@ #define HCLK_RGA 340 #define HCLK_HDCP 341 -#define CLK_NR_CLKS (HCLK_HDCP + 1) - /* soft-reset indices */ #define SRST_CORE0_PO 0 #define SRST_CORE1_PO 1 diff --git a/include/dt-bindings/clock/rk3368-cru.h b/include/dt-bindings/clock/rk3368-cru.h index 83c72a163fd3..ebae3cbf8192 100644 --- a/include/dt-bindings/clock/rk3368-cru.h +++ b/include/dt-bindings/clock/rk3368-cru.h @@ -182,8 +182,6 @@ #define HCLK_BUS 477 #define HCLK_PERI 478 -#define CLK_NR_CLKS (HCLK_PERI + 1) - /* soft-reset indices */ #define SRST_CORE_B0 0 #define SRST_CORE_B1 1 diff --git a/include/dt-bindings/clock/rk3399-cru.h b/include/dt-bindings/clock/rk3399-cru.h index 39169d94a44e..4c90c7703a83 100644 --- a/include/dt-bindings/clock/rk3399-cru.h +++ b/include/dt-bindings/clock/rk3399-cru.h @@ -335,8 +335,6 @@ #define HCLK_SDIO_NOC 495 #define HCLK_SDIOAUDIO_NOC 496 -#define CLK_NR_CLKS (HCLK_SDIOAUDIO_NOC + 1) - /* pmu-clocks indices */ #define PLL_PPLL 1 @@ -378,8 +376,6 @@ #define PCLK_INTR_ARB_PMU 49 #define HCLK_NOC_PMU 50 -#define CLKPMU_NR_CLKS (HCLK_NOC_PMU + 1) - /* soft-reset indices */ /* cru_softrst_con0 */