Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp678693pxb; Tue, 5 Apr 2022 18:26:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT4mKEaOv5RS7+eho60+3NkLuP76sHdGu9T/v8zWk5EOyJ4rRM5/ZkKH7tEJnLu3o+SxJC X-Received: by 2002:a17:906:2991:b0:6cf:6b24:e92f with SMTP id x17-20020a170906299100b006cf6b24e92fmr5959822eje.748.1649208367300; Tue, 05 Apr 2022 18:26:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649208367; cv=none; d=google.com; s=arc-20160816; b=YPY4/Sn81VBmbO5fttFJ83DisWzeBQlTEkadpIBMy6F+FApI3UnQobdnF5fbE2ul0L o7sAWhqW7Q9Cj+PpNLfKGw10524FtSC8CfqXFdPcsE6y95QqNgGfDp486SdTLSJSuqUN VG3tz2V6bXN1qYiuRbhuj+bN98eysXFRVn1tZ7ab+SbMSvnX2uXhyj3WZiyn6vCLlkrT OnAZcc7yXuKiTDCU9dZeQidC7VFI6/lSWiqqvcJp166cUwh8TlKgmap8XNRBQ/GJ6dhJ mXgtfnBro0Z48iFItSxL5TejUzS/IoXanQjsVPoHB+yFs7rMp6Tdja+75U7VVmHQKcuL ch6g== 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=hLBDrby3JQa6aTLElKmBVabLhxEwy4qi0tx6YBmVLzOfX//NkFReG59WrASarkIwGo FkvYFG5yDz24CNmD5p59+xb3GKj5QJd+vMaWnZ+sR0tIY2DAiZKnVBf6pDoqDQTvVIPY rtJF7WNAknGE2RkdF8B6GonAPEP6tJwcideDWfaads6k2WV1x8h0uw50Xfot68wEEY3b /61Ob4Z9pG8t1mMiuZXqRnsKIYlmf01uaplHAnB0BZbHOf3DKpcbzxLYY0y6Vsx0kbI3 /ZoeZeCkwke7wj7hKZF87cc2TVjATrknmCJ02OmNfq+EENOhkT5vWC3T5VLG9oqFO8AW hREA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lalFWzbf; 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 c3-20020a17090603c300b006df76385c2csi10330063eja.204.2022.04.05.18.25.41; Tue, 05 Apr 2022 18:26:07 -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=lalFWzbf; 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 S1347292AbiDEKol (ORCPT + 99 others); Tue, 5 Apr 2022 06:44:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241067AbiDEIcq (ORCPT ); Tue, 5 Apr 2022 04:32:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48650B91B1; Tue, 5 Apr 2022 01:26:41 -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 ams.source.kernel.org (Postfix) with ESMTPS id 049DCB81BC0; Tue, 5 Apr 2022 08:26:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 507C6C385A2; Tue, 5 Apr 2022 08:26:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649147198; bh=aVUBwy5ixGJpNkudBT7QG5qe2UFBdxE/HFTF2miR6uw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lalFWzbfUM0NZVEmJRnqbRdoTebdJJMYNCKrokmByywHDTGrbDWuklkUf0/q2kNfJ EItEmzr43QW6cGa/KJCia+0ulvQIZAZoGLIrskWOnVjue3qY4e+mF7ERPRuc6ETzuV G3o+YYBGhekRG+d3XDLl9/Qk/UJgOnS+qlD+AsKA= 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.17 1036/1126] mailbox: imx: fix wakeup failure from freeze mode Date: Tue, 5 Apr 2022 09:29:43 +0200 Message-Id: <20220405070437.885209263@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@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; }