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: 13713324 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 39FC0192B63 for ; Wed, 26 Jun 2024 19:43:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719430993; cv=none; b=KddL9xtwy6b/8sgC6BRFLpZON+IditEf5UJW804+W1tcGwSX8tyBmt3B3qlZfvZTnLLTcPSQEeMUWWhHjqCTStq05ZYPPY98LgWoDflToPP4ZvZnfGgKd2i8DhIbL92mHmcfu8lgBV+tetNRe16fwcGTmCkabJzuLVopGYWsY50= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719430993; c=relaxed/simple; bh=cSR0gYcxjPBmP6LYpUXWyVrCem1Nc/dEqwkoBvR6aRM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jG273W4WqYZxULNKv0qeAW9uy1A2mrhgODOSx2UnUWmAVgUEzLrPfgGMx0hqDkLD8155teNocU9ikuK5o55yfs219eR8xW+LQEtQxBnwfJqdan8Up3IjPQsYALY0a4Du0KIo5/bZlt5g/ZL8l9AKokPbMOQaOT1tRL1LHWwaQd8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=RqFF3BY8; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RqFF3BY8" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-424acfff613so13797445e9.0 for ; Wed, 26 Jun 2024 12:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719430989; x=1720035789; darn=vger.kernel.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=RqFF3BY8hvS05OVOt1eDzYCLugrfFsKwbqWl7zV06OKnhPh5nSGckrfh4MgPSuy+Zf fiZc43dmgXfEx+TnCPTXLVM9mQlk3QN+HTcvXtGhl5Rv6qf9CVL9qg1vhuHixWw7wNR7 Zs1MeJOy/0SlB2aX48KF+NprqpsywME3smMYLEXcegL/lsMKto81kUeHSzHYU2tAgUS1 AARGiRqu0yApnnEns5LOLO+FkYirNEBvy4e74sgnImczvkbNf0RPXXnsWK3JEiUXi7SN rUNYEphPWI9dVY87ba+zB1xIsSYpVFxLNjaR/HTKREiRO9WfDL2CUa4nGrgRkZgx4zsX lDIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719430990; x=1720035790; 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=px9I8gqSvN6zrGUSFHfngezXd5iLk5LlnXOHKynlt5GINkT+mWRE/D+i9xNc1n46Df JS3nc1e+bG5+4pB15kt4NfQhH4uUT/mk8hbkOZtXX90s1zDa0tDVm80fG15jWL+x7vKn pYCQRQcxSNZGNU28+Vbk4utWBbwxzUmk51atlRJZAcrv02mxfvM/ZEhlyYpvZxDofqs+ MApVDeNwZL/Zghv9Ribn3DWkx2pYVZ3CrsS3Ap20M/PL3y/OAzwineOQk7OEoJ53dREG z6YPMx8fe3FYRJnGM3CtMaCDw5BquuIOILES8SLg+eOichPkE0m6uY390qj4Dn8TPqlG sTrQ== X-Forwarded-Encrypted: i=1; AJvYcCUWoPLx0ent18sFFLloejsvPAKEWaBwR1ZzU3dZ5pPJ5VrDCpVFf0Gp/qxc52R+i+YfuVdrMoN4+cLN4jTzRJCzJAN6qIvssTTwvdzpsZaum90= X-Gm-Message-State: AOJu0Yxxhj/g4FKK55fqyoLLp7so32gt+rNyTmi/pbtzPaCVUtZNSSNu lC5+qtlpu++Nr1h1Tf810dIBvqgPYiPXnvLuFG5CYkAbecXdGEjvuVegfqyETbg= 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> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 13713325 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 4E825192B84 for ; Wed, 26 Jun 2024 19:43:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719430995; cv=none; b=eXB6hN16aaCpDfy/dnK6BivyLFSTHGwSwt2fqzyZAofOBXZS9Rs9g0e9VochQvPS1lpuXnB120Hws/eniN7c5Uf4ez/VY7j/KjDuoj6aQhzssIEP3lS42/rox9SlRYwW93KlHpKT4c1dsoD6MaajxonNKddtL2XDznua+qYB8EI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719430995; c=relaxed/simple; bh=QWIFihsVD1gKqEZxXoCvx6MZhkayfkQXDw2BS2+6928=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TfVGJRbPHpskm2QQwJZ7TR6ILznGh2z1OZ+6V0hTpyZfgdOC3w6f3bWf3ePZn5RGKhUDCP/eMSDtLXRVsCRDMKHkePKYwWcN48wI7uhdWC2O1kQkDjTAmykpMi4yE2DzVuJMUxHVIZhBfO09L6N/U+HZ0AbElhkyrvneX97Tru0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=AG8uE/iP; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="AG8uE/iP" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-424720e73e1so56888025e9.1 for ; Wed, 26 Jun 2024 12:43:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719430992; x=1720035792; darn=vger.kernel.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=AG8uE/iPAn59Mx6J5sisOyyGnGJtDzYyrcDMuaCfzw2Cbouv+SY1+r7HU66fB53dG6 XZXn6w9Iwt9fYkeHM+p5DA8xLvPUhlRSUS+N2OmDMa5V4uukQLzBRmq9kVo7kE6vgUeL peenJT2gQYjmjcKEtW5qsJ3N8APvF4nnPwvuxA/aKqYnxQt0uTch+P+hJhqjeMD0ofY/ mmfomjswZ6rPVAm9Q7HNStS8NgplY9sJ8S2CpiaIw++lir6TdmGByyp1JES9wG7PeyEW dV9C2fTGyDnxhrncEB2IWhf3wnb8bfM12DocWea5RUBLZHHJIKtErK6VDOPhxfe7hzvR oidA== 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=xKszBffUyLJIn1cLeKGL5xlblvUntUga8rB7Ke5RrRfZMlyPOam4CdReofH4V90/4O cHZ8OxIf5PAlkk2BgiBlanE3s8fnhsIdWb/nFaPVpszjqeJ2Wf/zy5H8uiTIGpbtnSxz LqLZl+eLevW3bwF4RCKWGt/FtK6V+2MGd8bB2KFAnXUTh70hUd07LjivJ6YZy2GNqiOW tdHACigsTQeKAqfh4+f04yku+5Hfe5LZcznG+0dpSB3bzWh4D8PPjUr1Cf2HeIVYyfTK 2x7HTXqyRK5ZGwRoZoQR+mEy4w7bmnL8IE3WHfgsuT8R/WHkqARMFei2f4ECJrccX/yU o3ww== X-Forwarded-Encrypted: i=1; AJvYcCUeOEIw6oIJilrTs5RPCjKBc4naLWwzscO67ysykz9UJqwgC7wG1e/TopsQ3t9vtv12dPgk8VRb2ZCOr5AG/JnJXDbHmsmbJdbFvCCBpVB/M3I= X-Gm-Message-State: AOJu0YxOvfnuzR+Xt4ipG5DWrVN+mIz8nNqEKHTY1FMsazNN+jM0qX0M zxD79cED38A4+1m0Hb4puMQDTtDKEyBTOYbhp4Dk0JA6ZIY2TaaM9+S6lY2sWss= 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> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 13713326 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (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 5D55E193061 for ; Wed, 26 Jun 2024 19:43:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719430998; cv=none; b=Yl0G8eshW0bnXtZ0RkFwi6glDfQ8W7zwtHElZK/Q/ZvC0VpeMCFYdVdxCBYEgy3Lev6ZrDgyono93VEhQgSvfQNtAGtJM0T61uspg83wva32MXCpxxbBpaBrVJN7qg7+bQ/ftbmbkQldPbSDnB5dWc6qTiSt93VQtEGh5emGiHM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719430998; c=relaxed/simple; bh=APPE5dKRkNonvKUqWSiryKOGNpOJlvFzK+dcKt1+dBo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Mbp9ZBwiqOVEUgjPRO6wK53+IjA7mBKhoDbts9k2+TG8w9y7FMbx5AZY3QDxEBEYiQgsuH5As9qZSF9oVUlMHg+gCSVUOrqjvWSgKvX2XXaoGrppll8JPfHNGtIpUgxAHs4DfR8j8aLVggPZi9FV8Htln9TOqB/Q5BPryqXXxtE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=tM7Ucryg; arc=none smtp.client-ip=209.85.167.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="tM7Ucryg" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-5295e488248so8403299e87.2 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=vger.kernel.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=tM7UcrygseR6YravsEJUDH6ROi9tj8d/3rgQKffuTpXjVYjiwDxNlGLGNWH4jkbxhT p9EfsQQ35gyfBPEGanIrQsfWa8dPpTdAzlRwz6T35Vr8LHutFNZb5Q6CiKcLO7lMeT2I G9SujYGsc84gRZkpdqDq0upsGcPgPAeWqOLf0h+PA87yM2tyYaqCKqm8RdcR6KXGgqSg /nhjPdjrhx0e/c+fdwaHZ7NgXzmHtOqCchsG1vfNTD6umpK+yOPWlZEyTHoKCVJTIRyS zNOBsv3iDJAFkqFxIB4GSof86/ueTxKYEXmNEc0h94TqkK1WK4HU6X8i7M+44pLzslW0 l2Gw== 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=HNt7GGrdNKfCFUIivXX3MR+ZlPHuxw/YeY6IoTDQiyn2JjAnfIkU/7WnFwkv2gBfEv s4HFJsnE0bQywIGahnBkCzArYOpdhY0kVgp1oEvKMqql4AJHVVNokXuuyrQJ1z97GY/S b6mPSYqAYzWT9WSEVBXRFjvTuCENKz4zeUT0FZ71qBqsRXISnfqo0zQbTWCgRyXPxsFQ 4yUQVKZQNh4uXZHjeHsCPtW6Ztnegr9NyslEaN/KLypPkT3ocgotKyp97/EVMuRiVcGE oa26dWzmXUyVTniUrdwnJiSG3PSg1nkm7wSxQ2dmezJaq57+ZwbTNir3cu09SzDP7RIs Tgjw== X-Forwarded-Encrypted: i=1; AJvYcCUtqIMn0qL+0N58NKfE9i1CneLndL5bdv1TG/Hn1V3u0VYjsUIym8cRJHmCceYkoMaZcZAcwCP6DvzUjFKyLFVF5lXppcjKdUuezOFmmiFFAvA= X-Gm-Message-State: AOJu0YzzKNp9dIueRjQFruQNHwevKkzIgeCy8cHXYMvPOkaUqCcYvkHB 6LMIzEnLumbB/xM3bwkDZ7kajiCglGlUcx+gWGYbZim3yjhnOdQRZlLU6oXaK/k= 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> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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,