Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp972541pxb; Wed, 6 Apr 2022 05:43:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8wTNQo+MxUepHRba2usbn2hCnqNJQ4Vvw4hKBtBmMesO/XzqEgh9YNYGt8p0fr7E//W2k X-Received: by 2002:a17:902:bc8c:b0:156:bc64:fa47 with SMTP id bb12-20020a170902bc8c00b00156bc64fa47mr8366609plb.135.1649249020922; Wed, 06 Apr 2022 05:43:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649249020; cv=none; d=google.com; s=arc-20160816; b=Ti49IfpUHue10fQyxJyI+W5TB65jrSSiEzAv1mMCQaUkeVd00S/lcHaj1o0wkS5ZCQ 4DNTSvzAdlZYxLkp2OkZ6vis0BczrRP7E1Ch18IMmCHVxw0LCWr3z9hcVNCVFqyWtKYO jDj5A3BQjm4muJkRAaH/gWhSDecHaI+BUUxGUJ/wwFL0yAYXfdpgGzawesONeYV7YyQS 2LE3zjQmmMxhOFtjw7NY/En6MTIWx7P2FUTceKTI9nTawoqDgXk4aAcFuCuP0bTCyvvs wVMBOJJ207Miy0jJBRyuuoWJcIturxlW8ah5zhu+HzfkP5/xzdY8x+pjl5TEuFKEYOcr E4rQ== 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=jhQahGmP2u3CZ+f0Z5R9IHj+SV2wWw6fKn6RkpgpfgY=; b=wx8TdZbhckC8GiGh/lW3olpbkXqt206kPEEsNesio0Fo13ajtHmmzJMm8somDYg/o3 zLd4zzFss/4r5XvIJTHhZTV/Funqtpb2I73kT+VrFB56rXc+F5QjBF3Dz5nubm+zpn4z 1i0FiECXLUFXZjSwc+6Ptv7fCGv5qOZ84OX87QsjEtTauvXPNxOfbwegVmvkaBlJymTm 3DFv1WWii8tCYfk7TtBBCzAsCf56jlZ00qWLjDRGbcgX365hpOSECYBi5ZlHqQusnBPY r/SpwIS009FNs10AbIRkIY8uMrSr3A1uz/HWs0S2auLJO6dBPrbgyyfgQ5k9djpl/LC9 +tmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ftXrOx3l; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u30-20020a056a00099e00b004fa3a8dffa5si17053373pfg.92.2022.04.06.05.43.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:43:40 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ftXrOx3l; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 564674041C7; Wed, 6 Apr 2022 02:23:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1453710AbiDEWgm (ORCPT + 99 others); Tue, 5 Apr 2022 18:36:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354079AbiDEKL3 (ORCPT ); Tue, 5 Apr 2022 06:11:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21A744DF76; Tue, 5 Apr 2022 02:57:06 -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 B46256157A; Tue, 5 Apr 2022 09:57:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4A0DC385A2; Tue, 5 Apr 2022 09:57:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152625; bh=iTXKqvGPA52czy0DyOfskTNfOi5wLMP9Uy+AzJwxCLg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ftXrOx3l5XUrdwuaS8/2qAovzbhRkh7RKYhqeC4QnbeDfD1LmL4eeUOMcgO9RWx1x l4klSUWZOqTW5updEXm4liRLM4RkTYOMNkbBC5KLkptU8JbEjzVxtaWncYKuP1Kte+ OfJt6jb5LIh87UfhQZTw2mb5xAYkpo7kO7E0zO5I= 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.15 844/913] mailbox: imx: fix wakeup failure from freeze mode Date: Tue, 5 Apr 2022 09:31:46 +0200 Message-Id: <20220405070405.127669353@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 @@ -13,6 +13,7 @@ #include #include #include +#include #include #define IMX_MU_CHANS 16 @@ -67,6 +68,7 @@ struct imx_mu_priv { const struct imx_mu_dcfg *dcfg; struct clk *clk; int irq; + bool suspend; u32 xcr[4]; @@ -307,6 +309,9 @@ static irqreturn_t imx_mu_isr(int irq, v return IRQ_NONE; } + if (priv->suspend) + pm_system_wakeup(); + return IRQ_HANDLED; } @@ -652,6 +657,8 @@ static int __maybe_unused imx_mu_suspend priv->xcr[i] = imx_mu_read(priv, priv->dcfg->xCR[i]); } + priv->suspend = true; + return 0; } @@ -673,6 +680,8 @@ static int __maybe_unused imx_mu_resume_ imx_mu_write(priv, priv->xcr[i], priv->dcfg->xCR[i]); } + priv->suspend = false; + return 0; }