From patchwork Thu Nov 12 07:52:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?V2VuYmluIE1laSAo5qKF5paH5b2sKQ==?= X-Patchwork-Id: 11899275 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 D6AC8921 for ; Thu, 12 Nov 2020 07:52:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 5FC6121D40 for ; Thu, 12 Nov 2020 07:52:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iDdyNt5V"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="MBhIgbEK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5FC6121D40 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=fGO4jA1Ca1Sr9yi54+MyYBp+vXR/oj2jMNFNY6rsyQ8=; b=iDdyNt5VEBSgeO+Gaa4IICXpO E7wCW1uGPnJOwoY63cQjvjVDnj09aIFyt26F063VSlQNsdg/J2DKD3MDH3gjriWyNz3/XdTfOtxkG f0NBspI7ake9Le6huCuukje/AKjFKnYnoy2n/SunuUaUBKL/2ExA8x/ezMPPB032TSR5cYPe5OTr5 mSnqqbJih9aLZ0elYm3jSr25lpMMzUNCId1dpZJRSLKZpTjnPyxEZ/eoJm3cmjQ4LPyXAE6mfoiMy jqKwYafv3OSs8Kd1yWgacq6R3eJFFs+b82eVr3wRfka7mMQiuXQO0XVifbJL6Z0Hlio3yRNsAnTpz 3B1AAX4eA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kd7PF-0006et-JO; Thu, 12 Nov 2020 07:52:33 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kd7P2-0006at-SJ; Thu, 12 Nov 2020 07:52:23 +0000 X-UUID: 8b6c0000356a4b9eb0e641611bb95572-20201111 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=j2elWQhSJ/7nCe/AfhWTGvJ2VkQvhtzWDug696/uT6U=; b=MBhIgbEKHBNsNDZVngzqvkzOfwVhA5xL81/l9s2YokSwjOJ8x9LIZAKUvsbwX7zCAxSwxCRKLwzTj55fgktnYKHAmg4zjKehQfQURcrJrtvwSScQVqEuRSifxGJR6FFqXPiy3MxcNJQqnS7/8zdtAaDrCsKbo+PpdRgZ2V68dDk=; X-UUID: 8b6c0000356a4b9eb0e641611bb95572-20201111 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1679770062; Wed, 11 Nov 2020 23:52:06 -0800 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 11 Nov 2020 23:52:12 -0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 12 Nov 2020 15:52:11 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 12 Nov 2020 15:52:10 +0800 From: Wenbin Mei To: Ulf Hansson , Rob Herring Subject: [PATCH v1 1/3] dt-bindings: mmc: Add optional cqe off properties Date: Thu, 12 Nov 2020 15:52:06 +0800 Message-ID: <20201112075208.28183-2-wenbin.mei@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20201112075208.28183-1-wenbin.mei@mediatek.com> References: <20201112075208.28183-1-wenbin.mei@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201112_025221_136500_2603C94F X-CRM114-Status: UNSURE ( 9.43 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-mediatek@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-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Bradley Bolen , Wenbin Mei , Baolin Wang , Yoshihiro Shimoda , irq-linux@rere.qmqm.pl, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, srv_heupstream@mediatek.com, linux-mediatek@lists.infradead.org, Ludovic Barre , Krishna Konda , Matthias Brugger , Chaotian Jing , Veerabhadrarao Badiganti Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org Add optional properties for cqe hosts which are used to set cqe off during suspend flow. Signed-off-by: Wenbin Mei --- Documentation/devicetree/bindings/mmc/mmc-controller.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/mmc-controller.yaml b/Documentation/devicetree/bindings/mmc/mmc-controller.yaml index b96da0c7f819..457c9a84b988 100644 --- a/Documentation/devicetree/bindings/mmc/mmc-controller.yaml +++ b/Documentation/devicetree/bindings/mmc/mmc-controller.yaml @@ -164,6 +164,13 @@ properties: description: enable SDIO IRQ signalling on this interface + cqe-off-in-suspend: + $ref: /schemas/types.yaml#/definitions/flag + description: + After suspend, the mmc host is powered off by HW, and bring CQE register + to default state, so we add the flag to re-init CQE register after resume + back. + full-pwr-cycle: $ref: /schemas/types.yaml#/definitions/flag description: From patchwork Thu Nov 12 07:52:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?V2VuYmluIE1laSAo5qKF5paH5b2sKQ==?= X-Patchwork-Id: 11899269 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 DD64B921 for ; Thu, 12 Nov 2020 07:52:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 6255D21D40 for ; Thu, 12 Nov 2020 07:52:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="1iFp8B/M"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="JeRwuKhm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6255D21D40 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=CRGA7IKqBdPRxRNb8up3kpFsbL8Hl92WRcu21gwsfhc=; b=1iFp8B/M+T0MwyH0lR2BjHt0w n1OYyBAoZZwGTBHCtseEiFpTxE8wtKM/ahOoncUAEYc5lFN6EpMxw6Z4K235CMl1EBCFnhB64nxsb WMvizqElWFo32RZC/ShW2vYKvksCKTKHHW5R03gxt+kG3fGo9EHffTMo7WaXBwyIV9f4xx6kzaA6G Vo8FBGoTyZMKgHpzGwZgvZ5QxtEQqY+I3h7JugtgtzfHjW5teDiiIUqehEUlDTvVx+yC28QdPzBwY 1JSH/AL/LpqOoFEvQ2AKCHday+jLNkU4gd84Ry9C3KZhHjDRRhOv3tDdH0DYUw243KNk0MLBIXB7r g2R2cW3/g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kd7PB-0006dH-KS; Thu, 12 Nov 2020 07:52:29 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kd7P2-0006am-QJ; Thu, 12 Nov 2020 07:52:22 +0000 X-UUID: 668a6b4404c540d9a18df543f174dfd2-20201111 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=BFW4SlLa9Cysl3JQCNnH6syHd84UbKke+hFKkGLqkw8=; b=JeRwuKhmGF4g7E7PIafk8rIa65kcPTXLkj+FG4StdjJY7E3O08iH5j1biNC6N/X4qX5SjNNjKPWw6HwQD0f+aelDFHTXIp6YPNGnCcDfw2kUtWNtEYpoiGGVDFgiK5fsV1Px+NKAwi2QfRKuZDjgdGdXE/fvGMq8yIz4gkpKNQA=; X-UUID: 668a6b4404c540d9a18df543f174dfd2-20201111 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 884757598; Wed, 11 Nov 2020 23:52:08 -0800 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 11 Nov 2020 23:52:13 -0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 12 Nov 2020 15:52:12 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 12 Nov 2020 15:52:11 +0800 From: Wenbin Mei To: Ulf Hansson , Rob Herring Subject: [PATCH v1 2/3] arm64: dts: mt8192: Add cqe off flag Date: Thu, 12 Nov 2020 15:52:07 +0800 Message-ID: <20201112075208.28183-3-wenbin.mei@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20201112075208.28183-1-wenbin.mei@mediatek.com> References: <20201112075208.28183-1-wenbin.mei@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201112_025221_060846_5EB8E0BD X-CRM114-Status: GOOD ( 11.32 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-mediatek@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-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Bradley Bolen , Wenbin Mei , Baolin Wang , Yoshihiro Shimoda , irq-linux@rere.qmqm.pl, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, srv_heupstream@mediatek.com, linux-mediatek@lists.infradead.org, Ludovic Barre , Krishna Konda , Matthias Brugger , Chaotian Jing , Veerabhadrarao Badiganti Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org Add cqe off flag for MT8192 mmc nodes. Signed-off-by: Wenbin Mei --- arch/arm64/boot/dts/mediatek/mt8192-evb.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8192-evb.dts b/arch/arm64/boot/dts/mediatek/mt8192-evb.dts index a4279fa87c2b..0df78e4ea0d0 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt8192-evb.dts @@ -41,6 +41,7 @@ mmc-hs400-1_8v; supports-cqe; cap-mmc-hw-reset; + cqe-off-in-suspend; no-sdio; no-sd; hs400-ds-delay = <0x12814>; From patchwork Thu Nov 12 07:52:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?V2VuYmluIE1laSAo5qKF5paH5b2sKQ==?= X-Patchwork-Id: 11899277 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 4EEFB921 for ; Thu, 12 Nov 2020 07:52:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 09A6320709 for ; Thu, 12 Nov 2020 07:52:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SL9NVOPS"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="KV/YWhNu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 09A6320709 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=TUidclGX9DGTkaKQLz/AfdpJDYP9e7PW2jCnHZ/6x6g=; b=SL9NVOPSCeEkhhl2g0Sl0yxOi pOYzg2QC3RaisLupO6g/ftqmU1XEp7xNqwVgs71YjYmRq0TnKPXDKqdXvgHW5pIsTtuAaoYQ4VhKa wcoDjg2K+ZhnQKeO6dGlHWDAbjPjlOfhq/v8D1wScU0GZivN8SSE2WufjwNlP+HEBmgMbgeyVOzMf EchDC1S2PNT/xNgBmEZNqK9pKCbFTpGA6vqmk/SR3+r0yw0XSnkMB3bNBzdtTF+uRdHvIomjL9Blg n+NZU60GPyYQCHtLHWemh4BXPJb1nYe6FxnK0nETc/DmzW6PK/2EVRBbSCd7h8ug+N9XEUKTyDyP3 hjV/aF15Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kd7PL-0006gx-0M; Thu, 12 Nov 2020 07:52:39 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kd7PE-0006e3-0Z; Thu, 12 Nov 2020 07:52:33 +0000 X-UUID: a14596b030834839a10822b60f9658fc-20201111 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=BlQyJfsoHDiF36DcZnxerfEdXSYts1d7WHEQyoPvRxw=; b=KV/YWhNuqHymBsGw+vMku+TD9tk6QYmMOkRULaBKAO0Ftu6Ila2ngOOixcmng+XmQhVUxerfaO+ZofxL6CFfKGHbWnrVcaBOPID8x4GlHz8dIhSBUMUbG1ADF1boEsG/TbMSUP71miwEP5Gmc/OiCsNHCd3gpuJiHW92m3AReek=; X-UUID: a14596b030834839a10822b60f9658fc-20201111 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 916601956; Wed, 11 Nov 2020 23:52:21 -0800 Received: from MTKMBS07N2.mediatek.inc (172.21.101.141) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 11 Nov 2020 23:52:14 -0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 12 Nov 2020 15:52:13 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 12 Nov 2020 15:52:12 +0800 From: Wenbin Mei To: Ulf Hansson , Rob Herring Subject: [PATCH v1 3/3] mmc: core: Set cqe off during suspend flow Date: Thu, 12 Nov 2020 15:52:08 +0800 Message-ID: <20201112075208.28183-4-wenbin.mei@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20201112075208.28183-1-wenbin.mei@mediatek.com> References: <20201112075208.28183-1-wenbin.mei@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201112_025232_262389_9DEB3628 X-CRM114-Status: GOOD ( 13.25 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-mediatek@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-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Bradley Bolen , Wenbin Mei , Baolin Wang , Yoshihiro Shimoda , irq-linux@rere.qmqm.pl, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, srv_heupstream@mediatek.com, linux-mediatek@lists.infradead.org, Ludovic Barre , Krishna Konda , Matthias Brugger , Chaotian Jing , Veerabhadrarao Badiganti Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org Before we got these errors on MT8192 platform: [ 59.153891] Restarting tasks ... [ 59.154540] done. [ 59.159175] PM: suspend exit [ 59.218724] mtk-msdc 11f60000.mmc: phase: [map:fffffffe] [maxlen:31] [final:16] [ 119.776083] mmc0: cqhci: timeout for tag 9 [ 119.780196] mmc0: cqhci: ============ CQHCI REGISTER DUMP =========== [ 119.786709] mmc0: cqhci: Caps: 0x100020b6 | Version: 0x00000510 [ 119.793225] mmc0: cqhci: Config: 0x00000101 | Control: 0x00000000 [ 119.799706] mmc0: cqhci: Int stat: 0x00000000 | Int enab: 0x00000000 [ 119.806177] mmc0: cqhci: Int sig: 0x00000000 | Int Coal: 0x00000000 [ 119.812670] mmc0: cqhci: TDL base: 0x00000000 | TDL up32: 0x00000000 [ 119.819149] mmc0: cqhci: Doorbell: 0x003ffc00 | TCN: 0x00000200 [ 119.825656] mmc0: cqhci: Dev queue: 0x00000000 | Dev Pend: 0x00000000 [ 119.832155] mmc0: cqhci: Task clr: 0x00000000 | SSC1: 0x00001000 [ 119.838627] mmc0: cqhci: SSC2: 0x00000000 | DCMD rsp: 0x00000000 [ 119.845174] mmc0: cqhci: RED mask: 0xfdf9a080 | TERRI: 0x0000891c [ 119.851654] mmc0: cqhci: Resp idx: 0x00000000 | Resp arg: 0x00000000 [ 119.865773] mmc0: cqhci: : =========================================== [ 119.872358] mmc0: running CQE recovery From these logs, we found TDL base was back to the default value. After suspend, the mmc host is powered off by HW, and bring CQE register to the default value, so CQE need to be re-initialized after resuming back. Signed-off-by: Wenbin Mei --- drivers/mmc/core/host.c | 2 ++ drivers/mmc/core/mmc.c | 5 +++++ include/linux/mmc/pm.h | 1 + 3 files changed, 8 insertions(+) diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index ce43f7573d80..c98486c8fb3b 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -284,6 +284,8 @@ int mmc_of_parse(struct mmc_host *host) if (device_property_read_bool(dev, "wakeup-source") || device_property_read_bool(dev, "enable-sdio-wakeup")) /* legacy */ host->pm_caps |= MMC_PM_WAKE_SDIO_IRQ; + if (device_property_read_bool(dev, "cqe-off-in-suspend")) + host->pm_caps |= MMC_PM_CQE_OFF_IN_SUSPEND; if (device_property_read_bool(dev, "mmc-ddr-3_3v")) host->caps |= MMC_CAP_3_3V_DDR; if (device_property_read_bool(dev, "mmc-ddr-1_8v")) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index b3fa193de846..f5ae1f13a867 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -2047,6 +2047,11 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend) err = mmc_deselect_cards(host); if (!err) { + if (host->cqe_enabled && + (host->pm_caps & MMC_PM_CQE_OFF_IN_SUSPEND)) { + host->cqe_ops->cqe_disable(host); + host->cqe_enabled = false; + } mmc_power_off(host); mmc_card_set_suspended(host->card); } diff --git a/include/linux/mmc/pm.h b/include/linux/mmc/pm.h index 3549f8045784..3dd1046f2c8f 100644 --- a/include/linux/mmc/pm.h +++ b/include/linux/mmc/pm.h @@ -23,5 +23,6 @@ typedef unsigned int mmc_pm_flag_t; #define MMC_PM_KEEP_POWER (1 << 0) /* preserve card power during suspend */ #define MMC_PM_WAKE_SDIO_IRQ (1 << 1) /* wake up host system on SDIO IRQ assertion */ +#define MMC_PM_CQE_OFF_IN_SUSPEND (1 << 2) /* cqe off during suspend */ #endif /* LINUX_MMC_PM_H */