From nobody Sat Jun 13 17:32:59 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D8943E3C4B for ; Wed, 6 May 2026 08:35:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778056549; cv=none; b=WOs/bSwqSxA0nnwSX3rK6IQ9coHs27/4C7152s2BFcOUJUzMN6d2cxdg8pdZvScxLsU7gR7UjqZmWgY0o+cpGoeJ2XRJyWt+glEv4P6PTsAKuQVhMgdZy3ytbGTLesgq7lh11nYRDzS7L+DNy1H3hp8hmBQV2wL1rvLVUGeFtME= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778056549; c=relaxed/simple; bh=xukevdXgi6GVwbJNIknM0BoHOMRB7Xpw+fbA9TVmZXw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mUUE1HrzaCfPlvSDzmER1eNzRZXK8Qv3LVJTWq1W7exz9TtiPLmyw64njcXmO8H641haEtmqNvC2KJC4qo2GpxqgQJvqOheHnWMSbHpzajVgutYYwTK5bPHfvkz2pGmnFS3qkZ3MX+ntrFybSxny4pXrlJvgkDM+JY40i9+2ZFI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=MwU9vQQW; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="MwU9vQQW" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 67EC81A3551; Wed, 6 May 2026 08:35:40 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 3CD2E6053C; Wed, 6 May 2026 08:35:40 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id F1F0C102F1D27; Wed, 6 May 2026 10:35:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1778056539; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=EoSUrC855M/XF5ZpUwRLFgoMp2B5bjW75xWj0tol++g=; b=MwU9vQQWU6Xufu1F6BoMJowxzaDxxd11XdWG09MO9j8fscPH0FfppD+wwA2EpZ+bh4Cjl+ pfwnbDWhIGRS1yOm2uJ3Svk2WK+dNjh83BPQWARNFyYtTpthlqfPZmESFdpYhUkj3PRklx 86bJLD4p7thUw0J4MGgL3X95Uza5Xn7dUcbw2vB1+Z5Bjx1hp7hGBqw0rLSUuXoN/CJ3iv V8Aa2XYakEOGZT9fxVO9t8z+nS4E8KsM6TIG3bJ1WYIEw8KJM4Y8Zvoxm9XFe8CdHlHG25 Bl3b6DKbi1veDlxVFNa8WxJuLeFuzEWuTN39AK5z4r45nQOsw2Jg1x2dufrNpg== From: "Thomas Richard (TI)" Date: Wed, 06 May 2026 10:35:25 +0200 Subject: [PATCH v7 1/4] firmware: ti_sci: add BOARDCFG_MANAGED mode support 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: <20260506-ti-sci-jacinto-s2r-restore-irq-v7-1-037098a35215@bootlin.com> References: <20260506-ti-sci-jacinto-s2r-restore-irq-v7-0-037098a35215@bootlin.com> In-Reply-To: <20260506-ti-sci-jacinto-s2r-restore-irq-v7-0-037098a35215@bootlin.com> To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Michael Turquette , Stephen Boyd Cc: Gregory CLEMENT , richard.genoud@bootlin.com, Udit Kumar , Abhash Kumar , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, "Thomas Richard (TI)" , Dhruva Gole , Kendall Willis X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 In BOARDCFG_MANAGED mode, the low power mode configuration is done statically for the DM via the boardcfg. Constraints are not supported, and prepare_sleep() is not needed. Reviewed-by: Dhruva Gole Reviewed-by: Kendall Willis Signed-off-by: Thomas Richard (TI) --- drivers/firmware/ti_sci.c | 10 +++++++--- drivers/firmware/ti_sci.h | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index dd9911b1cc11..eaeaaae94142 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -3772,8 +3772,11 @@ static int ti_sci_prepare_system_suspend(struct ti_s= ci_info *info) return ti_sci_cmd_prepare_sleep(&info->handle, TISCI_MSG_VALUE_SLEEP_MODE_DM_MANAGED, 0, 0, 0); + } else if (info->fw_caps & MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED) { + /* Nothing to do in the BOARDCFG_MANAGED mode */ + return 0; } else { - /* DM Managed is not supported by the firmware. */ + /* DM Managed and BoardCfg Managed are not supported by the firmware. */ dev_err(info->dev, "Suspend to memory is not supported by the firmware\= n"); return -EOPNOTSUPP; } @@ -4011,12 +4014,13 @@ static int ti_sci_probe(struct platform_device *pde= v) } =20 ti_sci_msg_cmd_query_fw_caps(&info->handle, &info->fw_caps); - dev_dbg(dev, "Detected firmware capabilities: %s%s%s%s%s\n", + dev_dbg(dev, "Detected firmware capabilities: %s%s%s%s%s%s\n", info->fw_caps & MSG_FLAG_CAPS_GENERIC ? "Generic" : "", info->fw_caps & MSG_FLAG_CAPS_LPM_PARTIAL_IO ? " Partial-IO" : "", info->fw_caps & MSG_FLAG_CAPS_LPM_DM_MANAGED ? " DM-Managed" : "", info->fw_caps & MSG_FLAG_CAPS_LPM_ABORT ? " LPM-Abort" : "", - info->fw_caps & MSG_FLAG_CAPS_IO_ISOLATION ? " IO-Isolation" : "" + info->fw_caps & MSG_FLAG_CAPS_IO_ISOLATION ? " IO-Isolation" : "", + info->fw_caps & MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED ? " BoardConfig-Manag= ed" : "" ); =20 ti_sci_setup_ops(info); diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h index 4616127e33ff..d90de59e29eb 100644 --- a/drivers/firmware/ti_sci.h +++ b/drivers/firmware/ti_sci.h @@ -150,6 +150,7 @@ struct ti_sci_msg_req_reboot { * MSG_FLAG_CAPS_LPM_DM_MANAGED: LPM can be managed by DM * MSG_FLAG_CAPS_LPM_ABORT: Abort entry to LPM * MSG_FLAG_CAPS_IO_ISOLATION: IO Isolation support + * MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED: LPM config done statically for the= DM via boardcfg * * Response to a generic message with message type TI_SCI_MSG_QUERY_FW_CAPS * providing currently available SOC/firmware capabilities. SoC that don't @@ -162,6 +163,7 @@ struct ti_sci_msg_resp_query_fw_caps { #define MSG_FLAG_CAPS_LPM_DM_MANAGED TI_SCI_MSG_FLAG(5) #define MSG_FLAG_CAPS_LPM_ABORT TI_SCI_MSG_FLAG(9) #define MSG_FLAG_CAPS_IO_ISOLATION TI_SCI_MSG_FLAG(7) +#define MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED TI_SCI_MSG_FLAG(12) #define MSG_MASK_CAPS_LPM GENMASK_ULL(4, 1) u64 fw_caps; } __packed; --=20 2.53.0 From nobody Sat Jun 13 17:32:59 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 93BFA3D0907; Wed, 6 May 2026 08:35:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778056545; cv=none; b=eO3vc9HqjTHBtXl8YdB++asBgV9NXVeBY+IKU5cS4mHEr9xixhUAc9yA7TVZCtZ7X+wen7P4Rw7j+mFPGQwiIClnRGnJHrXwoKezRmTeQJ9Qha6i5Rp6B1OKo9KlASuIrEHLK1k/xUhN/UXleXuiuDhUx+8tAXiGjWcVsz+Z8W8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778056545; c=relaxed/simple; bh=fsnfM2JPUg9aNS9DyJxfLMvm4xTB2ISCe/ezSAGtZl8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GK6r4ctJOmxuTduolUh2fzf1oJ0tpi5b8XH3dK2f/dXGHDrPrIuG34YIYgGmdOPgeGdWOAxLQX1eqUy7xcWu5ij8paGCYgJbYPkM8ymbPVFlqAIjYGxTfjjfbrFoHvqTlspzryHg+ScdN8TlVPtslTv7eKjrILJGqfS9WZWnOrE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=ctCa/Rqx; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="ctCa/Rqx" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 8EF80C5DC46; Wed, 6 May 2026 08:36:29 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 6030E6053C; Wed, 6 May 2026 08:35:42 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 9FE30102F2230; Wed, 6 May 2026 10:35:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1778056541; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=E2WE2FcRP/+08k99BObQNj1dBzL60749QOmanc9utXE=; b=ctCa/RqxxQGEhWPHahPVrU0XgLbTCuosiwMY8lB6HgLyNzrr0unrPPNxYh5m1IV4lCcdQU nDQpXL/Mx3XxpCyc6JDquH5CMZujJbEvCYf7rKcT8TOOD5ZTCqsfkZ/eHbv7QI+Zg91pzY s0Ua8hMtbf8/VxYLNnrVgTTnlYn50jaWdcxwQoYi8BBXcl8l93i56YtSnE0U396PC3EmVh eFctCiX3/8ea4NqR+bWJqClgo02hR97H4FluYggcY8nQC0Ji76Agz5LQ2hKbYHtBlxHRq1 Pj8DVGHWgfz83pruFlAasakSiJZs6y4FHHJo3bgF81PIDAVtiIPuv2cYAzAjUw== From: "Thomas Richard (TI)" Date: Wed, 06 May 2026 10:35:26 +0200 Subject: [PATCH v7 2/4] firmware: ti_sci: add support for restoring IRQs during resume 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: <20260506-ti-sci-jacinto-s2r-restore-irq-v7-2-037098a35215@bootlin.com> References: <20260506-ti-sci-jacinto-s2r-restore-irq-v7-0-037098a35215@bootlin.com> In-Reply-To: <20260506-ti-sci-jacinto-s2r-restore-irq-v7-0-037098a35215@bootlin.com> To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Michael Turquette , Stephen Boyd Cc: Gregory CLEMENT , richard.genoud@bootlin.com, Udit Kumar , Abhash Kumar , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, "Thomas Richard (TI)" , Dhruva Gole , Kendall Willis X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 Some DM-Firmware are not able to restore the IRQ context after a suspend-resume. The IRQ_CONTEXT_LOST firmware capability has been introduced to identify this characteristic. In this case the responsibility is delegated to the ti_sci driver, which maintains an internal list of all requested IRQs. This list is updated on each set()/free() operation, and all IRQs are restored during the resume_noirq() phase. Reviewed-by: Dhruva Gole Reviewed-by: Kendall Willis Signed-off-by: Thomas Richard (TI) --- drivers/firmware/ti_sci.c | 201 ++++++++++++++++++++++++++++++++++++++++++= +--- drivers/firmware/ti_sci.h | 2 + 2 files changed, 191 insertions(+), 12 deletions(-) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index eaeaaae94142..531ac3aa38b8 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -12,11 +12,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -87,6 +89,16 @@ struct ti_sci_desc { int max_msg_size; }; =20 +/** + * struct ti_sci_irq - Description of allocated irqs + * @node: Link to hash table + * @desc: Description of the irq + */ +struct ti_sci_irq { + struct hlist_node node; + struct ti_sci_msg_req_manage_irq desc; +}; + /** * struct ti_sci_info - Structure representing a TI SCI instance * @dev: Device pointer @@ -101,6 +113,8 @@ struct ti_sci_desc { * @chan_rx: Receive mailbox channel * @minfo: Message info * @node: list head + * @irqs: List of allocated irqs + * @irq_lock: Protection for irq hash list * @host_id: Host ID * @fw_caps: FW/SoC low power capabilities * @users: Number of users of this instance @@ -118,6 +132,8 @@ struct ti_sci_info { struct mbox_chan *chan_rx; struct ti_sci_xfers_info minfo; struct list_head node; + DECLARE_HASHTABLE(irqs, 8); + struct mutex irq_lock; u8 host_id; u64 fw_caps; /* protected by ti_sci_list_mutex */ @@ -2301,6 +2317,32 @@ static int ti_sci_manage_irq(const struct ti_sci_han= dle *handle, return ret; } =20 +/** + * ti_sci_irq_hash() - Helper API to compute irq hash for the hash table. + * @irq: irq to hash + * + * Return: the computed hash value. + */ +static int ti_sci_irq_hash(struct ti_sci_msg_req_manage_irq *irq) +{ + return irq->src_id ^ irq->src_index; +} + +/** + * ti_sci_irq_equal() - Helper API to compare two irqs (generic headers ar= e not + * compared) + * @irq_a: irq_a to compare + * @irq_b: irq_b to compare + * + * Return: true if the two irqs are equal, else false. + */ +static bool ti_sci_irq_equal(struct ti_sci_msg_req_manage_irq *irq_a, + struct ti_sci_msg_req_manage_irq *irq_b) +{ + return !memcmp(&irq_a->valid_params, &irq_b->valid_params, + sizeof(*irq_a) - sizeof(irq_a->hdr)); +} + /** * ti_sci_set_irq() - Helper api to configure the irq route between the * requested source and destination @@ -2324,15 +2366,60 @@ static int ti_sci_set_irq(const struct ti_sci_handl= e *handle, u32 valid_params, u16 dst_host_irq, u16 ia_id, u16 vint, u16 global_event, u8 vint_status_bit, u8 s_host) { + struct ti_sci_info *info =3D handle_to_ti_sci_info(handle); + struct ti_sci_msg_req_manage_irq *desc; + struct ti_sci_irq *irq; + int ret; + + /* + * Lock for set_irq() and free_irq() to keep the IRQ hash list + * consistent only if MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST is set. Else + * IRQ hash list is not used. + */ + if (info->fw_caps & MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST) + mutex_lock(&info->irq_lock); + pr_debug("%s: IRQ set with valid_params =3D 0x%x from src =3D %d, index = =3D %d, to dst =3D %d, irq =3D %d,via ia_id =3D %d, vint =3D %d, global eve= nt =3D %d,status_bit =3D %d\n", __func__, valid_params, src_id, src_index, dst_id, dst_host_irq, ia_id, vint, global_event, vint_status_bit); =20 - return ti_sci_manage_irq(handle, valid_params, src_id, src_index, - dst_id, dst_host_irq, ia_id, vint, - global_event, vint_status_bit, s_host, - TI_SCI_MSG_SET_IRQ); + ret =3D ti_sci_manage_irq(handle, valid_params, src_id, src_index, + dst_id, dst_host_irq, ia_id, vint, + global_event, vint_status_bit, s_host, + TI_SCI_MSG_SET_IRQ); + + if (ret || !(info->fw_caps & MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST)) + goto end; + + irq =3D kzalloc_obj(*irq, GFP_KERNEL); + if (!irq) { + ti_sci_manage_irq(handle, valid_params, src_id, src_index, + dst_id, dst_host_irq, ia_id, vint, + global_event, vint_status_bit, s_host, + TI_SCI_MSG_FREE_IRQ); + ret =3D -ENOMEM; + goto end; + } + + desc =3D &irq->desc; + desc->valid_params =3D valid_params; + desc->src_id =3D src_id; + desc->src_index =3D src_index; + desc->dst_id =3D dst_id; + desc->dst_host_irq =3D dst_host_irq; + desc->ia_id =3D ia_id; + desc->vint =3D vint; + desc->global_event =3D global_event; + desc->vint_status_bit =3D vint_status_bit; + desc->secondary_host =3D s_host; + + hash_add(info->irqs, &irq->node, ti_sci_irq_hash(desc)); + +end: + if (info->fw_caps & MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST) + mutex_unlock(&info->irq_lock); + return ret; } =20 /** @@ -2358,15 +2445,56 @@ static int ti_sci_free_irq(const struct ti_sci_hand= le *handle, u32 valid_params, u16 dst_host_irq, u16 ia_id, u16 vint, u16 global_event, u8 vint_status_bit, u8 s_host) { + struct ti_sci_info *info =3D handle_to_ti_sci_info(handle); + struct ti_sci_msg_req_manage_irq irq_desc; + struct device *dev =3D info->dev; + struct ti_sci_irq *this_irq; + struct hlist_node *tmp_node; + int ret; + + if (info->fw_caps & MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST) + mutex_lock(&info->irq_lock); + pr_debug("%s: IRQ release with valid_params =3D 0x%x from src =3D %d, ind= ex =3D %d, to dst =3D %d, irq =3D %d,via ia_id =3D %d, vint =3D %d, global = event =3D %d,status_bit =3D %d\n", __func__, valid_params, src_id, src_index, dst_id, dst_host_irq, ia_id, vint, global_event, vint_status_bit); =20 - return ti_sci_manage_irq(handle, valid_params, src_id, src_index, - dst_id, dst_host_irq, ia_id, vint, - global_event, vint_status_bit, s_host, - TI_SCI_MSG_FREE_IRQ); + ret =3D ti_sci_manage_irq(handle, valid_params, src_id, src_index, + dst_id, dst_host_irq, ia_id, vint, + global_event, vint_status_bit, s_host, + TI_SCI_MSG_FREE_IRQ); + + if (ret || !(info->fw_caps & MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST)) + goto end; + + irq_desc.valid_params =3D valid_params; + irq_desc.src_id =3D src_id; + irq_desc.src_index =3D src_index; + irq_desc.dst_id =3D dst_id; + irq_desc.dst_host_irq =3D dst_host_irq; + irq_desc.ia_id =3D ia_id; + irq_desc.vint =3D vint; + irq_desc.global_event =3D global_event; + irq_desc.vint_status_bit =3D vint_status_bit; + irq_desc.secondary_host =3D s_host; + + hash_for_each_possible_safe(info->irqs, this_irq, tmp_node, node, + ti_sci_irq_hash(&irq_desc)) { + if (ti_sci_irq_equal(&irq_desc, &this_irq->desc)) { + hlist_del(&this_irq->node); + kfree(this_irq); + goto end; + } + } + + dev_warn(dev, "%s: should not be here, IRQ was not found in hash list\n", + __func__); + +end: + if (info->fw_caps & MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST) + mutex_unlock(&info->irq_lock); + return ret; } =20 /** @@ -3847,7 +3975,10 @@ static int ti_sci_suspend_noirq(struct device *dev) static int ti_sci_resume_noirq(struct device *dev) { struct ti_sci_info *info =3D dev_get_drvdata(dev); - int ret =3D 0; + struct ti_sci_msg_req_manage_irq *irq_desc; + struct ti_sci_irq *irq; + struct hlist_node *tmp_node; + int ret =3D 0, err =3D 0, i; u32 source; u64 time; u8 pin; @@ -3859,13 +3990,50 @@ static int ti_sci_resume_noirq(struct device *dev) return ret; } =20 + switch (pm_suspend_target_state) { + case PM_SUSPEND_MEM: + if (info->fw_caps & MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST) { + hash_for_each_safe(info->irqs, i, tmp_node, irq, node) { + irq_desc =3D &irq->desc; + ret =3D ti_sci_manage_irq(&info->handle, + irq_desc->valid_params, + irq_desc->src_id, + irq_desc->src_index, + irq_desc->dst_id, + irq_desc->dst_host_irq, + irq_desc->ia_id, + irq_desc->vint, + irq_desc->global_event, + irq_desc->vint_status_bit, + irq_desc->secondary_host, + TI_SCI_MSG_SET_IRQ); + if (ret) { + dev_err(dev, "failed to restore IRQ with valid_params =3D 0x%x from s= rc =3D %d, index =3D %d, to dst =3D %d, irq =3D %d,via ia_id =3D %d, vint = =3D %d, global event =3D %d,status_bit =3D %d\n", + irq_desc->valid_params, + irq_desc->src_id, + irq_desc->src_index, + irq_desc->dst_id, + irq_desc->dst_host_irq, + irq_desc->ia_id, + irq_desc->vint, + irq_desc->global_event, + irq_desc->vint_status_bit); + err =3D ret; + } + } + } + break; + default: + break; + } + ret =3D ti_sci_msg_cmd_lpm_wake_reason(&info->handle, &source, &time, &pi= n, &mode); /* Do not fail to resume on error as the wake reason is not critical */ if (!ret) dev_info(dev, "ti_sci: wakeup source:0x%x, pin:0x%x, mode:0x%x\n", source, pin, mode); =20 - return 0; + return err; } =20 static void ti_sci_pm_complete(struct device *dev) @@ -4014,13 +4182,14 @@ static int ti_sci_probe(struct platform_device *pde= v) } =20 ti_sci_msg_cmd_query_fw_caps(&info->handle, &info->fw_caps); - dev_dbg(dev, "Detected firmware capabilities: %s%s%s%s%s%s\n", + dev_dbg(dev, "Detected firmware capabilities: %s%s%s%s%s%s%s\n", info->fw_caps & MSG_FLAG_CAPS_GENERIC ? "Generic" : "", info->fw_caps & MSG_FLAG_CAPS_LPM_PARTIAL_IO ? " Partial-IO" : "", info->fw_caps & MSG_FLAG_CAPS_LPM_DM_MANAGED ? " DM-Managed" : "", info->fw_caps & MSG_FLAG_CAPS_LPM_ABORT ? " LPM-Abort" : "", info->fw_caps & MSG_FLAG_CAPS_IO_ISOLATION ? " IO-Isolation" : "", - info->fw_caps & MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED ? " BoardConfig-Manag= ed" : "" + info->fw_caps & MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED ? " BoardConfig-Manag= ed" : "", + info->fw_caps & MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST ? " IRQ-Context-Lost"= : "" ); =20 ti_sci_setup_ops(info); @@ -4053,6 +4222,14 @@ static int ti_sci_probe(struct platform_device *pdev) list_add_tail(&info->node, &ti_sci_list); mutex_unlock(&ti_sci_list_mutex); =20 + if (info->fw_caps & MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST) { + ret =3D devm_mutex_init(dev, &info->irq_lock); + if (ret) + return ret; + + hash_init(info->irqs); + } + ret =3D of_platform_populate(dev->of_node, NULL, NULL, dev); if (ret) { dev_err(dev, "platform_populate failed %pe\n", ERR_PTR(ret)); diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h index d90de59e29eb..67f16e8c69a1 100644 --- a/drivers/firmware/ti_sci.h +++ b/drivers/firmware/ti_sci.h @@ -151,6 +151,7 @@ struct ti_sci_msg_req_reboot { * MSG_FLAG_CAPS_LPM_ABORT: Abort entry to LPM * MSG_FLAG_CAPS_IO_ISOLATION: IO Isolation support * MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED: LPM config done statically for the= DM via boardcfg + * MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST: DM is not able to restore IRQ cont= ext * * Response to a generic message with message type TI_SCI_MSG_QUERY_FW_CAPS * providing currently available SOC/firmware capabilities. SoC that don't @@ -164,6 +165,7 @@ struct ti_sci_msg_resp_query_fw_caps { #define MSG_FLAG_CAPS_LPM_ABORT TI_SCI_MSG_FLAG(9) #define MSG_FLAG_CAPS_IO_ISOLATION TI_SCI_MSG_FLAG(7) #define MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED TI_SCI_MSG_FLAG(12) +#define MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST TI_SCI_MSG_FLAG(14) #define MSG_MASK_CAPS_LPM GENMASK_ULL(4, 1) u64 fw_caps; } __packed; --=20 2.53.0 From nobody Sat Jun 13 17:32:59 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AF663B8D75 for ; Wed, 6 May 2026 08:35:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778056549; cv=none; b=mDeGoyBxJdrs1pPDOBphH48F0crmxkMTn3ZO3pu8crzk8njbspzfUtLSF5tchcP1r4N/kN3B7J9mr7AFp1yOmpLjaV4cL8XYZvpmV9UcYnb00RcK10rF7HyLIwT9mXaiAcrrD7N9xapA42lzYvlY3yxH+KFYwjSjtxYYgKpDPAY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778056549; c=relaxed/simple; bh=75OabSMy9rm4fz+3RACQ1LcvfhejM0h73O8+xfVf9LA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QNzamV/D8c+TBBFexuHAU6wuz5Cp02t4moQk7WgtJQq0Epbb1Vqr1c8YyB3KSsjxZt8cEgWweDAqL0YKugkQx7LScH1XRjLER/8jK5cLpNaQ+cCTZm8UMzFT1BSpaji/dH2ndGXtGmhM8QsSyT53iNCVVhOxOC46vRMwivbBWl4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=kdXac2v8; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="kdXac2v8" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id D91BD4E42C12; Wed, 6 May 2026 08:35:45 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id AEFEF6053C; Wed, 6 May 2026 08:35:45 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C1B2F102F241F; Wed, 6 May 2026 10:35:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1778056544; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=EwRPiIEo/L1VPqk9XuGNzrdJYTYEE9HEJYJMUXG5Nd4=; b=kdXac2v80Rkpf7qJxne+F42hWBxJLoPuRyp2+rB13o1Kr/r8Wbb22WTTWe2y+TyMKHuET7 zwBdqKGCJmyBD1uqv2xkpZrfRST+CaLywCTjzeSDmLf9jFL9S1RNloLoRpdvv0cLAyEv2r sg3jTv97BKgqYzDeDOcIr+Y/NWwzyQDazJLLXJnZYMffAp/K7mM0nvt5O83wu0Vjfsk2+2 9W2BYxXzbriLcGihS8Mdv9VbcTWZHINBc90SwH08ATjDVpEJwywvh25bx9g2iEmEZTQyys vOfCctwhKHRIxLZVYcyzpXpUDxXCmdspog0QWoM8fg7wL2fr3tHSOTknc8iwPA== From: "Thomas Richard (TI)" Date: Wed, 06 May 2026 10:35:27 +0200 Subject: [PATCH v7 3/4] clk: keystone: sci-clk: add restore_context() operation 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: <20260506-ti-sci-jacinto-s2r-restore-irq-v7-3-037098a35215@bootlin.com> References: <20260506-ti-sci-jacinto-s2r-restore-irq-v7-0-037098a35215@bootlin.com> In-Reply-To: <20260506-ti-sci-jacinto-s2r-restore-irq-v7-0-037098a35215@bootlin.com> To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Michael Turquette , Stephen Boyd Cc: Gregory CLEMENT , richard.genoud@bootlin.com, Udit Kumar , Abhash Kumar , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, "Thomas Richard (TI)" , Dhruva Gole , Kendall Willis , Brian Masney X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 Implement the restore_context() operation to restore the clock rate and the clock parent state. The clock rate is saved in sci_clk struct during set_rate() and recalc_rate() operations. The parent index is saved in sci_clk struct during set_parent() operation. During clock registration, the core retrieves each clock=E2=80=99s parent using get_parent() operation= to ensure the internal clock tree reflects the actual hardware state, including any configurations made by the bootloader. So we also save the parent index in get_parent(). Reviewed-by: Dhruva Gole Reviewed-by: Kendall Willis Acked-by: Stephen Boyd Reviewed-by: Brian Masney Signed-off-by: Thomas Richard (TI) --- drivers/clk/keystone/sci-clk.c | 45 ++++++++++++++++++++++++++++++++++----= ---- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/drivers/clk/keystone/sci-clk.c b/drivers/clk/keystone/sci-clk.c index 9d5071223f4c..7c0f7b3e89e0 100644 --- a/drivers/clk/keystone/sci-clk.c +++ b/drivers/clk/keystone/sci-clk.c @@ -47,6 +47,8 @@ struct sci_clk_provider { * @node: Link for handling clocks probed via DT * @cached_req: Cached requested freq for determine rate calls * @cached_res: Cached result freq for determine rate calls + * @parent_id: Parent index for this clock + * @rate: Clock rate */ struct sci_clk { struct clk_hw hw; @@ -58,6 +60,8 @@ struct sci_clk { struct list_head node; unsigned long cached_req; unsigned long cached_res; + int parent_id; + unsigned long rate; }; =20 #define to_sci_clk(_hw) container_of(_hw, struct sci_clk, hw) @@ -150,6 +154,8 @@ static unsigned long sci_clk_recalc_rate(struct clk_hw = *hw, return 0; } =20 + clk->rate =3D freq; + return freq; } =20 @@ -210,10 +216,15 @@ static int sci_clk_set_rate(struct clk_hw *hw, unsign= ed long rate, unsigned long parent_rate) { struct sci_clk *clk =3D to_sci_clk(hw); + int ret; =20 - return clk->provider->ops->set_freq(clk->provider->sci, clk->dev_id, - clk->clk_id, rate / 10 * 9, rate, - rate / 10 * 11); + ret =3D clk->provider->ops->set_freq(clk->provider->sci, clk->dev_id, + clk->clk_id, rate / 10 * 9, rate, + rate / 10 * 11); + if (!ret) + clk->rate =3D rate; + + return ret; } =20 /** @@ -234,12 +245,13 @@ static u8 sci_clk_get_parent(struct clk_hw *hw) dev_err(clk->provider->dev, "get-parent failed for dev=3D%d, clk=3D%d, ret=3D%d\n", clk->dev_id, clk->clk_id, ret); + clk->parent_id =3D ret; return 0; } =20 - parent_id =3D parent_id - clk->clk_id - 1; + clk->parent_id =3D parent_id - clk->clk_id - 1; =20 - return (u8)parent_id; + return (u8)clk->parent_id; } =20 /** @@ -252,12 +264,28 @@ static u8 sci_clk_get_parent(struct clk_hw *hw) static int sci_clk_set_parent(struct clk_hw *hw, u8 index) { struct sci_clk *clk =3D to_sci_clk(hw); + int ret; =20 clk->cached_req =3D 0; =20 - return clk->provider->ops->set_parent(clk->provider->sci, clk->dev_id, - clk->clk_id, - index + 1 + clk->clk_id); + ret =3D clk->provider->ops->set_parent(clk->provider->sci, clk->dev_id, + clk->clk_id, + index + 1 + clk->clk_id); + if (!ret) + clk->parent_id =3D index; + + return ret; +} + +static void sci_clk_restore_context(struct clk_hw *hw) +{ + struct sci_clk *clk =3D to_sci_clk(hw); + + if (clk->num_parents > 1 && clk->parent_id >=3D 0) + sci_clk_set_parent(hw, (u8)clk->parent_id); + + if (clk->rate) + sci_clk_set_rate(hw, clk->rate, 0); } =20 static const struct clk_ops sci_clk_ops =3D { @@ -269,6 +297,7 @@ static const struct clk_ops sci_clk_ops =3D { .set_rate =3D sci_clk_set_rate, .get_parent =3D sci_clk_get_parent, .set_parent =3D sci_clk_set_parent, + .restore_context =3D sci_clk_restore_context, }; =20 /** --=20 2.53.0 From nobody Sat Jun 13 17:32:59 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D88E03E3D88 for ; Wed, 6 May 2026 08:35:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778056549; cv=none; b=VfYks/NFP8NTvZsoRW8T6FkeYyIxW6gMUBzdJoAzyeXiqF6/cWvFNwD7vVMjmyucN9Sl03Ue5dtgsfxpbOOqrLsqFyEpGp6l2IJMPRAmH/EamaQM432cgBPpm3IVSOw/kfcGh7my1uj70hLwbNzRPXyptJLqgHPAoHlpu4gQHAY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778056549; c=relaxed/simple; bh=DqGz4QpyjytZuy7DZ7WUz0MCr1dO6MWphElypK1laeU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Q034rjl1SXAUh/gdhMicFQSB2Jd5EoaH2Ol1IkHt4YsRtUTYWFwFJ76yy5GhneiGq+IT+BvRHTfWHfd1P+1/pBhJTj+MnzcNqLVVuniXXZhlmRiT8C8Ogz7UNgdx7PHKDhGwn24EEQkDxl6er89wUenDoo3QwNiNt9wG1y6hKi4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=yt3ih61H; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="yt3ih61H" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id C67E7C5DC4C; Wed, 6 May 2026 08:36:33 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 99A236053C; Wed, 6 May 2026 08:35:46 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id ACFD3102F15EB; Wed, 6 May 2026 10:35:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1778056545; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=49lJcqz2Atyj8/fHFhx3OA4I/7oDRXdi07p+7Ym8sf4=; b=yt3ih61HzrkDb0yi6wxVYk0W9u8yK6qBPKjwU+uRLkXJPLbXoV+cTA9eWYBgqbw2a33TKP Shj9mu/gzpeTHi8w8hTaaY5Q20HW1Zw/Qnxb9rRJCQ/UgLuCOQaCHI9OOoOt8eVUwywXDx ZWTqLX4vSbwK9kcflrB05VjgPiCs5nuegRqBJogm5vp5GM842v1uBQhkxpWlKePOfpZmup C7d9p5mye+rPpeWP+pUqS4RheCwfB8cFlck+86QwQ/EexMCWTMST2V95AiaU+BfAueT9n4 NJgel2FrOw5QaslODgj8ho4T7cWlFKgi3VoZ3XWjloQDH1lNnxzXsmPd8dn3gQ== From: "Thomas Richard (TI)" Date: Wed, 06 May 2026 10:35:28 +0200 Subject: [PATCH v7 4/4] firmware: ti_sci: add support for restoring clock context during resume 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: <20260506-ti-sci-jacinto-s2r-restore-irq-v7-4-037098a35215@bootlin.com> References: <20260506-ti-sci-jacinto-s2r-restore-irq-v7-0-037098a35215@bootlin.com> In-Reply-To: <20260506-ti-sci-jacinto-s2r-restore-irq-v7-0-037098a35215@bootlin.com> To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Michael Turquette , Stephen Boyd Cc: Gregory CLEMENT , richard.genoud@bootlin.com, Udit Kumar , Abhash Kumar , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, "Thomas Richard (TI)" , Dhruva Gole , Kendall Willis X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 Some DM-Firmware are not able to restore the clock rates and the clock parents after a suspend-resume. The CLK_CONTEXT_LOST firmware capability has been introduced to identify this characteristic. In this case the responsibility is therefore delegated to the ti_sci driver, which uses clk_restore_context() to trigger the context_restore() operation for all registered clocks, including those managed by the sci-clk. The sci-clk driver implements the context_restore() operation to ensure rates and clock parents are correctly restored. Reviewed-by: Dhruva Gole Reviewed-by: Kendall Willis Signed-off-by: Thomas Richard (TI) --- drivers/firmware/ti_sci.c | 9 +++++++-- drivers/firmware/ti_sci.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index 531ac3aa38b8..1ee8f67d3f7e 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -9,6 +9,7 @@ #define pr_fmt(fmt) "%s: " fmt, __func__ =20 #include +#include #include #include #include @@ -4022,6 +4023,9 @@ static int ti_sci_resume_noirq(struct device *dev) } } } + + if (info->fw_caps & MSG_FLAG_CAPS_LPM_CLK_CONTEXT_LOST) + clk_restore_context(); break; default: break; @@ -4182,14 +4186,15 @@ static int ti_sci_probe(struct platform_device *pde= v) } =20 ti_sci_msg_cmd_query_fw_caps(&info->handle, &info->fw_caps); - dev_dbg(dev, "Detected firmware capabilities: %s%s%s%s%s%s%s\n", + dev_dbg(dev, "Detected firmware capabilities: %s%s%s%s%s%s%s%s\n", info->fw_caps & MSG_FLAG_CAPS_GENERIC ? "Generic" : "", info->fw_caps & MSG_FLAG_CAPS_LPM_PARTIAL_IO ? " Partial-IO" : "", info->fw_caps & MSG_FLAG_CAPS_LPM_DM_MANAGED ? " DM-Managed" : "", info->fw_caps & MSG_FLAG_CAPS_LPM_ABORT ? " LPM-Abort" : "", info->fw_caps & MSG_FLAG_CAPS_IO_ISOLATION ? " IO-Isolation" : "", info->fw_caps & MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED ? " BoardConfig-Manag= ed" : "", - info->fw_caps & MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST ? " IRQ-Context-Lost"= : "" + info->fw_caps & MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST ? " IRQ-Context-Lost"= : "", + info->fw_caps & MSG_FLAG_CAPS_LPM_CLK_CONTEXT_LOST ? " Clk-Context-Lost"= : "" ); =20 ti_sci_setup_ops(info); diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h index 67f16e8c69a1..2d75667a6723 100644 --- a/drivers/firmware/ti_sci.h +++ b/drivers/firmware/ti_sci.h @@ -152,6 +152,7 @@ struct ti_sci_msg_req_reboot { * MSG_FLAG_CAPS_IO_ISOLATION: IO Isolation support * MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED: LPM config done statically for the= DM via boardcfg * MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST: DM is not able to restore IRQ cont= ext + * MSG_FLAG_CAPS_LPM_CLK_CONTEXT_LOST: DM is not able to restore Clock co= ntext * * Response to a generic message with message type TI_SCI_MSG_QUERY_FW_CAPS * providing currently available SOC/firmware capabilities. SoC that don't @@ -166,6 +167,7 @@ struct ti_sci_msg_resp_query_fw_caps { #define MSG_FLAG_CAPS_IO_ISOLATION TI_SCI_MSG_FLAG(7) #define MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED TI_SCI_MSG_FLAG(12) #define MSG_FLAG_CAPS_LPM_IRQ_CONTEXT_LOST TI_SCI_MSG_FLAG(14) +#define MSG_FLAG_CAPS_LPM_CLK_CONTEXT_LOST TI_SCI_MSG_FLAG(15) #define MSG_MASK_CAPS_LPM GENMASK_ULL(4, 1) u64 fw_caps; } __packed; --=20 2.53.0