From patchwork Thu Apr 23 23:07:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 11506787 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2F09E15AB for ; Thu, 23 Apr 2020 23:16:38 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0D1E12077D for ; Thu, 23 Apr 2020 23:16:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="THeaGQzK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D1E12077D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=mZJqod/leGsKJRdqJ0nbknh1bQmRLNrXlWpPLst/mvA=; b=THe aGQzKia9eQH8Mzl3CASUyVCYMfFMh8o8RjtwljIOyZQnlDIto+Wg4K0xHMUqjiH4Udy+j/9rh8CJk CwHYukMxATq1iklvgTbiSxAdAflB5rtSfM6IT13gZO7ickWfv+VSf0DT38k5Zu7Lh5EybyXvwt2cT mGhZT1FGjFM/LUG6in8NSyf4VddDlv3wQxqZTm9VvXIOcq0zFQ5athB1/Q3p234Ko3fKwX0Qsx53X JLZhqrkflPAYTBz3WX7LRcRhkuhotAjNDgqsKq0khW6PyzHMN8WUfRJ2KgnxpzxSbry6yKr2Qjz/J P0Rj4t/pFMBqCdJcwSOoVFbwS62tEMg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRl5B-0007i4-9N; Thu, 23 Apr 2020 23:16:37 +0000 Received: from inva020.nxp.com ([92.121.34.13]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRl4w-0007Vj-Nk for linux-arm-kernel@lists.infradead.org; Thu, 23 Apr 2020 23:16:24 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200423_161622_912121_548FCA07 X-CRM114-Status: UNSURE ( 6.75 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [92.121.34.13 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux-imx@nxp.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Reviewed-by: Dong Aisheng --- 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); } } From patchwork Thu Apr 23 23:07:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 11506785 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3213A112C for ; Thu, 23 Apr 2020 23:16:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 020BA20780 for ; Thu, 23 Apr 2020 23:16:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OQqJVyUK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 020BA20780 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=B2K4a7u1BB0iaWonX38/ZUh+nh6x7O2JXxQ3WFtBBD4=; b=OQqJVyUKVenYPGH/Ivk6eBoUpm 3pTVP22kKCS8iDNeYS4Me9H2FvErbL73DjbxldmlCHAQ0ViIn7L5zkJkTFx2yTPzy7jTH/7V3mKir o2PV9xB5DC/tGkfKQfig6R3aAqVxPu+LcOM0cEr0unUIQPFPXeFFU22gb7xrknjy//gO3zfpAPx2G Z8QybJ7DssbXv6gDQoe/CqWjovFcileQUMVjjcx9eRfzbTpfBDsKjHpD6rhZzjQGHrtiWrtcfhJvI RY9jtQb7jf0WXMAIYdp2BK/GoH6H9z1AS5YBk+GXutYhTxY4NB4JRu/XjJO5Vceu+HbVbjt4zcvLT rx/gzOyg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRl4z-0007YQ-Kp; Thu, 23 Apr 2020 23:16:25 +0000 Received: from inva020.nxp.com ([92.121.34.13]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRl4w-0007Vo-Nl for linux-arm-kernel@lists.infradead.org; Thu, 23 Apr 2020 23:16:24 +0000 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E0D431A019D; 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 6B2531A01BF; Fri, 24 Apr 2020 01:16:15 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id C26AF40246; Fri, 24 Apr 2020 07:16:10 +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 Subject: [PATCH 2/2] firmware: imx: MU IRQ group number should be 7 Date: Fri, 24 Apr 2020 07:07:11 +0800 Message-Id: <1587683231-18468-2-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1587683231-18468-1-git-send-email-Anson.Huang@nxp.com> References: <1587683231-18468-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200423_161622_911978_3A2E1BE8 X-CRM114-Status: UNSURE ( 7.64 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [92.121.34.13 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux-imx@nxp.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The MU IRQ group number should be 7 instead of 4. Signed-off-by: Anson Huang --- drivers/firmware/imx/imx-scu-irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/imx/imx-scu-irq.c b/drivers/firmware/imx/imx-scu-irq.c index d9dcc20..66fef88 100644 --- a/drivers/firmware/imx/imx-scu-irq.c +++ b/drivers/firmware/imx/imx-scu-irq.c @@ -14,7 +14,7 @@ #define IMX_SC_IRQ_FUNC_ENABLE 1 #define IMX_SC_IRQ_FUNC_STATUS 2 -#define IMX_SC_IRQ_NUM_GROUP 4 +#define IMX_SC_IRQ_NUM_GROUP 7 static u32 mu_resource_id;