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: 13716712 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 C43FA84A4A for ; Fri, 28 Jun 2024 22:35:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719614115; cv=none; b=t6Hsnno6qwHGgD9c6Oze96aivBrNQf8RBVSQR7F60waIN24F7dKGkDIxmm+132QbcE6bp3+q6uQFhhj28GrcQSh4Nyj3OOJd8WcxJmk0va/JikYHkaiE25TWyQAXJkpi25NoM0GveZXhOFuS+rV6Q6r0RdApEgt+xNUCJXbb8VU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719614115; c=relaxed/simple; bh=KrvJFYN8v4/xFwPigPfwPOs0JB7ddf5NqDv1x7gWjlY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MieFyobv7o8NNCCbmwOQwTgQa7aLq6uORJfDp5/3zjuFLr4ZZ3FjMfoDxpMMVY5NeOlGv12u7z6LJJVoBPlY8O88nP/qpqimTM6cW7UIvG4qxkr/lXOJEeCtUu059/nBJjbgBwOqqP3DRkOz1OEtiiuZtLLyGrZsKD1NRJow4fs= 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=mu9hOjdc; arc=none smtp.client-ip=209.85.128.50 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="mu9hOjdc" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4255fc43f1cso7827215e9.0 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=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=A+35USzVPil6wRdDqJfS7dElyhUMtDCnmyu7VzjnW14=; b=mu9hOjdcOFuwenrHEr8hGVnVdck5Hnx74RLzInaQigVXLojCv1NqWh2nxdnHN3HzVs 8qu2g1xqqD0os4qMocE1BuBRf4SWPKxUKpz38MJe6TWXVHPUmj7LAy6NekOAkVyiEzNa 6F9CnfwBobyNbC6ySrYZd4PNmYMJDpeOol9yScJ9nDqUDEVa32WTXWRs+gAWvglFUWaY HgJPw9zyYg/2o99rcOdHhu5p8F2Vxu1AGn4iOh19qWZMco21LL6v7xzJcSL+G6JUfY4z BAZ+4KUpKfKCWINXMfXhn73PZh82LRTjHiiwYBLSHwEELSMDOW49RIpXLs6Eg6IZxrpB GrkA== 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=v53+Tel57mh4UQY1Bgot8+EJcpcFugmJUs6Y8HPPqpJTJaPgdGYhct9qLXyzG8HMu3 Z4p/b0G7Jgkpt4R0yUih/4GtyZAWwEx4q0XucU5NffPoh9MdoUsYT6uqT3eArOxjHljB tihn5kmbfySrBPoJWGXECgi/RIPzYtwp9g+S+6WIESdeeQlAXGqTfRp7a/ve085v8edg jIP1CclHT40jSYKRNJ/+MPNAJAqCh9bhzGRlytu7d9nfnk0U6TRY1exfFK0sNLwG9BkU /2dT6b00IjySEf6ZmwB376GALIjBALKU6Ae04oVQG/iYOao892xgeB4Et3EPrAGqFuUe Bgng== X-Forwarded-Encrypted: i=1; AJvYcCVuIwrzYwrmgg9OYofNkSvFim5Tvu8WaKywy+upG+WzLlK7PiG/4EGUXZnSKI0LG8xLxIZHHl3lJIXhsQX5w/pJkr3t1ydfrxueWrFtPchF8h8= X-Gm-Message-State: AOJu0YznwCS2zx9YQ9DEO3D7K+zAjtfPXcBiAjiyoaJlrDaothrUpDUJ 3g9KJtOzka35LcPdNSlG2CH15CrSCXaZJOEOX9gtOgrzJW/6diC1cLw/NzMiFQA= 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> 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. 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: 13716713 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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 3776D12F392 for ; Fri, 28 Jun 2024 22:35:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719614116; cv=none; b=qZFuirDPUdxEU4r7I19av9TvYLZjS+PpmEQiWD/TdL1IfufNFRBWpoV1oSuUeKlXO5H0z0hubTeLRU/rNq54i/diofaGA7jXVBF4q9GLK/JlG6XzV8ig3/Pl+uZa+kergmwyVWEfwG2VgRAsg4R0KUTWt8Msj44XIh3QJo1IruE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719614116; c=relaxed/simple; bh=TP4zX82sz2PZVjrl2jE5lJBopK2VfJohRegfp+vWgXA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AKXbhfTHSobx6l5f4wn1qRygfLWB9t2i+GMx6e9VcWP8NCQYXRizgNuqUrcHSV2Ih44yfN0JTSAKnS4OyPblK9AP0pSJaMEcIuZFsr0pJ85DmAVKjJ0wdqwkHw6orqaG5z2QWfC2cx0VXLuTWW9Qjzj2Vj5XUxv0HSpA9bjqnHk= 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=wKsBpnhb; arc=none smtp.client-ip=209.85.221.48 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="wKsBpnhb" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-365663f51adso709446f8f.1 for ; Fri, 28 Jun 2024 15:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719614114; x=1720218914; 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=AWg6K4lF7Ia2UQmGAEMoRHt0caBd3GiOuDYrWDdJIgc=; b=wKsBpnhbQvyO9dAHCC7p1t4ACzVlQCMOnVu5/VRVomy2/p0xRt4qexaejwh29KghC1 3ffBT5CpUyZArSEOtzpHY2hTEHkKUNJUlWoZT3xE4Jqoq/iKkVtFmAZbxBImPrXeXh5N R2zWXYwMvFuGSZ7lSjmWmoF4jvMj24M9a8CRSPoZReoU+RzhSbN0uKje/sbgb8uq7/8D JJLTt9extG3WwbyMMNxRrT+iD3GjjXZy3iICrb1/tpHtm5cZ93YsDxtQLjCfAVOu5KFz 3UCwuMOu2QGU56Q6Zefh8hgZqSIhhOGTNSPYVxJX1Y9EJo1aBLQmprVRawJQ0FpDexSU cDxg== 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=n+xOkUFaLqD7sDjHR83ccM6NfaCdvdC3q97i1bBIYawIQhjzQQSyu6HSq2dzj91v7s ed74Ld1C9pvyE1F9CVW537whbMBRSiFaNqELQ+bRBMrZFvvWOELsbBc45i50zfZa+D65 dVnb/iW5/Zg4HVsf2j4dHu1D0jo9PTU0obSPHPwyupuD7pygA9hklhjmu7YUTHORiMsL RSqR6nIwYBePrOufVx48mSNjeRluQJmPq7DOn71qgaBtkYNHKrFwHLlYtdGTMFsw3B1l NpdGfMELAwJxEbN18X9iK1bObQt0NwiSuJQwHMR5TthJW44DpJlo5whIFbCTtggTrSIj IBlQ== X-Forwarded-Encrypted: i=1; AJvYcCXt1TiypoKjdBTbJ/F5OgL50wAEwPQOZYYCRKakQZruI/8LSny2lWWVB0IY35XXvjlf8WArEXdaEfNjfXUDWPXwq/nbfISSx+G731nw/zrz0CU= X-Gm-Message-State: AOJu0YzvoWft94bH40MdqxyW3Xf76P4U80oxFjV/Ue2ZhSt1W3fKQxNW UM8mkwmL2adIMadBBXS52bDkvp3ly1LE9tM5syio5WYgzT95AbmK4hsFdFlHL4w= 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> 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. 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: 13716714 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 9291B132112 for ; Fri, 28 Jun 2024 22:35:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719614118; cv=none; b=iRhs8SkHkmklS+UUKp4fWupvgsSzReQgbk1PAnJY5Zh44L79D6ig0IE1ckZPw/3cMCcQv5GYsi66tjePa0abT4hUs5q8LFSZXV7QOK/uNyR8/7Hfj8VXHBNRv9L1i70m06k550TATRfcfuiy7BoeFiePiDuFWH483Mty1iegRNE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719614118; c=relaxed/simple; bh=PApABQ8Ns3+kJP3W0ZfRrX0JhAAa8kO4F6PTGhhK+4c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oU4CH6HI/2AJ2dx5pv78qbFMD6F+wuSu8Z5rgKFvk6Q3uU3NQXHTj6YMnyExTc1ZNVC3Xt0iwidNZcyv+J+5o+y+h6ROEWHh8fyFMShwzVlcednJhDaN8X7ayCWV/zXE971pBz/ysQp2M87OEJ09dGL9B2Mpg8gnG+uwyn9qA2Q= 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=uWlWMie0; arc=none smtp.client-ip=209.85.128.46 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="uWlWMie0" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4256eec963eso7592005e9.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=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=bK4GVLftRcx1G43I5RNC1VZ+kMnAGIqU8rAyC3MW8BY=; b=uWlWMie0Yso5DTYVxZMXd7OoxDvA3F0ybBEFiZxJcIX8WI21yAImKn8MasHkGIeE/s GNY9I3BXv1efa+JNp8LP0OMBxqpnQDcRGrc3sy3xAMNFV4KhvMGctdiS+nCiPLzQR6d+ enc/EXBTgahMZ6kECjihgc2i/uEMRGskRvsZLDkbi5qXQcSr1tJ1tIvG+gB+X0rhMQWm kJ0NQgUM8QNMt4wyvFOE3WJq6uEX0ksSBHV94HXMceiMMoFnnwzHOcbaAf5kvI8A1t/w tevENQpqp6EOR0STEc+88dyTf6D5YX6tmcRzqdPdGklrfxmVtpVEXd/aRNwC537KK2c3 nIFw== 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=Xcj4hEfN6+Ao81CTX0qFGljeWD6xJ0aHbEyAQt8SYYeY3hfB6aXhsbKgC7Ruf3OTZu 6yMo0zL3n+gQH5ahNYOj7DQxWO4m8J6UpTPOuIo3dOnx9JHnEcctRzqXkt1fjt8NqXjJ wo/WygCz6vbsu00GqrbkwJEoqvqo7FnyUDzv5K7fl+uvtRcdMEJfzPvqmOe11DUjaOF3 I57okN0o+wFOAA73De8mws5y7J3uW2J5sLGFZ55SQdXmeCkU7DaTkSVWVrKUikOrm0Pt tm3lxifNiDQvjEHMDQlkuD+P3fhtM62pvr0BqnXLlXnl15lCW/JkjlGRN0sZrxzwb54h GXqQ== X-Forwarded-Encrypted: i=1; AJvYcCUaNhYnr5iBQREZ6EHPy+f4PLdKWmAb/RFnYUftsO7dZjYUR86b5hvH9IMXZDOk64HFZ8VmuxW/vsN/3KKh9aBPI5XXyckPW6PrsmTWLFFpUSA= X-Gm-Message-State: AOJu0Yz9ApiVnWgiAv5U23HMMeX99i34lPu7xP/PtXGFIt9ryGSE8kyB mr5RkQcT0wfBUAziQhXAttPkZv5jlQM1bHmwooO7OLj1BZU9DxTrhYXArVssoqU= 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> 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. 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,