From patchwork Mon Mar 4 16:51:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 777778 Delivered-To: patch@linaro.org Received: by 2002:a5d:48c8:0:b0:33e:474f:8c56 with SMTP id p8csp40560wrs; Mon, 4 Mar 2024 09:13:16 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUToj8eGQ4ZP+Q+JYl/sq0zdTVzslalJvWDZZSKtB06VsOL0uPbZ95NJrDQVQm3vEz3Qp4Wf+tijMmDkT32+JjD X-Google-Smtp-Source: AGHT+IFxmYUmSVeL6CfVRHu251rW5Uh6K5e1q1baBBQul2YVP6Vfo+5iOXCvLrRzNCFLeMuSIbiT X-Received: by 2002:a5d:4849:0:b0:33e:3efc:ff93 with SMTP id n9-20020a5d4849000000b0033e3efcff93mr1957517wrs.1.1709572396456; Mon, 04 Mar 2024 09:13:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709572396; cv=none; d=google.com; s=arc-20160816; b=p5kjWZwbUvMMuMgs8gIvelfAQeoJOFG++NseyuYyOeLvdb5YMnClK2pgOx6zMDFkif hwaE/Iny06lfoqJ8afSjQwJlqgt3fhh3jk3h0cfgvOHnSlK/I03xFPjHYzOKM3l3VCkJ SVrkSb4wu6Ay8Lnm0Y9yP3fpFSlsFgoq0vRvnf5WCtkGzpWjxd0UgV3DE8U4gGPyFnqg 0wdxerWFZsuHZ1vEIzEHeNwk7Yys6i5VAr3g5lW5vzfc9RLdyUBWPzu0Clsy3StD9+wM TSaPchEpLHeStrSWJ2in6cdT1xuNKIGpl3+a2z9aOjTApypjOseDWRdtzqWuy0OOZCHe eCUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=H9z47gxslMXab03nJVN9Zel/hSMnSwz2OuvyhmVXZIg=; fh=td6uwRQTE5WyQoTzly9w9ZNZpATVWdjjKdDHY2id97k=; b=kQ90nSdAmcEI34nCfsvnnj2I6hhvSn1AOruKZTMbg2/X8jZ7LU4WOzcjPNV2nxnUUL 45OOiXrVBLcedPIvIiMxdhzCTu9MfBBZ4wqv+qk6r6X1iF1dU7i/Bp0o8BuLy8wLwX2L zqo48k6Vdn1H9mNhjzAB7bfY2jdmfPQbEXd5y76c7JgIWLRFpruKz11zrThvjZhZ+wpT zbC6OjAZfKh+JEYwDUsTJ8l5H9GBxjSur13l2+PDapGZN3sHcoiPnazho+nhgBPC3XFd 0y6fRxTns2eB6b/n8m+rATVsSDU7dRHuXmF3kma47FmDy3H6MMneTyzM0bLglZLuRVt2 iSLQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kjLA1RW0; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id f3-20020a056000036300b0033db3226d3asi5425184wrf.170.2024.03.04.09.13.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 09:13:16 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kjLA1RW0; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2946D88160; Mon, 4 Mar 2024 18:09:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="kjLA1RW0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E2D7987E63; Mon, 4 Mar 2024 17:52:00 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3450387FD7 for ; Mon, 4 Mar 2024 17:51:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=caleb.connolly@linaro.org Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-33d9c3f36c2so2482720f8f.2 for ; Mon, 04 Mar 2024 08:51:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709571117; x=1710175917; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=H9z47gxslMXab03nJVN9Zel/hSMnSwz2OuvyhmVXZIg=; b=kjLA1RW06O/WyP8Z5Sw7XwtTIoBX0cQvGMyaFd1k1Ir+bcdLwl0Wxh18Aperx+0WOh L4GmPEV1fsTZkfWbKpxDFPRrbwUm/HueHejafeA8vlaOOqW13HSghn4B1xpbKAqx7EOk uqIcH+GlpXyzEIXhLN5KXYeJAuQMujLquPj068V7NO8B1SVR0oGzZ0QjSqAT8X8kdNRB rVq6qQZjiYV34JABaOnGzkXO9wJAjPnaFLWXpcn5ye6P5eUtADHzLc4ss33fDDfg3CEh s8X3qcayUAoWNIeLlrDrC+VlSPxebBeOwt4dteieeJqBHepzQxUjouK02cNzjohWwvZw zmhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709571117; x=1710175917; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H9z47gxslMXab03nJVN9Zel/hSMnSwz2OuvyhmVXZIg=; b=QKVwRCDh4TM3czP/LNBgQ3GCfsqhAxr2ckIH8Ta/0KhRyykNOZPhMjU1NLRpNFQAmv IztRicFPfi5YJbf6215zsslYPPl1O8BQ8IjL8N3dsdEKKhxCSWTRjJfEfeHVT+Qvtc+K KzIn4RHxtDUUs4DTrMW+pGn83sX2E4BLuFFKyr3zwZnEbIN0d+zure/Fh8mf6FLDorqC 4o0C+Bk/YhivzhlUWeXL9nSVPVPL1RoUpCX6ZIv6c5PqKrXcM1YisnVDF9g7d5TuzDGg TDJMsWIST17o0+dh4lCPDKphzRorvUnFAnvW7wAiwa2yS54V5j607bzMEFtZJjdSwkRO UX0A== X-Gm-Message-State: AOJu0YzjKSEHT7HoCBj07MzDD508ut2kRpJxOuhoGSKZDxzweu6DnpcF 3Klm1YzM8mx/ekdftgXYsICcFPOegvjke8Z3pUgmyNPQD4NliDRrHDWBzJ2O6wo= X-Received: by 2002:adf:f407:0:b0:33b:784c:276e with SMTP id g7-20020adff407000000b0033b784c276emr7710276wro.25.1709571117681; Mon, 04 Mar 2024 08:51:57 -0800 (PST) Received: from lion.localdomain (host-92-17-96-232.as13285.net. [92.17.96.232]) by smtp.gmail.com with ESMTPSA id c21-20020a05600c0a5500b00412cb0961fasm10598517wmq.6.2024.03.04.08.51.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 08:51:57 -0800 (PST) From: Caleb Connolly Date: Mon, 04 Mar 2024 16:51:30 +0000 Subject: [PATCH RFC 22/26] sifive: drop clock headers MIME-Version: 1.0 Message-Id: <20240304-b4-upstream-dt-headers-v1-22-b7ff41925f92@linaro.org> References: <20240304-b4-upstream-dt-headers-v1-0-b7ff41925f92@linaro.org> In-Reply-To: <20240304-b4-upstream-dt-headers-v1-0-b7ff41925f92@linaro.org> To: Tom Rini , Neil Armstrong , Sumit Garg , Patrice Chotard , Patrick Delaunay , Jagan Teki , Simon Glass , Philipp Tomsich , Kever Yang , Lukasz Majewski , Sean Anderson , Sam Protsenko , Matthias Brugger , Peter Robinson , Joe Hershberger , Ramon Fried , Thierry Reding , Svyatoslav Ryhel , Michal Simek , Paul Barker , Weijie Gao , GSS_MTK_Uboot_upstream , Ryder Lee , Chunfeng Yun , Eugen Hristev , Rick Chen , Leo , Ryan Chen , Chia-Wei Wang , Aspeed BMC SW team , Joel Stanley , Kunihiko Hayashi , Dai Okamura , Eugeniy Paltsev Cc: u-boot@lists.denx.de, u-boot-amlogic@groups.io, uboot-stm32@st-md-mailman.stormreply.com, uboot-snps-arc@synopsys.com, Caleb Connolly X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=6003; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=5lyJpN4afSur7zKXA+gv+xmN5RUoVNSeg8I0uwN7L3A=; b=owGbwMvMwCFYaeA6f6eBkTjjabUkhtSnf4Ai27acv2/IJfKdx9lh5g0dyXV5aznswi5aS69iX +K2OKGjlIVBkINBVkyRRfzEMsumtZftNbYvuAAzh5UJZAgDF6cATORhGCPDxCr+yfeZ3jYYS/bJ rJsxXzDbJPZvWqwF4znFHwdKnhx2ZfincdpGwVt69qeA3uDEa+YeO1qFuN4UXz5ak9vLFHfEYuV 5AA== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-Mailman-Approved-At: Mon, 04 Mar 2024 18:09:04 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Drop in favour of dts/upstream. Small driver/dts change to fix compatibility. Signed-off-by: Caleb Connolly --- arch/riscv/dts/fu540-c000-u-boot.dtsi | 26 +++++++++++++------------- drivers/clk/sifive/fu540-prci.c | 8 ++++---- include/dt-bindings/clock/sifive-fu540-prci.h | 18 ------------------ include/dt-bindings/clock/sifive-fu740-prci.h | 24 ------------------------ 4 files changed, 17 insertions(+), 59 deletions(-) diff --git a/arch/riscv/dts/fu540-c000-u-boot.dtsi b/arch/riscv/dts/fu540-c000-u-boot.dtsi index 360679a1781a..0f8181436410 100644 --- a/arch/riscv/dts/fu540-c000-u-boot.dtsi +++ b/arch/riscv/dts/fu540-c000-u-boot.dtsi @@ -6,42 +6,42 @@ #include / { cpus { - assigned-clocks = <&prci PRCI_CLK_COREPLL>; + assigned-clocks = <&prci FU540_PRCI_CLK_COREPLL>; assigned-clock-rates = <1000000000>; bootph-pre-ram; cpu0: cpu@0 { - clocks = <&prci PRCI_CLK_COREPLL>; + clocks = <&prci FU540_PRCI_CLK_COREPLL>; bootph-pre-ram; status = "okay"; cpu0_intc: interrupt-controller { bootph-pre-ram; }; }; cpu1: cpu@1 { - clocks = <&prci PRCI_CLK_COREPLL>; + clocks = <&prci FU540_PRCI_CLK_COREPLL>; bootph-pre-ram; cpu1_intc: interrupt-controller { bootph-pre-ram; }; }; cpu2: cpu@2 { - clocks = <&prci PRCI_CLK_COREPLL>; + clocks = <&prci FU540_PRCI_CLK_COREPLL>; bootph-pre-ram; cpu2_intc: interrupt-controller { bootph-pre-ram; }; }; cpu3: cpu@3 { - clocks = <&prci PRCI_CLK_COREPLL>; + clocks = <&prci FU540_PRCI_CLK_COREPLL>; bootph-pre-ram; cpu3_intc: interrupt-controller { bootph-pre-ram; }; }; cpu4: cpu@4 { - clocks = <&prci PRCI_CLK_COREPLL>; + clocks = <&prci FU540_PRCI_CLK_COREPLL>; bootph-pre-ram; cpu4_intc: interrupt-controller { bootph-pre-ram; }; @@ -66,22 +66,22 @@ bootph-pre-ram; }; prci: clock-controller@10000000 { #reset-cells = <1>; - resets = <&prci PRCI_RST_DDR_CTRL_N>, - <&prci PRCI_RST_DDR_AXI_N>, - <&prci PRCI_RST_DDR_AHB_N>, - <&prci PRCI_RST_DDR_PHY_N>, - <&prci PRCI_RST_GEMGXL_N>; + resets = <&prci FU540_PRCI_RST_DDR_CTRL_N>, + <&prci FU540_PRCI_RST_DDR_AXI_N>, + <&prci FU540_PRCI_RST_DDR_AHB_N>, + <&prci FU540_PRCI_RST_DDR_PHY_N>, + <&prci FU540_PRCI_RST_GEMGXL_N>; reset-names = "ddr_ctrl", "ddr_axi", "ddr_ahb", "ddr_phy", "gemgxl_reset"; }; dmc: dmc@100b0000 { compatible = "sifive,fu540-c000-ddr"; reg = <0x0 0x100b0000 0x0 0x0800 0x0 0x100b2000 0x0 0x2000 0x0 0x100b8000 0x0 0x1000>; - clocks = <&prci PRCI_CLK_DDRPLL>; + clocks = <&prci FU540_PRCI_CLK_DDRPLL>; clock-frequency = <933333324>; bootph-pre-ram; }; }; @@ -99,9 +99,9 @@ bootph-pre-ram; }; ð0 { - assigned-clocks = <&prci PRCI_CLK_GEMGXLPLL>; + assigned-clocks = <&prci FU540_PRCI_CLK_GEMGXLPLL>; assigned-clock-rates = <125000000>; }; &l2cache { diff --git a/drivers/clk/sifive/fu540-prci.c b/drivers/clk/sifive/fu540-prci.c index ceb2c6fab0da..b019f682ac49 100644 --- a/drivers/clk/sifive/fu540-prci.c +++ b/drivers/clk/sifive/fu540-prci.c @@ -58,27 +58,27 @@ static const struct __prci_clock_ops sifive_fu540_prci_tlclksel_clk_ops = { }; /* List of clock controls provided by the PRCI */ struct __prci_clock __prci_init_clocks_fu540[] = { - [PRCI_CLK_COREPLL] = { + [FU540_PRCI_CLK_COREPLL] = { .name = "corepll", .parent_name = "hfclk", .ops = &sifive_fu540_prci_wrpll_clk_ops, .pwd = &__prci_corepll_data, }, - [PRCI_CLK_DDRPLL] = { + [FU540_PRCI_CLK_DDRPLL] = { .name = "ddrpll", .parent_name = "hfclk", .ops = &sifive_fu540_prci_wrpll_clk_ops, .pwd = &__prci_ddrpll_data, }, - [PRCI_CLK_GEMGXLPLL] = { + [FU540_PRCI_CLK_GEMGXLPLL] = { .name = "gemgxlpll", .parent_name = "hfclk", .ops = &sifive_fu540_prci_wrpll_clk_ops, .pwd = &__prci_gemgxlpll_data, }, - [PRCI_CLK_TLCLK] = { + [FU540_PRCI_CLK_TLCLK] = { .name = "tlclk", .parent_name = "corepll", .ops = &sifive_fu540_prci_tlclksel_clk_ops, }, diff --git a/include/dt-bindings/clock/sifive-fu540-prci.h b/include/dt-bindings/clock/sifive-fu540-prci.h deleted file mode 100644 index 6a0b70a37d78..000000000000 --- a/include/dt-bindings/clock/sifive-fu540-prci.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * Copyright (C) 2018-2019 SiFive, Inc. - * Wesley Terpstra - * Paul Walmsley - */ - -#ifndef __DT_BINDINGS_CLOCK_SIFIVE_FU540_PRCI_H -#define __DT_BINDINGS_CLOCK_SIFIVE_FU540_PRCI_H - -/* Clock indexes for use by Device Tree data and the PRCI driver */ - -#define PRCI_CLK_COREPLL 0 -#define PRCI_CLK_DDRPLL 1 -#define PRCI_CLK_GEMGXLPLL 2 -#define PRCI_CLK_TLCLK 3 - -#endif diff --git a/include/dt-bindings/clock/sifive-fu740-prci.h b/include/dt-bindings/clock/sifive-fu740-prci.h deleted file mode 100644 index 672bdadbf6c0..000000000000 --- a/include/dt-bindings/clock/sifive-fu740-prci.h +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ -/* - * Copyright (C) 2019 SiFive, Inc. - * Wesley Terpstra - * Paul Walmsley - * Zong Li - */ - -#ifndef __DT_BINDINGS_CLOCK_SIFIVE_FU740_PRCI_H -#define __DT_BINDINGS_CLOCK_SIFIVE_FU740_PRCI_H - -/* Clock indexes for use by Device Tree data and the PRCI driver */ - -#define FU740_PRCI_CLK_COREPLL 0 -#define FU740_PRCI_CLK_DDRPLL 1 -#define FU740_PRCI_CLK_GEMGXLPLL 2 -#define FU740_PRCI_CLK_DVFSCOREPLL 3 -#define FU740_PRCI_CLK_HFPCLKPLL 4 -#define FU740_PRCI_CLK_CLTXPLL 5 -#define FU740_PRCI_CLK_TLCLK 6 -#define FU740_PRCI_CLK_PCLK 7 -#define FU740_PRCI_CLK_PCIE_AUX 8 - -#endif /* __DT_BINDINGS_CLOCK_SIFIVE_FU740_PRCI_H */