Message ID | 20221126191319.6404-2-samuel@sholland.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4787799wrr; Sat, 26 Nov 2022 11:19:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf4HUmDf7f9Kj1QAmQOIGvwylF/hU17lLc2ZI7kTSYDCdwo+GaR++ZnwC8LMa79K9yznrCwu X-Received: by 2002:aa7:c0ca:0:b0:464:3f28:3707 with SMTP id j10-20020aa7c0ca000000b004643f283707mr41461445edp.411.1669490363857; Sat, 26 Nov 2022 11:19:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669490363; cv=none; d=google.com; s=arc-20160816; b=e8T7bU5HJ7Uud3QeEa9PIw5Cv4ciPt0mh32x5cIbwKlZKX2Hz8ieJlNMcQhv9hZenZ 1ikrVyu99V2nfObST8ZcMNIQJIxaQSGjkoW4r2ieMgk1L0qQhaaI3q6G4IxBlv9obWGY +EGWNaAQQ1W2d+MS6hvCkR4JLK63DVPcumFfAr/6rFsib0Jf1j6udYFRO/zqTjxYrgqN x0CIQJNYM4ooi0tAX0W5y+ZRa4XqmOf6auRA+LWZqyxvslXQjbMuu0Cnff8AMQ3ke7o0 o0a6d0/vAUjfcgxyRGcmZtKeeMlOIzaUcEg31VxFAgFJbf9vu1DSznrrRlrb96GKgEo6 aUNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=WBZnL6dt+cJ0K4wgFwwV3Z/VQP7SY23Z7IY/5H+lKxk=; b=yOkl7ILdKi4JFzlMhFUGC95VH9p2gEOBAxSQ2LkqyTZDVPy52o2MFbo4xW+L7kUEKe hCyNxRUaT9jwKqXMHnd//noXTnltn/Na3tKoBdFufsofSvWb2x7/fq7Pys/Nu8C0gEUq vm1hC89h8hfC2Luf3/Ftn7P9zIGNzs8exB81RyaTnqxEqxdMYwakaj9aGVUApNdgzmox MwtB6gEu4wAjLicSxZ0klOWRXnQWoJ3PkG07c4AhkzX7ECno1fR9AMIbw6TkBQAhB+mz EBQ/72JquZ0lshAEIb5r+9hDvUkWkNG6ah/p4NXhT4enGBKXhW6jJkLXe/fvsmlJz6/E sp6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=ljW3OeFw; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=KEB+L2vX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xh2-20020a170906da8200b007826cb6f57csi5636093ejb.407.2022.11.26.11.18.57; Sat, 26 Nov 2022 11:19:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=ljW3OeFw; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=KEB+L2vX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229671AbiKZTN3 (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Sat, 26 Nov 2022 14:13:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbiKZTN0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 26 Nov 2022 14:13:26 -0500 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57623270C; Sat, 26 Nov 2022 11:13:24 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E758E5C009D; Sat, 26 Nov 2022 14:13:22 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 26 Nov 2022 14:13:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1669490002; x=1669576402; bh=WB ZnL6dt+cJ0K4wgFwwV3Z/VQP7SY23Z7IY/5H+lKxk=; b=ljW3OeFw/MLqRU3xx+ 6FGOIzEjJ2ixL+dVvwQBa9CoRBxN/CReCx5UBZqQrShaonkRrPKBpN0KTckwb/0o PANH2jueQ5OMHdAqoOJhq1/ly3qU8+n1foYOdfAJ3zrUNgaxRr9/9JuJuhhu9aqS +Dq12pCN+bn5HhHzAnP0rK7ptl3V2WnGn6RxNZNKYCaAeO8SxyB4Pwg1bFO4UP7L 2UILN1vHHbzA5BiuKI69bFJkYNSxop1QKxMSzrRmcw27UbLGrjyDW0bSTujAqDgG x/8DyZChge/na084AREirveBBw6wqkbyhERCghI1J8/JMkGZBmkOfxiaesrYNvwn MGKg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1669490002; x=1669576402; bh=WBZnL6dt+cJ0K 4wgFwwV3Z/VQP7SY23Z7IY/5H+lKxk=; b=KEB+L2vXsob+UbdaPAoZ2LONvoCMN QRp1f9b6sPfUWxgJPj2WJzWvNzYe5pagxy/VdQwVzv1i15+vcatz1gHpRJXC/X4a WI6JUbiWLpzMDYrCNMqqjJxmobyRxYB3dXtut3JVmouiNEOnNqV8pdSU6mKTVQtg hVGmPyrsp1zR/S9dfeDx/0rShjlXKsyN/V4HWy9W1dOrzd87qNxky4+gzPVzgvkj yDiz6a5E6ipa7pogX/XCVXYXyUGxtKrajDeAXj4jkXOB4NLJJ1/7/dcAH1LngNxP GAhlin7xxFemLdhArUC6Bmeo7MlarT464H6ufe/3uhafarfKwHSjCLAwA== X-ME-Sender: <xms:UmWCYyZFw0B2Vx801SoZyKZG4oKrSvV_yUf84cteq-VqgeKTm_ZX-Q> <xme:UmWCY1axQv6JREig_j4EoSICBSp2Lj9Bv6Dq7P1yWuocLZk9U-OTBma51rLkiC6f9 77KED_ifw0FQpl9-g> X-ME-Received: <xmr:UmWCY88dYTS5lF3WLmZIZUrgKctV9dHb8DtVsGTx6QK8S6PCGQJ0OcZIQD-VlOnG8qSmLDIz7wjCN8MEYZXZmhh24Pqk_qhtKW1L4B172wBCpY8PVyMWq__EJoCxxCdSzFLJtw> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieejgdduvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefg udefiedtveetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: <xmx:UmWCY0oX2c_VF5lJpxhDJM4vlN6gMS5ahf86NkDQIyaw4tsrKzdkrg> <xmx:UmWCY9oq12pLzXJ_T4baV-xP27t-RV4IgXXrdMsWRT91WTeEpXCZ0A> <xmx:UmWCYyS3-9tGbhxUCC6V6KNM4gLE8aB-CzBAgSKhRtd1ihXqXaSetg> <xmx:UmWCY-TaPY1c9afrrTHxIGB_MZVE3Rvl1FSDeyrmAvuRsbocrxelaQ> Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 26 Nov 2022 14:13:22 -0500 (EST) From: Samuel Holland <samuel@sholland.org> To: Chen-Yu Tsai <wens@csie.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org> Cc: Samuel Holland <samuel@sholland.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Philipp Zabel <p.zabel@pengutronix.de>, Rob Herring <robh+dt@kernel.org>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH 1/5] clk: sunxi-ng: Remove duplicate ARCH_SUNXI dependencies Date: Sat, 26 Nov 2022 13:13:15 -0600 Message-Id: <20221126191319.6404-2-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221126191319.6404-1-samuel@sholland.org> References: <20221126191319.6404-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750587527477388176?= X-GMAIL-MSGID: =?utf-8?q?1750587527477388176?= |
Series |
clk: sunxi-ng: Allwinner R528/T113 clock support
|
|
Commit Message
Samuel Holland
Nov. 26, 2022, 7:13 p.m. UTC
SUNXI_CCU already depends on ARCH_SUNXI, so adding the dependency to
individual SoC drivers is redundant.
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
drivers/clk/sunxi-ng/Kconfig | 43 ++++++++++++++++++------------------
1 file changed, 21 insertions(+), 22 deletions(-)
Comments
On Sat, 26 Nov 2022 13:13:15 -0600 Samuel Holland <samuel@sholland.org> wrote: Hi, thanks for addressing this! > SUNXI_CCU already depends on ARCH_SUNXI, so adding the dependency to > individual SoC drivers is redundant. > > Signed-off-by: Samuel Holland <samuel@sholland.org> > --- > > drivers/clk/sunxi-ng/Kconfig | 43 ++++++++++++++++++------------------ > 1 file changed, 21 insertions(+), 22 deletions(-) > > diff --git a/drivers/clk/sunxi-ng/Kconfig b/drivers/clk/sunxi-ng/Kconfig > index 461537679c04..64cfa022e320 100644 > --- a/drivers/clk/sunxi-ng/Kconfig > +++ b/drivers/clk/sunxi-ng/Kconfig > @@ -14,43 +14,43 @@ config SUNIV_F1C100S_CCU > > config SUN20I_D1_CCU > tristate "Support for the Allwinner D1 CCU" > - default RISCV && ARCH_SUNXI > - depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST > + default RISCV > + depends on RISCV || COMPILE_TEST I agree on the "depends" part: Indeed the guard symbol already covers that, so it's redundant. However I am not so sure about the "default" part: When ARCH_SUNXI is deselected, but COMPILE_TEST in enabled, we default to every CCU driver being built-in. I am not sure this is the intention, or at least expected when doing compile testing? > > config SUN20I_D1_R_CCU > tristate "Support for the Allwinner D1 PRCM CCU" > - default RISCV && ARCH_SUNXI > - depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST > + default RISCV > + depends on RISCV || COMPILE_TEST > > config SUN50I_A64_CCU > tristate "Support for the Allwinner A64 CCU" > - default ARM64 && ARCH_SUNXI > - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST > + default ARM64 > + depends on ARM64 || COMPILE_TEST I wonder if this "depends" line was always wrong and should be fixed: We can compile a 32-bit ARM kernel and run it on an A64. Granted this requires a special bootloader or a hacked U-Boot (tried that), and reveals some other issues with the decompressor, but technically there is no 64-bit dependency in here. The same goes for all the other ARM64 CCUs: Cortex-A53s can run AArch32 in all exception levels. So shall we just completely remove the "depends" line for those, and let SUNXI_CCU do that job? Or use use !RISCV || COMPILE_TEST? Cheers, Andre > > config SUN50I_A100_CCU > tristate "Support for the Allwinner A100 CCU" > - default ARM64 && ARCH_SUNXI > - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST > + default ARM64 > + depends on ARM64 || COMPILE_TEST > > config SUN50I_A100_R_CCU > tristate "Support for the Allwinner A100 PRCM CCU" > - default ARM64 && ARCH_SUNXI > - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST > + default ARM64 > + depends on ARM64 || COMPILE_TEST > > config SUN50I_H6_CCU > tristate "Support for the Allwinner H6 CCU" > - default ARM64 && ARCH_SUNXI > - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST > + default ARM64 > + depends on ARM64 || COMPILE_TEST > > config SUN50I_H616_CCU > tristate "Support for the Allwinner H616 CCU" > - default ARM64 && ARCH_SUNXI > - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST > + default ARM64 > + depends on ARM64 || COMPILE_TEST > > config SUN50I_H6_R_CCU > tristate "Support for the Allwinner H6 and H616 PRCM CCU" > - default ARM64 && ARCH_SUNXI > - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST > + default ARM64 > + depends on ARM64 || COMPILE_TEST > > config SUN4I_A10_CCU > tristate "Support for the Allwinner A10/A20 CCU" > @@ -71,8 +71,7 @@ config SUN6I_A31_CCU > > config SUN6I_RTC_CCU > tristate "Support for the Allwinner H616/R329 RTC CCU" > - default ARCH_SUNXI > - depends on ARCH_SUNXI || COMPILE_TEST > + default y > > config SUN8I_A23_CCU > tristate "Support for the Allwinner A23 CCU" > @@ -91,8 +90,8 @@ config SUN8I_A83T_CCU > > config SUN8I_H3_CCU > tristate "Support for the Allwinner H3 CCU" > - default MACH_SUN8I || (ARM64 && ARCH_SUNXI) > - depends on MACH_SUN8I || (ARM64 && ARCH_SUNXI) || COMPILE_TEST > + default MACH_SUN8I || ARM64 > + depends on MACH_SUN8I || ARM64 || COMPILE_TEST > > config SUN8I_V3S_CCU > tristate "Support for the Allwinner V3s CCU" > @@ -101,7 +100,7 @@ config SUN8I_V3S_CCU > > config SUN8I_DE2_CCU > tristate "Support for the Allwinner SoCs DE2 CCU" > - default MACH_SUN8I || (ARM64 && ARCH_SUNXI) > + default MACH_SUN8I || ARM64 > > config SUN8I_R40_CCU > tristate "Support for the Allwinner R40 CCU" > @@ -115,6 +114,6 @@ config SUN9I_A80_CCU > > config SUN8I_R_CCU > tristate "Support for Allwinner SoCs' PRCM CCUs" > - default MACH_SUN8I || (ARCH_SUNXI && ARM64) > + default MACH_SUN8I || ARM64 > > endif
On 12/2/22 18:14, Andre Przywara wrote: > On Sat, 26 Nov 2022 13:13:15 -0600 > Samuel Holland <samuel@sholland.org> wrote: > > Hi, > > thanks for addressing this! > >> SUNXI_CCU already depends on ARCH_SUNXI, so adding the dependency to >> individual SoC drivers is redundant. >> >> Signed-off-by: Samuel Holland <samuel@sholland.org> >> --- >> >> drivers/clk/sunxi-ng/Kconfig | 43 ++++++++++++++++++------------------ >> 1 file changed, 21 insertions(+), 22 deletions(-) >> >> diff --git a/drivers/clk/sunxi-ng/Kconfig b/drivers/clk/sunxi-ng/Kconfig >> index 461537679c04..64cfa022e320 100644 >> --- a/drivers/clk/sunxi-ng/Kconfig >> +++ b/drivers/clk/sunxi-ng/Kconfig >> @@ -14,43 +14,43 @@ config SUNIV_F1C100S_CCU >> >> config SUN20I_D1_CCU >> tristate "Support for the Allwinner D1 CCU" >> - default RISCV && ARCH_SUNXI >> - depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST >> + default RISCV >> + depends on RISCV || COMPILE_TEST > > I agree on the "depends" part: Indeed the guard symbol already covers > that, so it's redundant. > However I am not so sure about the "default" part: When ARCH_SUNXI is > deselected, but COMPILE_TEST in enabled, we default to every CCU driver > being built-in. I am not sure this is the intention, or at least > expected when doing compile testing? SUNXI_CCU, which these depend on, is still "default ARCH_SUNXI", so if you have ARCH_SUNXI disabled, you only get any drivers if you manually enable SUNXI_CCU. I mentioned this in the patch 2 description, but maybe I should move that comment here. >> >> config SUN20I_D1_R_CCU >> tristate "Support for the Allwinner D1 PRCM CCU" >> - default RISCV && ARCH_SUNXI >> - depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST >> + default RISCV >> + depends on RISCV || COMPILE_TEST >> >> config SUN50I_A64_CCU >> tristate "Support for the Allwinner A64 CCU" >> - default ARM64 && ARCH_SUNXI >> - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST >> + default ARM64 >> + depends on ARM64 || COMPILE_TEST > > I wonder if this "depends" line was always wrong and should be fixed: > We can compile a 32-bit ARM kernel and run it on an A64. Granted this > requires a special bootloader or a hacked U-Boot (tried that), and > reveals some other issues with the decompressor, but technically there > is no 64-bit dependency in here. > The same goes for all the other ARM64 CCUs: Cortex-A53s can run AArch32 > in all exception levels. I was trying to simplify things by hiding irrelevant options, and you bring up an edge case of an edge case. :) I am okay with relaxing the dependency, though I would want to leave them disabled by default for 32-bit kernels (excluding them from the change in patch 2). > So shall we just completely remove the "depends" line for those, and > let SUNXI_CCU do that job? Or use use !RISCV || COMPILE_TEST? That, or we could add MACH_SUN8I to the condition. I don't have a strong opinion. Regards, Samuel
On Fri, 2 Dec 2022 19:52:41 -0600 Samuel Holland <samuel@sholland.org> wrote: Hi Samuel, > On 12/2/22 18:14, Andre Przywara wrote: > > On Sat, 26 Nov 2022 13:13:15 -0600 > > Samuel Holland <samuel@sholland.org> wrote: > > > > Hi, > > > > thanks for addressing this! > > > >> SUNXI_CCU already depends on ARCH_SUNXI, so adding the dependency to > >> individual SoC drivers is redundant. > >> > >> Signed-off-by: Samuel Holland <samuel@sholland.org> > >> --- > >> > >> drivers/clk/sunxi-ng/Kconfig | 43 ++++++++++++++++++------------------ > >> 1 file changed, 21 insertions(+), 22 deletions(-) > >> > >> diff --git a/drivers/clk/sunxi-ng/Kconfig b/drivers/clk/sunxi-ng/Kconfig > >> index 461537679c04..64cfa022e320 100644 > >> --- a/drivers/clk/sunxi-ng/Kconfig > >> +++ b/drivers/clk/sunxi-ng/Kconfig > >> @@ -14,43 +14,43 @@ config SUNIV_F1C100S_CCU > >> > >> config SUN20I_D1_CCU > >> tristate "Support for the Allwinner D1 CCU" > >> - default RISCV && ARCH_SUNXI > >> - depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST > >> + default RISCV > >> + depends on RISCV || COMPILE_TEST > > > > I agree on the "depends" part: Indeed the guard symbol already covers > > that, so it's redundant. > > However I am not so sure about the "default" part: When ARCH_SUNXI is > > deselected, but COMPILE_TEST in enabled, we default to every CCU driver > > being built-in. I am not sure this is the intention, or at least > > expected when doing compile testing? > > SUNXI_CCU, which these depend on, is still "default ARCH_SUNXI", so if > you have ARCH_SUNXI disabled, you only get any drivers if you manually > enable SUNXI_CCU. I mentioned this in the patch 2 description, but maybe > I should move that comment here. Yeah, I read this later on, I guess it's fine then. > > >> > >> config SUN20I_D1_R_CCU > >> tristate "Support for the Allwinner D1 PRCM CCU" > >> - default RISCV && ARCH_SUNXI > >> - depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST > >> + default RISCV > >> + depends on RISCV || COMPILE_TEST > >> > >> config SUN50I_A64_CCU > >> tristate "Support for the Allwinner A64 CCU" > >> - default ARM64 && ARCH_SUNXI > >> - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST > >> + default ARM64 > >> + depends on ARM64 || COMPILE_TEST > > > > I wonder if this "depends" line was always wrong and should be fixed: > > We can compile a 32-bit ARM kernel and run it on an A64. Granted this > > requires a special bootloader or a hacked U-Boot (tried that), and > > reveals some other issues with the decompressor, but technically there > > is no 64-bit dependency in here. > > The same goes for all the other ARM64 CCUs: Cortex-A53s can run AArch32 > > in all exception levels. > > I was trying to simplify things by hiding irrelevant options, and you > bring up an edge case of an edge case. :) I am okay with relaxing the > dependency, though I would want to leave them disabled by default for > 32-bit kernels (excluding them from the change in patch 2). Yes, definitely, that was the idea. And sorry for being a nuisance, but I think this "depends on ARCH_SUNXI" here is and was always misplaced. In contrast to things like "depends on PCI" or "depends on GPIOLIB", there is no real dependency on ARCH_SUNXI or even ARM/RISCV here, it's more a "only useful on ARCH_SUNXI". And this ARM vs ARM64 was just another rationale for not being overzealous with the dependency. But I see that this is an orthogonal discussion to this patch, so this should not block it. I will meditate over both patches again, since I have the gut feeling that the end result is fine. Cheers, Andre > > > So shall we just completely remove the "depends" line for those, and > > let SUNXI_CCU do that job? Or use use !RISCV || COMPILE_TEST? > > That, or we could add MACH_SUN8I to the condition. I don't have a strong > opinion. > > Regards, > Samuel >
Dne sobota, 26. november 2022 ob 20:13:15 CET je Samuel Holland napisal(a): > SUNXI_CCU already depends on ARCH_SUNXI, so adding the dependency to > individual SoC drivers is redundant. > > Signed-off-by: Samuel Holland <samuel@sholland.org> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Best regards, Jernej
diff --git a/drivers/clk/sunxi-ng/Kconfig b/drivers/clk/sunxi-ng/Kconfig index 461537679c04..64cfa022e320 100644 --- a/drivers/clk/sunxi-ng/Kconfig +++ b/drivers/clk/sunxi-ng/Kconfig @@ -14,43 +14,43 @@ config SUNIV_F1C100S_CCU config SUN20I_D1_CCU tristate "Support for the Allwinner D1 CCU" - default RISCV && ARCH_SUNXI - depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST + default RISCV + depends on RISCV || COMPILE_TEST config SUN20I_D1_R_CCU tristate "Support for the Allwinner D1 PRCM CCU" - default RISCV && ARCH_SUNXI - depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST + default RISCV + depends on RISCV || COMPILE_TEST config SUN50I_A64_CCU tristate "Support for the Allwinner A64 CCU" - default ARM64 && ARCH_SUNXI - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST + default ARM64 + depends on ARM64 || COMPILE_TEST config SUN50I_A100_CCU tristate "Support for the Allwinner A100 CCU" - default ARM64 && ARCH_SUNXI - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST + default ARM64 + depends on ARM64 || COMPILE_TEST config SUN50I_A100_R_CCU tristate "Support for the Allwinner A100 PRCM CCU" - default ARM64 && ARCH_SUNXI - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST + default ARM64 + depends on ARM64 || COMPILE_TEST config SUN50I_H6_CCU tristate "Support for the Allwinner H6 CCU" - default ARM64 && ARCH_SUNXI - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST + default ARM64 + depends on ARM64 || COMPILE_TEST config SUN50I_H616_CCU tristate "Support for the Allwinner H616 CCU" - default ARM64 && ARCH_SUNXI - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST + default ARM64 + depends on ARM64 || COMPILE_TEST config SUN50I_H6_R_CCU tristate "Support for the Allwinner H6 and H616 PRCM CCU" - default ARM64 && ARCH_SUNXI - depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST + default ARM64 + depends on ARM64 || COMPILE_TEST config SUN4I_A10_CCU tristate "Support for the Allwinner A10/A20 CCU" @@ -71,8 +71,7 @@ config SUN6I_A31_CCU config SUN6I_RTC_CCU tristate "Support for the Allwinner H616/R329 RTC CCU" - default ARCH_SUNXI - depends on ARCH_SUNXI || COMPILE_TEST + default y config SUN8I_A23_CCU tristate "Support for the Allwinner A23 CCU" @@ -91,8 +90,8 @@ config SUN8I_A83T_CCU config SUN8I_H3_CCU tristate "Support for the Allwinner H3 CCU" - default MACH_SUN8I || (ARM64 && ARCH_SUNXI) - depends on MACH_SUN8I || (ARM64 && ARCH_SUNXI) || COMPILE_TEST + default MACH_SUN8I || ARM64 + depends on MACH_SUN8I || ARM64 || COMPILE_TEST config SUN8I_V3S_CCU tristate "Support for the Allwinner V3s CCU" @@ -101,7 +100,7 @@ config SUN8I_V3S_CCU config SUN8I_DE2_CCU tristate "Support for the Allwinner SoCs DE2 CCU" - default MACH_SUN8I || (ARM64 && ARCH_SUNXI) + default MACH_SUN8I || ARM64 config SUN8I_R40_CCU tristate "Support for the Allwinner R40 CCU" @@ -115,6 +114,6 @@ config SUN9I_A80_CCU config SUN8I_R_CCU tristate "Support for Allwinner SoCs' PRCM CCUs" - default MACH_SUN8I || (ARCH_SUNXI && ARM64) + default MACH_SUN8I || ARM64 endif