From patchwork Fri Apr 28 02:34:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hu Ziji X-Patchwork-Id: 9703835 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 0CCD760225 for ; Fri, 28 Apr 2017 02:36:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3FC32849A for ; Fri, 28 Apr 2017 02:36:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E71212860B; Fri, 28 Apr 2017 02:36:52 +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 7AC862849A for ; Fri, 28 Apr 2017 02:36:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968550AbdD1Cgv (ORCPT ); Thu, 27 Apr 2017 22:36:51 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:56222 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967136AbdD1Cgv (ORCPT ); Thu, 27 Apr 2017 22:36:51 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v3S2YZYm029070; Thu, 27 Apr 2017 19:36:50 -0700 Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2a04hmebe9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 27 Apr 2017 19:36:49 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Thu, 27 Apr 2017 19:36:48 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Thu, 27 Apr 2017 19:36:48 -0700 Received: from ubuntu (unknown [10.38.164.107]) by maili.marvell.com (Postfix) with ESMTP id 52A463F703F; Thu, 27 Apr 2017 19:36:45 -0700 (PDT) Date: Fri, 28 Apr 2017 10:34:59 +0800 From: Hu Ziji To: , , CC: , , , , , , , , , , , , Subject: [PATCH -next 1/2] mmc: sdhci-xenon: Fix the work flow in xenon_remove(). Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-04-28_02:, , signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1704280038 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_remove_host() might execute SOFT_RESET_ALL. Inside xenon_remove(), Xenon SDHC should be enabled during sdhci_remove_host(). Move xenon_sdhc_unprepare after sdhci_remove_host() such that Xenon SDHC is disabled after sdhci_remove_host() completes. Signed-off-by: Hu Ziji Reported-by: Jisheng Zhang Tested-by: Jisheng Zhang Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-xenon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c index 3b82a0b..786c3ed 100644 --- a/drivers/mmc/host/sdhci-xenon.c +++ b/drivers/mmc/host/sdhci-xenon.c @@ -514,10 +514,10 @@ static int xenon_remove(struct platform_device *pdev) xenon_clean_phy(host); - xenon_sdhc_unprepare(host); - sdhci_remove_host(host, 0); + xenon_sdhc_unprepare(host); + clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev);