From patchwork Tue Jul 12 07:46:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 9224757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 23FCE604DB for ; Tue, 12 Jul 2016 08:09:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15E5B2236A for ; Tue, 12 Jul 2016 08:09:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A40927CF9; Tue, 12 Jul 2016 08:09:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D1CC2236A for ; Tue, 12 Jul 2016 08:09:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750986AbcGLIJ3 (ORCPT ); Tue, 12 Jul 2016 04:09:29 -0400 Received: from mail-bl2nam02on0083.outbound.protection.outlook.com ([104.47.38.83]:57269 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750930AbcGLIJ0 (ORCPT ); Tue, 12 Jul 2016 04:09:26 -0400 Received: from BN3PR0301CA0010.namprd03.prod.outlook.com (10.160.180.148) by CY1PR0301MB0780.namprd03.prod.outlook.com (10.160.160.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.528.16; Tue, 12 Jul 2016 07:54:47 +0000 Received: from BN1AFFO11FD044.protection.gbl (2a01:111:f400:7c10::105) by BN3PR0301CA0010.outlook.office365.com (2a01:111:e400:4000::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.534.14 via Frontend Transport; Tue, 12 Jul 2016 07:54:46 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; gmail.com; dkim=none (message not signed) header.d=none; gmail.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD044.mail.protection.outlook.com (10.58.52.191) with Microsoft SMTP Server (TLS) id 15.1.534.7 via Frontend Transport; Tue, 12 Jul 2016 07:54:45 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u6C7rxtl002725; Tue, 12 Jul 2016 00:54:43 -0700 From: Dong Aisheng To: CC: , , , , , , , Subject: [PATCH V2 14/15] mmc: sdhci-esdhci-imx: re-initialize hw state after resume Date: Tue, 12 Jul 2016 15:46:23 +0800 Message-ID: <1468309584-3591-15-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1468309584-3591-1-git-send-email-aisheng.dong@nxp.com> References: <1468309584-3591-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131127836861988288; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(33646002)(106466001)(68736007)(105606002)(5003940100001)(92566002)(19580405001)(85426001)(229853001)(2351001)(110136002)(87936001)(81166006)(2906002)(4326007)(76176999)(356003)(586003)(189998001)(50986999)(50466002)(8676002)(86362001)(8666005)(77096005)(2950100001)(305945005)(104016004)(6806005)(19580395003)(81156014)(230783001)(97736004)(8936002)(50226002)(36756003)(48376002)(47776003)(7846002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB0780; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD044; 1:jPHK52zaR7Ds/P097biHs53T0N8xGVDMtobqOfh+EIf/tUxp53DyWpRY3x5EaZjoBIDphV68+o8UYLL/0nq+h6Ffu9nXOcMbkqlu3x+fyyh1pjRHylG/C7ID+23wwonA5x3jnqwNe/awlxsxzFu4UVqFz/HdzxV3OHhyrYjHKkpnTFJ2C3VoGq792IHP4pg5gIgTuKoWKjTkDoTiybhSqQZ/OTApjQ/cQELJJO/Jg/6+VwLtvKr62InnimeNi11d0QyFUwmC35FwullOJsWj6yiOe9iLOO7//ctqjWGBiizC1O6v8jcTzwGrpKel8HkMmEro59HSmtCuLf/Y3t+1MmmkEjFoznuD8/KgE+1nIMXpFsZQbYLYJC6Q0RvECrQq5kVw64JoEXhbj/Vq0t9/VNVdJJ3s4o8ipsIDr9sT3QHZG5fwO6PQFKEbozpuR5EHVFQLcWMxrAsSDVsxdqzwSRwbNdbCNqg6y3OHilA9f6E/D6kMBst3ZyxmAB0YL954rTzLwqsquLaxGTzdm3wVB7SsgvWY8hOiDmErrCCGXuR6En7vvqo5zqTrRtPAuM6TV17qVdALUfCTJPhoW3ZU2Rnza2VCcJy0sArpenik1vXndqWocUjhVtao9cHjP3NYxJv5UfqgHuSRtBtBD2b2KTDVfM7ygwB3FiWvejWrI5Q= MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: ebb140c1-f06f-4f2f-9c5f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tPIRQ3u1sLV5mincVHDV7I/Eq+KeMZf7w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13015025)(13018025)(13024025)(13017025)(13023025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:CY1PR0301MB0780; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR0301MB0780; X-Forefront-PRVS: 0001227049 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB0780; 23:PuPfpmxPlNGpUUEm712KDYdyfseKzKFNW2jP2Tr?= =?us-ascii?Q?Ym2DWkoySCenYKx5cotY0Huaq4f9KQRt4vX67X26hbUbD+53c3dql0FuOJTf?= =?us-ascii?Q?V3hOUNOFobpdK1uh7Avry1LlLOVlOSm2hdHEDmP58bQAYURZJFdDgY76khOr?= =?us-ascii?Q?MAHqcA8cjDn6oKAUt1xMIVZJiMg51KXKoUpC/7X8e6ZgaAIA5D53sT0hyc8s?= =?us-ascii?Q?J/p0XXrCXMhrqFlcbo+PxgI7FlbTMzPzaO5CmMwu/ZSNXUQ6MnzaFtIPh7Wk?= =?us-ascii?Q?6FqjkjTZFQ9b2UlDqZZgPArCQPoGTnWl2v+F2kDG4BVJ1/FqNM6RatEOG3a0?= =?us-ascii?Q?/yaCCY6Fe7+ntWjTyrqT3SoJCbYutDZwUxHElFZCxGRxzoTgTzZ50akGl6Vg?= =?us-ascii?Q?hrv3gtZjiVXveU2hoAuGeEg+zsah7DwzTB3YQ9BIUJzVkuGUXsd4Cbdv0ILx?= =?us-ascii?Q?M638YNojTNLgLOUTG6r3t8oDQWTVlazUZobVzoUQuRufgja6kAkYpIfxj8ZT?= =?us-ascii?Q?Ooz8t1kVSF4m8vtsenT9xwGql8+rUn0JmwiP16NIog47wa3r/IY59Pon3Ns6?= =?us-ascii?Q?e23Xn+VRTQ7ExAi4Y66mgd2EAIPYSy49VW1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6VKveW1IMQZokfWJmhZUtrtq6dAn1BRPpqliFfL09KMTPxiGdj8MyvkAiffuM+/aiuMW5NPjGCtlX5SromJmk5Kqjn59DR6zmbtFpv+JQX2r1Y=; 24:xRtAMEPMZZ9IvmNa6sXAJGdJuy3QakKwI476jIJnDokM4vzkI+3/WI+oTbRtHCVqsgGGQcPhDFecUdggX/C4S403cXerpH1Sy3Zc37iyaAM=; 7:MqRm59E5w7xH2R06p2iO0Y/OsiGrruukh6Cn6mcaItcQQOdU1FldF215GTy2rEgNjO5ZAi4z7JuGJwi3lI5HGbP4dbcYbD57Uzit3/rMMA/3iN6aa5UpO62pQ1Rkm0890RxJURkI/4PP7IgaoxV3RTdzvZSwr42vS18eO0scXmdq8ys4pr8qWrtDzpKpgc4HkpGl1zSzjlfrhrEp2r3JmtZ+85uAm5F3z6MJIz+O4quBDSogbNGheoODVsyuQBf+ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2016 07:54:45.9960 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB0780 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP sdhci_esdhc_imx_hwinit() includes all basic hw intialization. Calling it after resume to re-initialize hw in case its state is already lost in low power mode. Signed-off-by: Dong Aisheng Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-esdhc-imx.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index c5adf4ba4066..e5b5d1c3eb01 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1297,12 +1297,9 @@ static int sdhci_esdhc_suspend(struct device *dev) static int sdhci_esdhc_resume(struct device *dev) { struct sdhci_host *host = dev_get_drvdata(dev); - struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); - struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host); - /* restore watermark setting in case it's lost in low power mode */ - if (esdhc_is_usdhc(imx_data)) - writel(ESDHC_WTMK_DEFAULT_VAL, host->ioaddr + ESDHC_WTMK_LVL); + /* re-initialize hw state in case it's lost in low power mode */ + sdhci_esdhc_imx_hwinit(host); return sdhci_pltfm_resume(dev); }