Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2338971ybz; Thu, 23 Apr 2020 16:18:40 -0700 (PDT) X-Google-Smtp-Source: APiQypJYbVhDyVfmmJ5iMp2wW9Rnwx0aCcDLYveycUhMlyxlo/fsJHFjmd1uAs1KZq+FEc0xSNc3 X-Received: by 2002:a05:6402:4ce:: with SMTP id n14mr5355352edw.32.1587683920346; Thu, 23 Apr 2020 16:18:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587683920; cv=none; d=google.com; s=arc-20160816; b=zFigtw9It71IdkLJS7TBnoGXeY8YD+FblPX2+fag7wdXFdEHRjNok97mhRnrFWEa04 zKaZI/+gEDOQAuee+L9y4OD8aogkMA0aCM6LoUKHWPNxozpn9arYNDOXgHgVjBu6N53U Ktg/PFfgq6+tCX64MMawXh4RM4h9uawP/cmuykiBZ4e9vk00J8Q4Sk10GAXcZMRC60RY 5MlvWudk9B0o8L7ICG11R0GGgHnxOcGoq0DgLfxqJGuVH4z/sRwUzRurwt36X4Odxr0u NK5zkSWpTnd/ckNH41l8xn/TIPq+YPYsb+BQ0sgMZSXeq50hqCRjn1z8qKOjytPPqvoB kkTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=UhMdIUYARUv2rmfaSujyaR6oK7eJmYzbTtBTAerqasE=; b=J+eEKTeuolGZrkykg5Q5IerlxJnsTbFA9rwVOK5HZdWAgCi1vU3wiPFp80dlXPb3ub 5PNldofgLfGkNFV2Uzk6AxUbwC1uKs4xrQbe/t2KkXwGRyPbrdV5F+FvgnL4bUUXErLD IsfJ8LV1GjdWy1LlWEdMvMH8ImZajELbCVxN6jWcf+03CE7n/13MZ/Q02EaWhb+ULcuW IFLZUxXMZD4pmdashEpM3Y9P3kQRJSu1oq9NhsJWwGo5dErtVeRM22xrZRhOjx/Fc4fS ecJXa148DNSw8XcHX+o9v+HbGQUA+E8q0X/NfLFIsX4h9v5XMRwNyxgIaG0bR5RQaxDz J8Bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q1si2232528eja.190.2020.04.23.16.18.17; Thu, 23 Apr 2020 16:18:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729622AbgDWXQV (ORCPT + 99 others); Thu, 23 Apr 2020 19:16:21 -0400 Received: from inva020.nxp.com ([92.121.34.13]:49978 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729136AbgDWXQU (ORCPT ); Thu, 23 Apr 2020 19:16:20 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 05CB11A0187; Fri, 24 Apr 2020 01:16:18 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 82F641A01A5; Fri, 24 Apr 2020 01:16:14 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id D951F402C7; Fri, 24 Apr 2020 07:16:09 +0800 (SGT) From: Anson Huang To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, ben.dooks@codethink.co.uk, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH 1/2] firmware: imx: make sure MU irq can wake up system from suspend mode Date: Fri, 24 Apr 2020 07:07:10 +0800 Message-Id: <1587683231-18468-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org IRQF_NO_SUSPEND flag is set for MU IRQ of IPC work, but with this flag set, IRQD_WAKEUP_ARMED flag will NOT be set during suspend_device_irq() phase, then when MU IRQ arrives, it will NOT wake up system from suspend. To fix this issue, pm_system_wakeup() is called in general MU IRQ handler to make sure system can be waked up when MU IRQ arrives. Signed-off-by: Anson Huang --- drivers/firmware/imx/imx-scu-irq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/firmware/imx/imx-scu-irq.c b/drivers/firmware/imx/imx-scu-irq.c index db655e8..d9dcc20 100644 --- a/drivers/firmware/imx/imx-scu-irq.c +++ b/drivers/firmware/imx/imx-scu-irq.c @@ -10,6 +10,7 @@ #include #include #include +#include #define IMX_SC_IRQ_FUNC_ENABLE 1 #define IMX_SC_IRQ_FUNC_STATUS 2 @@ -91,6 +92,7 @@ static void imx_scu_irq_work_handler(struct work_struct *work) if (!irq_status) continue; + pm_system_wakeup(); imx_scu_irq_notifier_call_chain(irq_status, &i); } } -- 2.7.4