From patchwork Fri Mar 9 06:10:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 10269749 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 B9EFC602BD for ; Fri, 9 Mar 2018 06:10:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F85329CC6 for ; Fri, 9 Mar 2018 06:10:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9469B29D13; Fri, 9 Mar 2018 06:10:28 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 7AE6829CC6 for ; Fri, 9 Mar 2018 06:10:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750937AbeCIGK0 (ORCPT ); Fri, 9 Mar 2018 01:10:26 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:25258 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750932AbeCIGKZ (ORCPT ); Fri, 9 Mar 2018 01:10:25 -0500 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20180309061024epoutp01fd42145cf6de85f3744c3c1f68d88c14~aK6fYQMj72419324193epoutp01v; Fri, 9 Mar 2018 06:10:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20180309061024epoutp01fd42145cf6de85f3744c3c1f68d88c14~aK6fYQMj72419324193epoutp01v DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1520575824; bh=I4/7koquQSRGkKJPwPYPfO8XMwTPaoJbIF5s+rkf2mE=; h=From:To:Cc:Subject:Date:References:From; b=pjx/tPzwB3ry0TuemDL5Y+2wzCvj4trQ0IAQAvhi+6Trn3e1n3DhLW/Zo5mE8mHqX owSEcuxFkCzRD22lfcTsxGltB6Sh9QVt00SGNcbGmIA5EnVA+7xXsPrmzbYpv5p8mg 6o0/p3Rwh53r+Oz0aD3b4EvKIWKtWsgnjpXj12QQ= Received: from epsmges2p2.samsung.com (unknown [182.195.40.66]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20180309061023epcas1p4dab86fdd24480ad6aaf4bbe939b0e1f3~aK6e3HIka0823108231epcas1p4H; Fri, 9 Mar 2018 06:10:23 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 98.08.04137.F4522AA5; Fri, 9 Mar 2018 15:10:23 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20180309061022epcas2p11d7dddcee270d154a6c0f2c6912f89df~aK6eEwOKN2633526335epcas2p1C; Fri, 9 Mar 2018 06:10:22 +0000 (GMT) X-AuditID: b6c32a46-3a9ff70000001029-33-5aa2254fca5f Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 08.37.03890.E4522AA5; Fri, 9 Mar 2018 15:10:22 +0900 (KST) Received: from localhost.localdomain ([10.113.63.79]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P5B00LHO7TA4L60@mmp1.samsung.com>; Fri, 09 Mar 2018 15:10:22 +0900 (KST) From: Jaehoon Chung To: linux-mmc@vger.kernel.org Cc: ulf.hansson@linaro.org, krzk@kernel.org, shawn.lin@rock-chips.com, cw00.choi@samsung.com, Jaehoon Chung Subject: [PATCH] mmc: dw_mmc: exynos: fix the suspend/resume issue for exynos5433 Date: Fri, 09 Mar 2018 15:10:21 +0900 Message-id: <20180309061021.9882-1-jh80.chung@samsung.com> X-Mailer: git-send-email 2.15.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprGKsWRmVeSWpSXmKPExsWy7bCmma6/6qIog1c9MhbXvzxntbjxq43V 4vz5DewWR/73M1rcebKe1eL42nAHNo9NqzrZPO5c28Pm8XfWfhaPvi2rGD0+b5ILYI1KtclI TUxJLVJIzUvOT8nMS7dV8g6Od443NTMw1DW0tDBXUshLzE21VXLxCdB1y8wBOkBJoSwxpxQo FJBYXKykb2dTlF9akqqQkV9cYqsUbWhopGdoYK5nZGSkZ2Ica2VkClSSkJox58F9xoIO9oqe B8uYGhi/sHYxcnJICJhIdG78xdzFyMUhJLCDUeLm37tsEM53RonHl4+ydDFygFVtbQyEiO8G ih/pQihav2kqM8goNgEdie3fjjOB2CICshI//1wAK2IWaGOUaNt5FWyfsECwxIzuhWA2i4Cq xJ+VX9hBbF4BK4lNP6+zQ9wkLzFhSxMLSLOEwEtWiZN3/7FCnOEi8e1YGESNsMSr41ug6qUl nq3ayAhhtzNKnJ0tDNE7hVFixYxuJoiEscSzhV1gNrMAn0TH4b/sEDN5JTrahCBKPCSOzf7I DGE7SvxaPg9svpBArMSVt8dZJjBKLmBkWMUollpQnJueWmxUYKRXnJhbXJqXrpecn7uJEZwm tNx2MC4553OIUYCDUYmH18JlYZQQa2JZcWXuIUYJDmYlEd5TK4FCvCmJlVWpRfnxRaU5qcWH GE2BwTGRWUo0OR+YwvJK4g1NLA1MzMyMzM0sgClAnLc1wCVKSCA9sSQ1OzW1ILUIpo+Jg1Oq gfGE3cl1VftO/C0psudKbmB5MvvJzHd8iWVyfX9MOpvtJdvPJ2ySn+A1WblCpZOJ95NquHio q04835GTq52XyKnvPzSz6IKpovPBuk2fkqe8XFnm/sl8+/IP61P3BzklHLy9gGnfY5FTP3LY TJO8K/6oRUdGvFu0kDt39V/mWQ9+d1vNW/Ky/pMSS3FGoqEWc1FxIgC9iAReKQMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLJMWRmVeSWpSXmKPExsVy+t9jAV0/1UVRBusvqFtc//Kc1eLGrzZW i/PnN7BbHPnfz2hx58l6Vovja8Md2Dw2repk87hzbQ+bx99Z+1k8+rasYvT4vEkugDWKyyYl NSezLLVI3y6BK2POg/uMBR3sFT0PljE1MH5h7WLk4JAQMJHY2hjYxcjFISSwk1Fi4tV/TF2M nEDOd0aJG/NzQGw2AR2J7d+Og8VFBGQlfv65wAbSwCzQxiixcd8RsISwQLDEjO6FrCA2i4Cq xJ+VX9hBbF4BK4lNP6+D2RIC8hITtjSxTGDkWsDIsIpRMrWgODc9t9iowCgvtVyvODG3uDQv XS85P3cTIzAQth3W6t/B+HhJ/CFGAQ5GJR5eC5eFUUKsiWXFlbmHGCU4mJVEeE+tBArxpiRW VqUW5ccXleakFh9ilOZgURLn5c8/FikkkJ5YkpqdmlqQWgSTZeLglGpg3O0550HWhw/8B69E LbO+pb31HKdyfRbX7aT6LVnpp26E/7u4oH/ln3WMBcJ73559tSMp8Mf/CPl4jk5Xnlnb73z5 fXX9jeS08zbVK71aN3/oMlaa3S1yPiPyXcXjxyL3bOoy2gu1FlRxrtNZIRdSfbMj+tMq20AT RtPds1/tjdGMDL9/3pmzUomlOCPRUIu5qDgRACTfyHUAAgAA X-CMS-MailID: 20180309061022epcas2p11d7dddcee270d154a6c0f2c6912f89df X-Msg-Generator: CA CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20180309061022epcas2p11d7dddcee270d154a6c0f2c6912f89df X-RootMTR: 20180309061022epcas2p11d7dddcee270d154a6c0f2c6912f89df References: 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 Before enabling the clock, dwmmc exynos driver is trying to access the register. Then the kernel panic can be occurred. Signed-off-by: Jaehoon Chung Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi --- drivers/mmc/host/dw_mmc-exynos.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index fa41d9422d57..3dcf15131926 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c @@ -165,9 +165,15 @@ static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing) static int dw_mci_exynos_runtime_resume(struct device *dev) { struct dw_mci *host = dev_get_drvdata(dev); + int ret = 0; + + ret = dw_mci_runtime_resume(dev); + if (ret) + return ret; dw_mci_exynos_config_smu(host); - return dw_mci_runtime_resume(dev); + + return ret; } /**