Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp666027pxb; Tue, 5 Apr 2022 17:57:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOoT2to7twzPL2yX1vf5TIY+u9K5NEXB7wq79ahADkGU80qglHeldn2DsPQmhzKot6/+hg X-Received: by 2002:a17:907:7791:b0:6e6:f1f3:ba6f with SMTP id ky17-20020a170907779100b006e6f1f3ba6fmr5982127ejc.134.1649206659359; Tue, 05 Apr 2022 17:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649206659; cv=none; d=google.com; s=arc-20160816; b=irIct/jYxDNRC+3stkzFpYVElf5Sv+tY3ARZg1rESq5weTbuc2vFS8KMlYxeYeTF8l UIbBHHAI9wey2Ck18c6uX8x+pbN7qMEsriOqzsymaFry7bClk+6x82ycLFnHB5bkng8R FL0xwIhBfvhpKnfvOaeqKqJSb4MwoUtAZ6zQNCi2k1S16XdsfH3Hv2QqNfN3yAFRaHyy 2DzZvgP6+SpEgfFZIQI5ElnA+8OEZ9+q/jbha/mLzR4fb523R7D7bi4nDW/TxGjuV3Gt v0RMRIwfY0LA3A7tttKlV9fRtoVejCwG6pXtkDh6yilB5L6BCHRZDrMe2h9yPJreVt6F lfCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CEqqERkOjNqh7y6aWsRyyCk3jc9iyceFvKzlZrjp3XQ=; b=Z13GzUWPwETm538vvXELSU6IU+n5xAaXVaql1BCKAf5LFICnOWNqjOSwUBjOa1ZvHp HtXRh3ioy8pp+laE4CLDfbZuUMorOpK3TvHpgAgCTJOIn8WXchZJfYBI//oaRe93imK8 lX/pyYqkijFQ1HzSIYdTKCNlHVesFaRdUgkXplyykm6qBmeAMJcP2NPCoOfE2siv0eAl UXwNVwtYD2d5bKIjBXguNw1/a+k4GZ0j+FA4W4XPX6WbBx7L1oOsVVJIcZr3PWpoUDB2 7xaQC1eE3mppYa/NzpxAKKWFoFaLf/kurEIoEgWzhLnMNMWQd+hoam8UEpOAbvDU40je Xfww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Gb2svhWr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w6-20020a056402268600b00418c2b5bdb0si10614462edd.146.2022.04.05.17.57.11; Tue, 05 Apr 2022 17:57:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Gb2svhWr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1390910AbiDENp1 (ORCPT + 99 others); Tue, 5 Apr 2022 09:45:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347153AbiDEJZS (ORCPT ); Tue, 5 Apr 2022 05:25:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F7FFAA018; Tue, 5 Apr 2022 02:14:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1405961659; Tue, 5 Apr 2022 09:14:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2456BC385A0; Tue, 5 Apr 2022 09:14:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649150052; bh=aVUBwy5ixGJpNkudBT7QG5qe2UFBdxE/HFTF2miR6uw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gb2svhWrgPuGQ0BmRVqDy1irybc6a77A7wgOTkSF6Y+rYf+X55k57kNU74R5elzRW HR5spq1jQVCNl4Xz5qCBpzJ4PxZ31Mwpg/BmUiIXKqR4myR+YZ7RSIKQrl+tZwC1SG HirqyRnnVg0pNbbtsZWVcexNWj0+/GeCvOEYNK44= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jacky Bai , Peng Fan , Robin Gong , Jassi Brar Subject: [PATCH 5.16 0937/1017] mailbox: imx: fix wakeup failure from freeze mode Date: Tue, 5 Apr 2022 09:30:50 +0200 Message-Id: <20220405070422.027277386@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robin Gong commit 892cb524ae8a27bf5e42f711318371acd9a9f74a upstream. Since IRQF_NO_SUSPEND used for imx mailbox driver, that means this irq can't be used for wakeup source so that can't wakeup from freeze mode. Add pm_system_wakeup() to wakeup from freeze mode. Fixes: b7b2796b9b31e("mailbox: imx: ONLY IPC MU needs IRQF_NO_SUSPEND flag") Reviewed-by: Jacky Bai Reviewed-by: Peng Fan Signed-off-by: Robin Gong Signed-off-by: Peng Fan Signed-off-by: Jassi Brar Signed-off-by: Greg Kroah-Hartman --- drivers/mailbox/imx-mailbox.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/drivers/mailbox/imx-mailbox.c +++ b/drivers/mailbox/imx-mailbox.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #define IMX_MU_CHANS 16 @@ -76,6 +77,7 @@ struct imx_mu_priv { const struct imx_mu_dcfg *dcfg; struct clk *clk; int irq; + bool suspend; u32 xcr[4]; @@ -334,6 +336,9 @@ static irqreturn_t imx_mu_isr(int irq, v return IRQ_NONE; } + if (priv->suspend) + pm_system_wakeup(); + return IRQ_HANDLED; } @@ -702,6 +707,8 @@ static int __maybe_unused imx_mu_suspend priv->xcr[i] = imx_mu_read(priv, priv->dcfg->xCR[i]); } + priv->suspend = true; + return 0; } @@ -723,6 +730,8 @@ static int __maybe_unused imx_mu_resume_ imx_mu_write(priv, priv->xcr[i], priv->dcfg->xCR[i]); } + priv->suspend = false; + return 0; }