From mboxrd@z Thu Jan 1 00:00:00 1970 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 3552AEB64DD for ; Thu, 3 Aug 2023 16:08:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ti0SofweSxi1/GIKXnAdtR5pmR8Lk5FkdVIg0L/YyE8=; b=rh6yMuWY0i8Gy4 ePLz01tu9/daR84yWYtKKmil8PSlaIMS7167EyJlRfNlqgwqePVGPySPwB/si2sG/SvkvhWbljYeH N4LQxrYQR3gGRf2PLGmoMGjT7nsPmOzqPt1Vy4EySeA2h8idW/iIPQTLpPYqxtM+gLbqvQ4OdspcZ vxf6Ns1aUj98SAcuUqOBv7Jh6zpIwP8Hn1h57Ro5z6Tqd5TIChClSfpIYaOg6u774PWQ8gGG7WXYD /CNpDxS3TjMJmhsk7ryf+l6JLsAKQGV7ymLXMJ768Ce2t+C35h0Zg3vShGnIZ4zSqdSm3jw7Smhoj 4WG7wFghBKhY3+ljrODA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRasG-00AHel-2i; Thu, 03 Aug 2023 16:08:28 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRasD-00AHe2-1p for linux-arm-kernel@lists.infradead.org; Thu, 03 Aug 2023 16:08:26 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 373G8GaD077018; Thu, 3 Aug 2023 11:08:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1691078896; bh=4xHql+cKbKBSwfFNBD8YC0edLIB4k/JLl55YhDFuI7k=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=kBn0KPV/cplBhWM/D/nKVBV3mv7879fb47G74rd4Qcjtx323Z08efeeMiQj7O7LNL mMGbTvootDZpOfxlBAVWU5mf7WuOsdBX2ROdJXxdIbVoiAxQs8O0cUhgYlfviGwNqF 84t4mlp4rv800SxwKGJhJTYxh/NzABMgl0YRCi9s= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 373G8GG0078594 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 3 Aug 2023 11:08:16 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 3 Aug 2023 11:08:16 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 3 Aug 2023 11:08:15 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 373G8F1E036790; Thu, 3 Aug 2023 11:08:15 -0500 Date: Thu, 3 Aug 2023 21:38:15 +0530 From: Dhruva Gole To: Andrew Davis CC: Nishanth Menon , Tero Kristo , "Santosh Shilimkar" , , , , Viresh Kumar , Praneeth Bajjuri , Tony Lindgren , Dave Gerlach , Vibhore Vardhan , Georgi Vlaev Subject: Re: [PATCH V6 4/4] firmware: ti_sci: Introduce system suspend resume support Message-ID: <20230803160815.yfpkdfssv75d4inf@dhruva> References: <20230803064247.503036-1-d-gole@ti.com> <20230803064247.503036-5-d-gole@ti.com> <3882f0ac-b74c-6eb2-197c-34ca233cd7a3@ti.com> <20230803155541.nwsfwobfkbpefoyw@dhruva> <8c330bd9-5f4e-8cd0-ed02-c3a696d7473a@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8c330bd9-5f4e-8cd0-ed02-c3a696d7473a@ti.com> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230803_090825_683929_5957E2D5 X-CRM114-Status: GOOD ( 28.69 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Aug 03, 2023 at 11:00:11 -0500, Andrew Davis wrote: > On 8/3/23 10:55 AM, Dhruva Gole wrote: > > On Aug 03, 2023 at 10:26:32 -0500, Andrew Davis wrote: > > > On 8/3/23 1:42 AM, Dhruva Gole wrote: > > > > Introduce system suspend resume calls that will allow the ti_sci > > > > driver to support deep sleep low power mode when the user space issues a > > > > suspend to mem. > > > > > > > > Also, write a ti_sci_prepare_system_suspend call to be used in the driver > > > > suspend handler to allow the system to identify the low power mode being > > > > entered and if necessary, send TISCI_MSG_PREPARE_SLEEP with information > > > > about the mode is being entered and the address for allocated memory for > > > > storing the context during Deep Sleep. > > > > > > > > We're using "pm_suspend_target_state" to map the kernel's target suspend > > > > state to SysFW low power mode. Make sure this is available only when > > > > CONFIG_SUSPEND is enabled. > > > > > > > > Co-developed-by: Dave Gerlach > > > > Signed-off-by: Dave Gerlach > > > > Signed-off-by: Vibhore Vardhan > > > > Signed-off-by: Georgi Vlaev > > > > Signed-off-by: Dhruva Gole > > > > --- > > > > drivers/firmware/ti_sci.c | 63 +++++++++++++++++++++++++++++++++++++++ > > > > 1 file changed, 63 insertions(+) > > > > > > [..snip..] > > > > +static int ti_sci_suspend(struct device *dev) > > > > +{ > > > > + struct ti_sci_info *info = dev_get_drvdata(dev); > > > > + int ret; > > > > + > > > > + ret = ti_sci_cmd_set_io_isolation(&info->handle, TISCI_MSG_VALUE_IO_ENABLE); > > > > > > After this the will the IOs be in isolation? Or does the firmware wait > > > until power down begins later? > > > > From what I understand, > > IOs will be in isolation immediately > > > > That is what I understand too, so then any device that may need to do some > external communication for its suspend will not function, this must be the > last driver _suspend() the system calls, how do you enforce that? I will make use of .suspend_noirq callbacks in that case. Does that sound better, or is there anything else I may not be aware of? > > Andrew > > > > > > > Andrew > > > [..snip..] > > -- Best regards, Dhruva Gole _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel