From patchwork Wed Jun 26 19:42:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13713316 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 B7189C3064D for ; Wed, 26 Jun 2024 19:43:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6B6zMz66mId752W71/Awh4RoZkm3MLOugnC6sEYYCNg=; b=MGkZhqaG/PmOuDLnFnFJ4dzq3M OB7+afcd8+dWmj77AagROG/+zW3RIY/gebOel02cN0a/HGhi93GoLwaXEAktsp0o+GgAyrHAZBS+3 9rxtwMmmvZNRLlTSLIJzl+QAqCLVmXL/xncC6xXO8e/Rym1Sq7aLwdDJaP0W4anIFr4Iu4xHT8qap lKawTZGrAIdRgYy1uCcMETVCAPCohRyoaDRxNKt1cs98Nnl/xlAMFxk/BTxJSQoMRVbD6PkTpcmsR WNmmRhVinaguNGjRzWE4H1t/XWNWsc06tijSLW7we2qJYcr/FhayKV9zkjhT8C+wWcmwBiGgci/a4 9a5j8UUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMYY8-000000085Jt-2K3Q; Wed, 26 Jun 2024 19:43:24 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMYXv-000000085D2-0YGt for linux-arm-kernel@lists.infradead.org; Wed, 26 Jun 2024 19:43:12 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-424f2b73629so11159635e9.2 for ; Wed, 26 Jun 2024 12:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719430989; x=1720035789; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6B6zMz66mId752W71/Awh4RoZkm3MLOugnC6sEYYCNg=; b=LTNjTX2dklrw7sL2YeKGm4Cs8NemP0qJxe7Kh9EJYjEOXaEq5RbZ/so5srOgpkea8Z d420YMls4suFXosGmZejDUd6n6OHvGlyqswt6TE0HlND7Z18PmXNP69nG6NZAzlFY+tM oZd9L311FlANUXcXu2moaAApk29l9epKzdxNjAAWl6V+60MsYqhX+Al2MvRRc3r1Ie19 PoS01mHgmAt3sUXe5rjzBr8l8HpSRgB0XYte3ukw9wMZHGa/SdShWxDS4cN316p5nQZe 8bLcF5euVTLs8CVJb/I3Q1VwumXkHd+ZwYMvmwy9GZClSKoEQZckW4y+u38PynU6XVXd koug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719430989; x=1720035789; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6B6zMz66mId752W71/Awh4RoZkm3MLOugnC6sEYYCNg=; b=QfOaqkELeFItrMyM/m5TwQ/0Vhyb/HGMSdLHcft3Dj3R7RTLMuzGPzPOqi1FeI/SFN IjqvVfQzG1Lp82yYXo8v336vOPnERgxxhhSHpiSTN55fXz3Cx1zBjYuPS6IhL0OFTg3C A8bAmV0U78PVdpwv5yja8OEdnWFSmizCg4M0Lc2hArc3b+4kdcd1fW+z4sbmwPVBcLKu sYzK9R9yaFyUbwmJfs2Nwhrogz6pLWZo6JaDYSz9XAenEjgSeW155XL+41Tt3SMhIntd Qa3dEpx1LiqKrHfidRlhSsZTcWC8jcGjjPEqnTsQu8/WSs69KDF7n6gp4GA9LtAPnsws AYzg== X-Gm-Message-State: AOJu0YzTYziNvIM+uitvqz+Cxd0zLfPxDZ0k/Ota4E0ZCOAo2otiNIk3 l8ssJFu5eYK3g/0ymlPm6x/ym7B2+J3Iqgpy7Le/RWdPXM0HRC5VzhjwLfzW0TU= X-Google-Smtp-Source: AGHT+IHE/9FMLNxeq1ujy3GK1f/VeuXsMI30Klw5I97NuBAg2W8K6Jh0ubTi20bQaUpHSFcBiirkNw== X-Received: by 2002:a05:600c:43d4:b0:424:a4a2:9478 with SMTP id 5b1f17b1804b1-424a4a294cemr41167465e9.25.1719430989622; Wed, 26 Jun 2024 12:43:09 -0700 (PDT) Received: from gpeter-l.lan ([2a0d:3344:2e8:8510:24d9:a20a:2de5:8eda]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c837eb2bsm36728905e9.39.2024.06.26.12.43.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 12:43:08 -0700 (PDT) From: Peter Griffin To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, alim.akhtar@samsung.com, s.nawrocki@samsung.com, cw00.choi@samsung.com, mturquette@baylibre.com, sboyd@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, tudor.ambarus@linaro.org, andre.draszik@linaro.org, kernel-team@android.com, willmcvicker@google.com, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Peter Griffin Subject: [PATCH 1/3] arm64: dts: exynos: gs101: add syscon-poweroff and syscon-reboot nodes Date: Wed, 26 Jun 2024 20:42:58 +0100 Message-ID: <20240626194300.302327-2-peter.griffin@linaro.org> X-Mailer: git-send-email 2.45.2.741.gdbec12cfda-goog In-Reply-To: <20240626194300.302327-1-peter.griffin@linaro.org> References: <20240626194300.302327-1-peter.griffin@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240626_124311_191629_31DAD10F X-CRM114-Status: GOOD ( 10.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Reboot of gs101 SoC can be handled by setting the bit(SWRESET_SYSTEM[1]) of SYSTEM_CONFIGURATION register(PMU + 0x3a00). Poweroff of gs101 SoC can be handled by setting bit(DATA[8]) of PAD_CTRL_PWR_HOLD register (PMU + 0x3e9c). Tested using "reboot" and "poweroff -p" commands. Signed-off-by: Peter Griffin Tested-by: Will McVicker --- This feature has a runtime dependency on the following series https://lore.kernel.org/linux-arm-kernel/20240621115544.1655458-1-peter.griffin@linaro.org/ and also the exynos-pmu and clk-gs101 patches in this series to be functional. --- arch/arm64/boot/dts/exynos/google/gs101.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/gs101.dtsi b/arch/arm64/boot/dts/exynos/google/gs101.dtsi index a66e996666b8..ce24b80985a2 100644 --- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi +++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi @@ -1394,6 +1394,21 @@ sysreg_apm: syscon@174204e0 { pmu_system_controller: system-controller@17460000 { compatible = "google,gs101-pmu", "syscon"; reg = <0x17460000 0x10000>; + + poweroff: syscon-poweroff { + compatible = "syscon-poweroff"; + regmap = <&pmu_system_controller>; + offset = <0x3e9c>; /* PAD_CTRL_PWR_HOLD */ + mask = <0x100>; /* reset value */ + }; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&pmu_system_controller>; + offset = <0x3a00>; /* SYSTEM_CONFIGURATION */ + mask = <0x2>; /* SWRESET_SYSTEM */ + value = <0x2>; /* reset value */ + }; }; pinctrl_gpio_alive: pinctrl@174d0000 { From patchwork Wed Jun 26 19:42:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13713317 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 3FF06C27C4F for ; Wed, 26 Jun 2024 19:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=itjEXOXzQyQKcMZI8QbOfOw29V9GALUONSBPehBlPuM=; b=3ASnpHxO+kaRG+EJ2W9LRGIcWV ZlGNw7Uhv8IgDUlrHyYlpaggf81Iw0DGFP+5Vb3XXY+Jd6EsGaEZmcHZH6YAuAfhZZTLnU90OpRCG BIM2wOjXYbfUjPLSnvbS46jU6l8MSLqSFyjeoKKhJdi26C1+6zex7M8o0aQ5VUJxoli8IYeik/Yv/ TLGWMWpTnZhAMQ/EAZ9KlnpfiweLKrw5TkO6169hgIuxAMaTmkSWSWj/c89Kr8Xf8aWAg0iKTxS+h ZPEk19SLfaKMZE7HReIjxqHi2/nDgJPT70DIHw5oaBpv4qJ7FcSrk5YsugbpDikvH3SdxjkBdZPOi W8FnkFCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMYYF-000000085NQ-092N; Wed, 26 Jun 2024 19:43:31 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMYXx-000000085ER-0V0M for linux-arm-kernel@lists.infradead.org; Wed, 26 Jun 2024 19:43:15 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-42562a984d3so2925205e9.3 for ; Wed, 26 Jun 2024 12:43:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719430992; x=1720035792; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=itjEXOXzQyQKcMZI8QbOfOw29V9GALUONSBPehBlPuM=; b=jMwX9vFSVCYMWqHMmxla1QHjsBvh/p+Hlyvga2VX8b24Fe5hsS2Qq2go3YVku6NrDT UnQOoEHk9g8bkawYcYU9WN8m5lhJemmDzJcvifi2ml1GvLSKAETxPX+Ck5zVA1Kjp2Lr dHdImDz28IB9C5vCLlhAninMo5wi0fXEKJ3IDFjAqX9eOio+XtiIpJScfD3zsw5mBCnA UmNDluBJrWLp3SOK2SX5hjaSRWJEuaAjaUHOy67S69HtltZtU45O60v3R0rqGsTwTzPZ 0dYs3om1mHb/7eVAa8HtVhgiK2JUbj8nSQRHaJiNSpJ/14gA1Dajkk+IrTIy63l2lQOP LtJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719430992; x=1720035792; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=itjEXOXzQyQKcMZI8QbOfOw29V9GALUONSBPehBlPuM=; b=d7SLcpduoZtCSKr4rt48XYQ7TguQHjlCxHTUEcWbo3vjPy+jDnnI1KIUuJPHn+bddw fSsmy5rNiYgqTwXsSFBdWiih42T9e6QSzzpi3thpoM8KWgFhIQIub3rXSNG1getaer8Z n/xfJSzvr9yUC79nb04s/UQ3wuT7GlScONE5byFrOOblzNw6k/brAOXO6h2EdCUZGmF5 if3VsfYmy/F7XdbTMCLWUUWo7oEtN+BQBPaumN2+zhSVxEbgjPVcJTFg8TNBWwqf/erN MsG3cUPumboh76cq4ZkQYjk02r1qzddcDix9/mKMck++EKvAlnjvzTQSbGvfPllXg8W3 BJeA== X-Gm-Message-State: AOJu0YzI/9yVl4ydJbO015A7o+WLyI7DYCICoRUwEQxzRs3AHT2tCzkX 7WaoJ0PDSGpDiQT4zsdpc3dbWISCTA4O4ilTKi7GWpky1+7Y18+Tto+RdCi4m0o= X-Google-Smtp-Source: AGHT+IHfX7OcBD6RtAgL4xteSdf1Nw93HCLkwb+4A6AZaX/B1Vh/4GYCHbWGaSDfQ4ZAgSMPHvr94Q== X-Received: by 2002:a05:600c:3011:b0:424:ac9c:7228 with SMTP id 5b1f17b1804b1-424ac9c7c26mr20195405e9.4.1719430991709; Wed, 26 Jun 2024 12:43:11 -0700 (PDT) Received: from gpeter-l.lan ([2a0d:3344:2e8:8510:24d9:a20a:2de5:8eda]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c837eb2bsm36728905e9.39.2024.06.26.12.43.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 12:43:10 -0700 (PDT) From: Peter Griffin To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, alim.akhtar@samsung.com, s.nawrocki@samsung.com, cw00.choi@samsung.com, mturquette@baylibre.com, sboyd@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, tudor.ambarus@linaro.org, andre.draszik@linaro.org, kernel-team@android.com, willmcvicker@google.com, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Peter Griffin Subject: [PATCH 2/3] soc: samsung: exynos-pmu: add support for PMU_ALIVE non atomic registers Date: Wed, 26 Jun 2024 20:42:59 +0100 Message-ID: <20240626194300.302327-3-peter.griffin@linaro.org> X-Mailer: git-send-email 2.45.2.741.gdbec12cfda-goog In-Reply-To: <20240626194300.302327-1-peter.griffin@linaro.org> References: <20240626194300.302327-1-peter.griffin@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240626_124313_285154_DBCA5BF9 X-CRM114-Status: GOOD ( 16.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Not all registers in PMU_ALIVE block support atomic set/clear operations. GS101_SYSIP_DAT0 and GS101_SYSTEM_CONFIGURATION registers are two regs where attempting atomic access fails. As documentation on exactly which registers support atomic operations is not forthcoming. We default to atomic access, unless the register is explicitly added to the tensor_is_atomic() function. Update the comment to reflect this as well. Signed-off-by: Peter Griffin Reviewed-by: Will McVicker Tested-by: Will McVicker --- drivers/soc/samsung/exynos-pmu.c | 16 ++++++++++++++-- include/linux/soc/samsung/exynos-regs-pmu.h | 4 ++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c index 624324f4001c..5556acc7c092 100644 --- a/drivers/soc/samsung/exynos-pmu.c +++ b/drivers/soc/samsung/exynos-pmu.c @@ -129,14 +129,26 @@ static int tensor_set_bits_atomic(void *ctx, unsigned int offset, u32 val, return ret; } +static bool tensor_is_atomic(unsigned int reg) +{ + switch (reg) { + case GS101_SYSIP_DAT0: + case GS101_SYSTEM_CONFIGURATION: + return false; + default: + return true; + } +} + static int tensor_sec_update_bits(void *ctx, unsigned int reg, unsigned int mask, unsigned int val) { /* * Use atomic operations for PMU_ALIVE registers (offset 0~0x3FFF) - * as the target registers can be accessed by multiple masters. + * as the target registers can be accessed by multiple masters. Some + * SFRs don't support this however as reported by tensor_is_atomic() */ - if (reg > PMUALIVE_MASK) + if (reg > PMUALIVE_MASK || !tensor_is_atomic(reg)) return tensor_sec_reg_rmw(ctx, reg, mask, val); return tensor_set_bits_atomic(ctx, reg, val, mask); diff --git a/include/linux/soc/samsung/exynos-regs-pmu.h b/include/linux/soc/samsung/exynos-regs-pmu.h index aa840ed043e1..f411c176536d 100644 --- a/include/linux/soc/samsung/exynos-regs-pmu.h +++ b/include/linux/soc/samsung/exynos-regs-pmu.h @@ -657,4 +657,8 @@ #define EXYNOS5433_PAD_RETENTION_UFS_OPTION (0x3268) #define EXYNOS5433_PAD_RETENTION_FSYSGENIO_OPTION (0x32A8) +/* For Tensor GS101 */ +#define GS101_SYSIP_DAT0 (0x810) +#define GS101_SYSTEM_CONFIGURATION (0x3A00) + #endif /* __LINUX_SOC_EXYNOS_REGS_PMU_H */ From patchwork Wed Jun 26 19:43:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13713318 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 42914C3064D for ; Wed, 26 Jun 2024 19:43:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vZg0Dan8dZ1cJlzdkxx9g6a64AyosFvjL+3niLEIVTM=; b=1RH/tZuOHIakn331K/18dRuICU mPB8y1BTQahZFdZ4pLD6m3PKHI/TItAmaV8slHIzrL6ruG0HC3fXohypqBj7xgVjtjuo5GlazDQml muRHXYiCc+TL5Q/1wotwFaRZow1dA8O4CTULqbKRmQL1+bE4Hefbbid3Ww1svFgtD9ER1cY6GfME0 vxWBmVmhayKSvY1rGI5AeUv18u7TU1syKc90CBodrWH+HxdAyRuccvp0u/NtfOs/On1qWF6Nz6Gys nYI5Mw/QC6eY9v0wide7tKzNNgORZtShxUnERf4B7Pr+jAtabL+483dvbDD8JgQTNuECM/y0sLgoZ ulEEzeGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMYYL-000000085Q9-3Nm6; Wed, 26 Jun 2024 19:43:37 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMYY0-000000085Fq-1F4m for linux-arm-kernel@lists.infradead.org; Wed, 26 Jun 2024 19:43:17 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-52cdfb69724so5341923e87.1 for ; Wed, 26 Jun 2024 12:43:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719430995; x=1720035795; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vZg0Dan8dZ1cJlzdkxx9g6a64AyosFvjL+3niLEIVTM=; b=thwfbVnvP+sjLdRbhT3kb4dncvnrw6BWvFH/BQVURDdZI6InVYX1jOG2B5rD9Z9O17 MAihhmjCIVzutK6SagrDReSsUZPhTqfsvnQ8KzjvKglpGfxRMjxQkG525Do2/UaCWdIC NTr8oApz3+kazelcXOJDjJKL9g+ltHEKrd1zRtoKoAB2Hf41d9+sdVE95uFCOvRWi4OO SlgLeM966eemwkFbtvBEuJ3tYlTAGJSC+jjRhoJ6dUWdD0XTD5aRBsGWxGryPiZgdlIB XQAfxxplARNd+GVNunBml+CEbcl+oRmKRp0Bw4FF1keTE6NDRspxwgVVden9aLZvBuJ/ Ksow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719430995; x=1720035795; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vZg0Dan8dZ1cJlzdkxx9g6a64AyosFvjL+3niLEIVTM=; b=Oiiy+LslnQGAqF4U8PZYFVT96PzD9TgbzmefcGIoKZelfjuX+vPHam9wgxrjDcgotI 8yX4H72Kb/BVL3Blc1WKyQOamFghhJZCFjkvohkhyxNzWnyLYNuHhV6J9Bmp6sjT/iRi ng0GiYOg8X6a+r0wnp1REgrae0/HKVzac7htGTYZU7SKtSXJtjSG6Odp11/YZypTEtxF n3ibjdOY0+giyLiSdffM2LLU9gKiMjOufmYx/hgud4NyHuHryF+nLUOskkC248MgEHmD TlfJWF5fgyyRHCLDH48Hjcbsc/qGYXZ1qZatkewnIPL/PuiDt3uKFHG2D8nFqLW8fee/ SmCw== X-Gm-Message-State: AOJu0YwuO6S9xHNoHxRLiqBZqRV/Ku22l5I3qpE/WEyWA6z+qN63L1U5 35p7aBBDpez9tcskY0Yvi+3xkJuNRcYqsLcflwdJ0q7mcupGCHiRDwf/Em4426KxZYOfFKiCId0 R X-Google-Smtp-Source: AGHT+IF5TBKDZODftqTmo/Y2LCMw2rq2sjADo9zE73i9eab9HhHgjvgOrzapHeP3tI3ZKFHbYrq1dw== X-Received: by 2002:a05:6512:3f0b:b0:52d:215a:5071 with SMTP id 2adb3069b0e04-52d215a5162mr2982937e87.62.1719430993614; Wed, 26 Jun 2024 12:43:13 -0700 (PDT) Received: from gpeter-l.lan ([2a0d:3344:2e8:8510:24d9:a20a:2de5:8eda]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c837eb2bsm36728905e9.39.2024.06.26.12.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 12:43:12 -0700 (PDT) From: Peter Griffin To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, alim.akhtar@samsung.com, s.nawrocki@samsung.com, cw00.choi@samsung.com, mturquette@baylibre.com, sboyd@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, tudor.ambarus@linaro.org, andre.draszik@linaro.org, kernel-team@android.com, willmcvicker@google.com, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Peter Griffin Subject: [PATCH 3/3] clk: samsung: gs101: mark gout_hsi2_ufs_embd_i_clk_unipro as critical Date: Wed, 26 Jun 2024 20:43:00 +0100 Message-ID: <20240626194300.302327-4-peter.griffin@linaro.org> X-Mailer: git-send-email 2.45.2.741.gdbec12cfda-goog In-Reply-To: <20240626194300.302327-1-peter.griffin@linaro.org> References: <20240626194300.302327-1-peter.griffin@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240626_124316_373102_7CE8B626 X-CRM114-Status: GOOD ( 11.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The system hangs on poweroff when this UFS clock is turned off, meaning the system never powers down. For the moment mark the clock as critical. Signed-off-by: Peter Griffin Reviewed-by: Will McVicker Tested-by: Will McVicker --- drivers/clk/samsung/clk-gs101.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/samsung/clk-gs101.c b/drivers/clk/samsung/clk-gs101.c index ba9570f7a5fa..85098c61c15e 100644 --- a/drivers/clk/samsung/clk-gs101.c +++ b/drivers/clk/samsung/clk-gs101.c @@ -2846,7 +2846,7 @@ static const struct samsung_gate_clock hsi2_gate_clks[] __initconst = { GATE(CLK_GOUT_HSI2_UFS_EMBD_I_CLK_UNIPRO, "gout_hsi2_ufs_embd_i_clk_unipro", "mout_hsi2_ufs_embd_user", CLK_CON_GAT_GOUT_BLK_HSI2_UID_UFS_EMBD_IPCLKPORT_I_CLK_UNIPRO, - 21, 0, 0), + 21, CLK_IS_CRITICAL, 0), GATE(CLK_GOUT_HSI2_UFS_EMBD_I_FMP_CLK, "gout_hsi2_ufs_embd_i_fmp_clk", "mout_hsi2_bus_user", CLK_CON_GAT_GOUT_BLK_HSI2_UID_UFS_EMBD_IPCLKPORT_I_FMP_CLK,