From patchwork Fri Jun 28 22:35:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13716704 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 1AF73C2BD09 for ; Fri, 28 Jun 2024 22:35: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=A+35USzVPil6wRdDqJfS7dElyhUMtDCnmyu7VzjnW14=; b=AKuyiFg77j42mAOIGXttCn3Tku vmZenPQexW0npU55KjJYyVgibRstyegk0bhk3HOgMlDk+I91rk+sXsYytXmfFPKYt7wiAezgYAiOl oNuPqorqk5ytDncFK1UucSJotmT+we7mYDHDT8zjFVn16dDoAT85iGtgzaYWOIZ2Mspbu5n6Sp5Qb TeQxJ8kfBl1PBOCju4I3KI/odAv5O4WyDGBBPFqy0QsVC3j9G3FwLcwT92LwlU3mVddqCfoHDVUrz 1ppPVTyqT2n5FY5Q6LjtZV/WScaqnaOHyirxzMb7AoRfh8wsDylvjHoCRcFpTXd3O39GmX87gQzAz Uc6kPrSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNKBs-0000000FC4U-1QbY; Fri, 28 Jun 2024 22:35:36 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNKBW-0000000FBvO-0tcU for linux-arm-kernel@lists.infradead.org; Fri, 28 Jun 2024 22:35:15 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4248ea53493so7746285e9.3 for ; Fri, 28 Jun 2024 15:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719614112; x=1720218912; 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=A+35USzVPil6wRdDqJfS7dElyhUMtDCnmyu7VzjnW14=; b=Yx/jY8t7ntyDW6IcIGPpnda7Dnr8rhP4dNm0CWBzTlX9OOPcwh3DcvBPwjCIYKXaGP 7WnUEvwxy5IS7qnfqcPbvGkx5XpA/ygg/kH8G7hijQVdZ/ocUaFtL7BKNHQKGz6smPa1 tHQqdWtNZ1DFSOAA9z6SnYfUzL1ATvl6KoT/JxMBQrV1qlnYO4N7bnYax077nUT2iQd0 FwfAzw9W5nYscCmlB2/jKF1ob1ZGtU58RnTmrU2n62olb8SbLc80sCoJ6s0jD7eGuu9t mgpZXYgNSFbRhR3HxF2wWRWLeaWM1VIFf9P0kjesxHmSar9vDwocvwNUGO/EJGyFawyj l7lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719614112; x=1720218912; 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=A+35USzVPil6wRdDqJfS7dElyhUMtDCnmyu7VzjnW14=; b=R4tcHU56aBciBttwxQBMDTMMh/GrrxkxpJa/dbXiQGNuxkPd3ZDIwp+H8NU/I9s1ke Q7CYn9662wbzB1AKf3Pwzx30EQnwt0RHZvATPsE7a62pI2pWA1BVosOdicvqszI48kk8 xIPU1DHhDR5pC5O7EZBkH4h5uGfoLlNfCInM11HJyNLUtbXKK4PFzCR6eJcPpOl2fo8/ R8y/Dwtogcv7LbL/GR6PKocNwGSV20HW5Qi8M6ajo+S5/DJzADZx0cssWrWCxRZxT1H7 Niw0Lw8eyOmGe8sXxq4p38XD0AxQ4mGm4YxnGX8wJJNZTcK9Jfm2ijLIiZkwMK5Vqjmf 12hg== X-Gm-Message-State: AOJu0YzTK8jZssPdrR4F51XK4Eubz8ImRbBdfhZvVGbL95M4OQMNIb3q uNe1tkvaIUE+V/MbG9XDjPbFTeROhaMl5sjl5+K4nUYpSAwpOUxu8hG/bdnkBY8= X-Google-Smtp-Source: AGHT+IHdEzPFhVw89GaUbW5G4V1JA1tDs48lY6DDMMJTJQZDmiE/0Eu93AHY5VhEgJDeQnT0q07IDA== X-Received: by 2002:a05:600c:4994:b0:425:5f6d:2f3c with SMTP id 5b1f17b1804b1-4255f6d32cfmr59547625e9.39.1719614112249; Fri, 28 Jun 2024 15:35:12 -0700 (PDT) Received: from gpeter-l.lan ([2a0d:3344:2e8:8510::3aa]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a043a16sm3496711f8f.0.2024.06.28.15.35.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 15:35:11 -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 v2 1/3] arm64: dts: exynos: gs101: add syscon-poweroff and syscon-reboot nodes Date: Fri, 28 Jun 2024 23:35:04 +0100 Message-ID: <20240628223506.1237523-3-peter.griffin@linaro.org> X-Mailer: git-send-email 2.45.2.803.g4e1b14247a-goog In-Reply-To: <20240628223506.1237523-1-peter.griffin@linaro.org> References: <20240628223506.1237523-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-20240628_153514_278065_2A7232B3 X-CRM114-Status: GOOD ( 10.77 ) 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. Tested-by: Will McVicker Signed-off-by: Peter Griffin --- 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 eadb8822e6d4..302c5beb224a 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 Fri Jun 28 22:35:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13716705 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 9B92AC30658 for ; Fri, 28 Jun 2024 22:35: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: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=AWg6K4lF7Ia2UQmGAEMoRHt0caBd3GiOuDYrWDdJIgc=; b=B7HcrMm+Jg1JVn95AJZfQ7V2IY 6jGpZ24s7TF2+dBSh9noxhBv3wAZl3TfaM+dHU4gmlFVeDuj7lXncUwv01bXuJn6EkxwaMgopsb9v nU0OB0mhZNrQ512wNbkMhFrHam77VTEiaGyZ+zDfWomOk6HSXYAhF3NC1/AU5VBaNj8RS2INRJH2N gEFhqSZ8ai9pDvziMu+FgLp/1MlEyt+ACF3CYXDlZtcfbGdrtmRR1wuga+1kqOXhuB2tMCXnf9zQ9 F30O7L02nwtxF9ZD2niX8duEflxhJrl8MJp20Ns1sESJw5UHttl098HUV235B5qBIJ4taast9dYPr hEbnQsxw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNKBz-0000000FC8e-2Jpv; Fri, 28 Jun 2024 22:35:43 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNKBX-0000000FBvo-2955 for linux-arm-kernel@lists.infradead.org; Fri, 28 Jun 2024 22:35:16 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-365663f51adso709447f8f.1 for ; Fri, 28 Jun 2024 15:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719614114; x=1720218914; 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=AWg6K4lF7Ia2UQmGAEMoRHt0caBd3GiOuDYrWDdJIgc=; b=JQCgCZv9mLK9bkEYtsjhr/ycXUim9W8nw8s5FT+1z1S/Lc1pUKSq5d+gkDXf8PWYt1 x5FZY9aKXW++eCM91LdU+vqudDqyHPkKXyUIXMtqJH7hd7pZRRvI5pglmEwkPc9QWknc eBNladgpDSc9dlmNtXAIKweTn74iG1LoSj1FAHl2K2rzUhm84eu8ErjmSApxm+NVfmcA qx04MRx0Dd+3+17rjmW8Z4S4w4Szf1Qqc32Wabsxaup5lt89sQ6FTRTG7dDcrxVcFb78 QEGNNaSbLE946kDy4QLgT+Wpmy5nKAUPqjDFm2NwLvMQgATa7XU8M5JKhkjtmtgGazEs lkHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719614114; x=1720218914; 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=AWg6K4lF7Ia2UQmGAEMoRHt0caBd3GiOuDYrWDdJIgc=; b=b2mM2bY/2RnETprC/gBAjHITfRb8JI6TzpRVioS63Syu4ALiKebB2HZ9081R0a4+n/ B9d+RPsJWFm0ALYRfZuKW89gdYGtjUM1lTfwBSCDng3ZunwOQg0HBNHChtqSRH4yLFuj 0EENTrOfUQ4kZP5elzWveyAg5sm6JS3wazZoyPRYWywYBRrExjL3MgO7+4XPSEUKh3z9 txmxpKiAUhG3f2IGRvxuhSPxQKIKCVes8RKGNTTwVXBSueC7fadEkMClu14U6yplVsmt twAIyT3rqqMfNfK+gYV8lX5lWaPZFw1yFqU6h/82bU2QG9e1NdjefPKF017eMgZOXKGI 7pew== X-Gm-Message-State: AOJu0YxoH4EZlVUnUOD5968Rb5yGDY6DbvPQN8J6nSHZCLwrR1O2jP6e bUdQGb3+TRV9t2X899NmBnkJwrfuMb/zzEBG2Ach7bSzWygOC18sINNGweXxav0= X-Google-Smtp-Source: AGHT+IGQaEcZtkAMiKM9GSQOooFZeBRh3tTeuC+Xc/kCGO4xJ60dXrICAPaXg5XqxZbcHv05RyTqvw== X-Received: by 2002:a5d:4e8c:0:b0:360:8dba:af69 with SMTP id ffacd0b85a97d-366e4f0ce68mr11178993f8f.61.1719614113724; Fri, 28 Jun 2024 15:35:13 -0700 (PDT) Received: from gpeter-l.lan ([2a0d:3344:2e8:8510::3aa]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a043a16sm3496711f8f.0.2024.06.28.15.35.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 15:35:13 -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 v2 2/3] soc: samsung: exynos-pmu: add support for PMU_ALIVE non atomic registers Date: Fri, 28 Jun 2024 23:35:05 +0100 Message-ID: <20240628223506.1237523-4-peter.griffin@linaro.org> X-Mailer: git-send-email 2.45.2.803.g4e1b14247a-goog In-Reply-To: <20240628223506.1237523-1-peter.griffin@linaro.org> References: <20240628223506.1237523-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-20240628_153515_616135_BBCA93EC X-CRM114-Status: GOOD ( 16.38 ) 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. Reviewed-by: Will McVicker Tested-by: Will McVicker Signed-off-by: Peter Griffin --- Changes in v2 - Move PMUALIVE_MASK check into tensor_is_atomic() (William) --- drivers/soc/samsung/exynos-pmu.c | 22 ++++++++++++++++++--- include/linux/soc/samsung/exynos-regs-pmu.h | 4 ++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c index 624324f4001c..d8c53cec7f37 100644 --- a/drivers/soc/samsung/exynos-pmu.c +++ b/drivers/soc/samsung/exynos-pmu.c @@ -129,14 +129,30 @@ static int tensor_set_bits_atomic(void *ctx, unsigned int offset, u32 val, return ret; } -static int tensor_sec_update_bits(void *ctx, unsigned int reg, - unsigned int mask, unsigned int val) +static bool tensor_is_atomic(unsigned int reg) { /* * 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. SFRs + * that don't support atomic are added to the switch statement below. */ if (reg > PMUALIVE_MASK) + return false; + + 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) +{ + + if (!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 Fri Jun 28 22:35:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13716706 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 904A3C2BD09 for ; Fri, 28 Jun 2024 22:36:02 +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=bK4GVLftRcx1G43I5RNC1VZ+kMnAGIqU8rAyC3MW8BY=; b=y+RnUvsmdZZDnz9D+OKqNC4+0/ QWxee+PU1yYDm98p0XBGFGQtOpFClg5WCIuUnf6NDGNHmj/66/ALnHVF/mISpnNSN6l5+T6O3wRS1 hzcF6m2uccnKTJ5AwJUC2Xml8iNg+LgwbIJwAcZbq59k8rDQjzjIP7CqMumggthFSk67+HOZNeA8e wqNnrS7SeMMZqlFDhYJGtTD3aRNuHTcLRh1t2eu22YJdiefZ+xNhkvKzCABoZvrV0v9Vtk5cEI8s6 Ag+SyqMXy1VzGgxCYvyacYg8qIsPK7BALYJ/bsveR2wW82HZQbB5dfiytSYYojXVbT0mG2teUfO2r WD/dgGWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNKC7-0000000FCDo-2tgF; Fri, 28 Jun 2024 22:35:52 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNKBY-0000000FBwc-44r5 for linux-arm-kernel@lists.infradead.org; Fri, 28 Jun 2024 22:35:18 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4256eec963eso7591985e9.1 for ; Fri, 28 Jun 2024 15:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719614115; x=1720218915; 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=bK4GVLftRcx1G43I5RNC1VZ+kMnAGIqU8rAyC3MW8BY=; b=qMpBAe2e37h/rfYPI6TpL0dWDSxsm0IAU5+lBLWotU7yzMMXemJhKXart46PoNj4nf Pfy9k4VKs95NBUj3hePnkmQ9MgJUee5YKaTON5cu2jNf7CexKMLKA1Z7fk7SN8wCqYF8 8o+Zzv6SLfVe5QYn0pFGZ7dzq4ffFLtKpy2ep7i03gZ7Avt3Lajeoda2i497nVkWGjnC 2nw4nRW9mfBiBDNXfjTXzmuxfioPKkIUtIrOumZZ7xi8L7l8l4ghLY4SyGdSqCMSWenY kbTUBdRA+z9HKLbBhQXMDUITm2ZHDlHR1CFlCEkbXrAtxdfTG+jWvX5cJrMiy45O6F5S E+4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719614115; x=1720218915; 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=bK4GVLftRcx1G43I5RNC1VZ+kMnAGIqU8rAyC3MW8BY=; b=QUMs+hjyfhrFsRCU8+JpsM0ZJS7ciVEUBDQmC/LLmq5Q4lh2CmZONLrAR4kA+Z/JzV ypQapML1ofj2tll1aW3tjJCz1ZcViXbUgqADXxxQ2rm35djZNaTvG5ibAegK6fGsVDKi VSJuSgjRiovN/zCQT5oxmpQCmNHfyg8FGEWtd7WLB2LwXSNMKDJwCAwTaidAJKmpcqZs HR9AEay66bAOvK9cg7TWA4tITkigvObZUG7rHcXGC/8DlQgb0u/19BjgEAVW/92UDpPC XWqqkw7jgzg/jlCtceA9hs7m1LGzFr2cbrpn8PJCsjVZXOwXAmbFZ5p+4hWKdiPsPxFN 52sQ== X-Gm-Message-State: AOJu0YwX5vcNnzzGo74aj42flzgK0P38yVF+r0IaNNW4/IKIS0uw2qmv tFzOjJ9tnDpyntOg03RdjY+juzKiY1umeO4LN27Zw4SsdIPQdgLBlvV9At+Bd7Q= X-Google-Smtp-Source: AGHT+IGAx/+hg7U8vXysG5fFaJ+7znqTB7jHT7deRrgK6fDUyfus/N4BjGymdOMvzYq/K9V9/QTmyA== X-Received: by 2002:a05:600c:6b16:b0:424:a3d7:2a89 with SMTP id 5b1f17b1804b1-424a3d72b27mr80778525e9.4.1719614115166; Fri, 28 Jun 2024 15:35:15 -0700 (PDT) Received: from gpeter-l.lan ([2a0d:3344:2e8:8510::3aa]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a043a16sm3496711f8f.0.2024.06.28.15.35.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 15:35:14 -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 v2 3/3] clk: samsung: gs101: mark gout_hsi2_ufs_embd_i_clk_unipro as critical Date: Fri, 28 Jun 2024 23:35:06 +0100 Message-ID: <20240628223506.1237523-5-peter.griffin@linaro.org> X-Mailer: git-send-email 2.45.2.803.g4e1b14247a-goog In-Reply-To: <20240628223506.1237523-1-peter.griffin@linaro.org> References: <20240628223506.1237523-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-20240628_153517_034339_4FAC18FA X-CRM114-Status: GOOD ( 12.75 ) 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. Reviewed-by: Will McVicker Tested-by: Will McVicker Signed-off-by: Peter Griffin --- 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,