From nobody Sun May 10 06:51:32 2026 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92BFD2AD0F for ; Sun, 29 Dec 2024 07:47:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735458469; cv=none; b=HyAR9B0utZovCIBSed85ea1W/OLzFgQ7SSLO7ZRzhlBQCh2rmPuiEFa42E/kxAeirhc0F9lPvTCuIrNGbumrK08+v1gsLeK6god3EeOy6viyqTQpXQKGINuoF+fS0joqO7xqFxS23Q5OEPdJHGAVLRaPHKjLrhkLBccm0bLq7jo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735458469; c=relaxed/simple; bh=r2fl+aSZQSe4Gu96IWu9ki/qiNVdSrpnUYBU3JUFi8U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=d/8vdNv9f6vutOLvkHD9OWMCEeyhd1wOX3TtvvBy46b6yGNoN+FUvxCWGY0sc1dLHERbT6e8b/NlU6PDjmRQux/lL2nNpL+0ocVk8YLL32fIlPa4WcLVuDF+FEaINq96JWVBfd0EBwEnWfoQqJ1p144GAVWRI7RZ9SvKZwpDZFs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com; spf=pass smtp.mailfrom=tenstorrent.com; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b=Z15hKbX0; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b="Z15hKbX0" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-21a1e6fd923so44667215ad.1 for ; Sat, 28 Dec 2024 23:47:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1735458467; x=1736063267; darn=vger.kernel.org; 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=/p3qag0MQVENrEZ+1Hv+br5ltoCbdPuVgxId6PkIedY=; b=Z15hKbX05Jk719Fjl3o53HMLbRYoCHqSd/x539mBZNpsdqfUTd7/QvDugUmIheeKFz xQiJmqrC/iXQpZ1k+NKgd2wyLmgg7uJ2AbVVBJpbMAmjRLRQhWJLjxcoapCDM+IUOi62 QdqXcqyNBu89CBW06ki5SEWGP9mAwMQjG3gEz/QsnQp+r7CpDz1CrU5MOno7z0lM2+Yl yxmWUigln7jwDqKZYpHPrY6IJ4e+HL8JjPZnTZTuJBScoyOIgcWStcwWjMHKLi35oxjK IOrYga+HJcksbSzSgjVwGm7q4aIXuEHU7W5sxtTrdApjs2/fIOiFvRiyR4qDRTq6q9aD BsgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735458467; x=1736063267; 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=/p3qag0MQVENrEZ+1Hv+br5ltoCbdPuVgxId6PkIedY=; b=G7mUQOn64nOtIz+F8YXYObEgX3IkncPsUNP8O3KhWdWWwPxxOZMgkJ3eMuAx67QoyO wOixsthIfvhmqa4K7pEJN5yPLiYvOi6Z8OLcs1PWt65ZSb8idjNToDLzil9Zj4q7DvGK BlhvpG6rwtzrKHOE4/JUOl5Xkoy/vW9c79Gb8fw9avTXKnbYDpe5Dh1LRK7FvrgMNIRv /yPeFfaCCsVbChagOruqZa6evnf8SP5zvg7vQAinVpSBhtgU72DrkABos7p5NbhucIch K1zad1USPzVwaMjdlmkRV/0O5SHAFb9MNgxem+gemcBjMX2p6tm8F49F9TAedEDEy/Zh GTnQ== X-Forwarded-Encrypted: i=1; AJvYcCVs8jKhL1LUSOwLG9n27yzrvBN0fh1yw9/dCdJI3kaHeF2RiXJKz95Qo1RStgyvdMRY+Z/UM3eXQDKwqSw=@vger.kernel.org X-Gm-Message-State: AOJu0YxSO/1BCIgCaexlKxrF6sZugyc68xj+jH5BMwNPzbDL+IFFexl0 TOtcLvL7A8DL3hccqYenAmgH5PPtdapoZ8uX4ks5d9sNYG57TN4aKn4yUAZbcJ4= X-Gm-Gg: ASbGncuwkduW6Mo5xUMTxxBauRdkjgdlzgZEPiJsNNanDUtMo3MA1tC3SOtsgf8wqSI s+OJDdYT+8Ij60ouroaLjCb12MBNn2Nb3JHLU2OzQpRaCWJvJFMzpgo2rTP2KUP34sV7xJE+Cza ls+XYxKj+E1jMrnl4VTtkMJYeR00xGF9dyjldx7zOMlb6FNajT44FSYH+VZEPspMZln6I8pY9GV Ejr08w67f1E0IfP2/tesP4IqScrLmV83VAr1pEWY2+8r1DO5bmt1azMDBJVtB1ldYe3Ang2/B12 hgYdCdSQG0AI0mbM X-Google-Smtp-Source: AGHT+IEjtnq5bXcHCrVotkW4MshmrYYKyL0Pyq/ZCNXYcjJHuEB1Y7i8WdyieJmaU8IJndr258gDnw== X-Received: by 2002:a05:6a20:e68b:b0:1e1:d26:6657 with SMTP id adf61e73a8af0-1e5e080cb8emr49478295637.42.1735458467002; Sat, 28 Dec 2024 23:47:47 -0800 (PST) Received: from [127.0.1.1] (75-164-218-15.ptld.qwest.net. [75.164.218.15]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72afb196c04sm7907658b3a.150.2024.12.28.23.47.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2024 23:47:46 -0800 (PST) From: Drew Fustini Date: Sat, 28 Dec 2024 23:47:42 -0800 Subject: [PATCH 1/2] clk: thead: Fix clk gate registration to pass flags Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241228-th1520-clk_ignore_unused-v1-1-c8f6333d1784@tenstorrent.com> References: <20241228-th1520-clk_ignore_unused-v1-0-c8f6333d1784@tenstorrent.com> In-Reply-To: <20241228-th1520-clk_ignore_unused-v1-0-c8f6333d1784@tenstorrent.com> To: Drew Fustini , Guo Ren , Fu Wei , Michael Turquette , Stephen Boyd , Jisheng Zhang , Yangtao Li Cc: linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Drew Fustini X-Mailer: b4 0.14.1 Modify the call to devm_clk_hw_register_gate_parent_data() to actually pass the clk flags from hw.init instead of just 0. This is necessary to allow individual clk gates to specify their own clk flags. Fixes: ae81b69fd2b1 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS c= locks") Signed-off-by: Drew Fustini --- drivers/clk/thead/clk-th1520-ap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/thead/clk-th1520-ap.c b/drivers/clk/thead/clk-th15= 20-ap.c index 1015fab95251..c95b6e26ca53 100644 --- a/drivers/clk/thead/clk-th1520-ap.c +++ b/drivers/clk/thead/clk-th1520-ap.c @@ -1048,7 +1048,8 @@ static int th1520_clk_probe(struct platform_device *p= dev) hw =3D devm_clk_hw_register_gate_parent_data(dev, cg->common.hw.init->name, cg->common.hw.init->parent_data, - 0, base + cg->common.cfg0, + cg->common.hw.init->flags, + base + cg->common.cfg0, ffs(cg->enable) - 1, 0, NULL); if (IS_ERR(hw)) return PTR_ERR(hw); --=20 2.34.1 From nobody Sun May 10 06:51:32 2026 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EC3A347CC for ; Sun, 29 Dec 2024 07:47:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735458469; cv=none; b=R6WliHAAofgKs/o1o5LQkBdzHsMnkb6O5/YXDzzKcRNCTMqzyTa/Oy3XOw+1c29hhPMZQpyhSkg6HlzCCoKwUZ3mYHPMa8JxssMswgoVz0UqKy2hmZsEIB4FUu7RvAajydb0Ih7N3YZFTfW9SOjCzSnyB7gZSfz2VyB1iUF7jFI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735458469; c=relaxed/simple; bh=8T8t7MGnpmXJLTx/FTaUwyAyBANw3bF2QBNIkm+LiUw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=F/4lJINkbXavDijRyHeQVAQtvJ3h1duP3x/VWbJURgBu9Mtq9SgDZvs5Q+nFo/k1kHU1JMEIGr05NOqQWH1nLYy4j7Kj/JJuL9Cib4u8fMW6JCQkyPLmLEvPaa2nNepILxoRWSD3zOQIH5c/CKpTJJclgXi5jYzgEvfuyAy0rtA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com; spf=pass smtp.mailfrom=tenstorrent.com; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b=KGdezIJM; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b="KGdezIJM" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-21683192bf9so107602535ad.3 for ; Sat, 28 Dec 2024 23:47:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1735458468; x=1736063268; darn=vger.kernel.org; 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=oUvVoDhVxDNuu/e3h1RthOZUTTkn0l7kTPxKU03cvts=; b=KGdezIJMsh6GssY9fNo9ZyQMDIoMP61ZrG0XhyqE524c1M2604cHGUKlFlgTwa8tDn 9ssI4Q1TLsyixDChk2e6JaNTbkQFZj2pVmLyoR9xknlj6UTrLgUaFXbp+FBT6lbEH0FD LBREH2na8PxnNR66JYQSz/xxNalbI/IxRm62oUDDzFVpvS8Rp+EKkD/4WDpWIVzgdOdS k4xnug7hqsZqkpLZueSJL47qYN9DNrkwo/EFDZVKg/07gGP+0U/Uq6Sp/sRmEwY68bgF X0FjjiNGHhAB2FHBHhl4TP2ViwRWipy7SUET58yHMtmAj2KBdH4tH5kQoJ9zxO9vZdwa FTxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735458468; x=1736063268; 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=oUvVoDhVxDNuu/e3h1RthOZUTTkn0l7kTPxKU03cvts=; b=kQxwGjmDMfj0sfuHliESL+fRCZivWK1yCBmri/1u+F/S8GMsUydvvUYvrvDeDVh+GN /A2rYdS0jiwVrXUaHNcjr4KoZF2Tgvqf+yKsxECSnM0WqahyEsKLMFCmvaXIYizHcTSS EgIroaEyBgEQT3m0Z5oP1TLlSi27RJN7NjbhgobFm2Bm6FKpMq2Td/LJFtY9DVrQ7Nc0 +Tua6/wX0hWlf/sD5ifSi3X6lcmcQnTFXtf9/qqg/bxa0Jn4AmaF2sZY85V/WTRsYQBu L4BDd7lipy8YWldFUxABe4fOSIYhYSDN8VbZ74NmeYRc21Ck3wNPtneDhDG5WkD/LUJ/ FcfQ== X-Forwarded-Encrypted: i=1; AJvYcCUCOUIARR7g4HM/ewZwG4+VJmGyM1BhMeiVT0tyXJsGm6Pljvp0YWd5dEdEyTZA7yOvYWoKntOWubnRfLk=@vger.kernel.org X-Gm-Message-State: AOJu0YywWLXnVt1qaoyaLUGaOEfd+/KV6JRMThr+AAl3Wul1TDC+8QBa 5OZA18Y/HIqpLQYQp8XD4xFvoOAq+1kZB/aesmz8UUKD+q/vuql0WPz5ctvNMRI= X-Gm-Gg: ASbGncviscN/q2iQ9IOeUEU0oCeIAqkSH1yHdwf5wuqB4bZUgjYAmCAoj+k60zUi1Ny 9p2ti3D4Qlq+BmSrYhGMP3OQL6kZXLrNdvHwZW0yjc/V9BT3Bi75x1Q/GAL78xz6bePENYWR6MI 4zmVJI6DGcq2xzMKxg1xsnW3ieq0CDMI8HByWe+kZZ+OCPK2H7s6zIp2ImrdkRcaP/hwpQ4PIa+ IBq+h46qiWp/EB3jHakDx84iin9lwg6OSGAsKQAVgOBB0/qPO7R3oZS7C6I5nvVdo1ZiyB8/daZ mxzDj33NF0oq8HWq X-Google-Smtp-Source: AGHT+IHqsni2m5eaDcRqtxzDWRYhuVp63TQTc5E6K1zeiuggIW4mudwRgzaxbglJMxuljed81fs76w== X-Received: by 2002:a05:6a00:410d:b0:725:e5a7:fdac with SMTP id d2e1a72fcca58-72abe1ad517mr47137154b3a.26.1735458467863; Sat, 28 Dec 2024 23:47:47 -0800 (PST) Received: from [127.0.1.1] (75-164-218-15.ptld.qwest.net. [75.164.218.15]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72afb196c04sm7907658b3a.150.2024.12.28.23.47.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2024 23:47:47 -0800 (PST) From: Drew Fustini Date: Sat, 28 Dec 2024 23:47:43 -0800 Subject: [PATCH 2/2] clk: thead: Add CLK_IGNORE_UNUSED to fix TH1520 boot Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241228-th1520-clk_ignore_unused-v1-2-c8f6333d1784@tenstorrent.com> References: <20241228-th1520-clk_ignore_unused-v1-0-c8f6333d1784@tenstorrent.com> In-Reply-To: <20241228-th1520-clk_ignore_unused-v1-0-c8f6333d1784@tenstorrent.com> To: Drew Fustini , Guo Ren , Fu Wei , Michael Turquette , Stephen Boyd , Jisheng Zhang , Yangtao Li Cc: linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Drew Fustini X-Mailer: b4 0.14.1 Add the CLK_IGNORE_UNUSED flag to apb_pclk, cpu2peri_x2h_clk, perisys_apb2_hclk and perisys_apb3_hclk. Without this flag, the boot hangs after "clk: Disabling unused clocks" unless clk_ignore_unused is in the kernel cmdline. Fixes: ae81b69fd2b1 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS c= locks") Signed-off-by: Drew Fustini --- drivers/clk/thead/clk-th1520-ap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/thead/clk-th1520-ap.c b/drivers/clk/thead/clk-th15= 20-ap.c index c95b6e26ca53..d02a18fed8a8 100644 --- a/drivers/clk/thead/clk-th1520-ap.c +++ b/drivers/clk/thead/clk-th1520-ap.c @@ -657,7 +657,7 @@ static struct ccu_div apb_pclk =3D { .hw.init =3D CLK_HW_INIT_PARENTS_DATA("apb-pclk", apb_parents, &ccu_div_ops, - 0), + CLK_IGNORE_UNUSED), }, }; =20 @@ -794,13 +794,13 @@ static CCU_GATE(CLK_X2X_CPUSYS, x2x_cpusys_clk, "x2x-= cpusys", axi4_cpusys2_aclk_ 0x134, BIT(7), 0); static CCU_GATE(CLK_CPU2AON_X2H, cpu2aon_x2h_clk, "cpu2aon-x2h", axi_aclk_= pd, 0x138, BIT(8), 0); static CCU_GATE(CLK_CPU2PERI_X2H, cpu2peri_x2h_clk, "cpu2peri-x2h", axi4_c= pusys2_aclk_pd, - 0x140, BIT(9), 0); + 0x140, BIT(9), CLK_IGNORE_UNUSED); static CCU_GATE(CLK_PERISYS_APB1_HCLK, perisys_apb1_hclk, "perisys-apb1-hc= lk", perisys_ahb_hclk_pd, 0x150, BIT(9), 0); static CCU_GATE(CLK_PERISYS_APB2_HCLK, perisys_apb2_hclk, "perisys-apb2-hc= lk", perisys_ahb_hclk_pd, - 0x150, BIT(10), 0); + 0x150, BIT(10), CLK_IGNORE_UNUSED); static CCU_GATE(CLK_PERISYS_APB3_HCLK, perisys_apb3_hclk, "perisys-apb3-hc= lk", perisys_ahb_hclk_pd, - 0x150, BIT(11), 0); + 0x150, BIT(11), CLK_IGNORE_UNUSED); static CCU_GATE(CLK_PERISYS_APB4_HCLK, perisys_apb4_hclk, "perisys-apb4-hc= lk", perisys_ahb_hclk_pd, 0x150, BIT(12), 0); static CCU_GATE(CLK_NPU_AXI, npu_axi_clk, "npu-axi", axi_aclk_pd, 0x1c8, B= IT(5), 0); --=20 2.34.1