From patchwork Tue Oct 30 05:28:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seungwon Jeon X-Patchwork-Id: 1668351 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id AFC5CDF2AB for ; Tue, 30 Oct 2012 05:28:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753769Ab2J3F2j (ORCPT ); Tue, 30 Oct 2012 01:28:39 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:53400 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753740Ab2J3F2i (ORCPT ); Tue, 30 Oct 2012 01:28:38 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MCO004VWXVDISM0@mailout1.samsung.com> for linux-mmc@vger.kernel.org; Tue, 30 Oct 2012 14:28:37 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-94-508f65852a3c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id DB.1A.12699.5856F805; Tue, 30 Oct 2012 14:28:37 +0900 (KST) Received: from DOTGIHJUN01 ([12.23.118.161]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MCO000ZNXVOEI30@mmp2.samsung.com> for linux-mmc@vger.kernel.org; Tue, 30 Oct 2012 14:28:37 +0900 (KST) From: Seungwon Jeon To: linux-mmc@vger.kernel.org Cc: linux-mmc@vger.kernel.org, 'Chris Ball' , =?utf-8?Q?'Heiko_St=C3=BCbner'?= , 'Chander Kashyap' References: <004801cdad17$498d9140$dca8b3c0$%jun@samsung.com> <201210181302.30843.heiko@sntech.de> <006501cdadd0$548d1f70$fda75e50$%jun@samsung.com> <201210191010.48776.heiko@sntech.de> <87liepq8qo.fsf@octavius.laptop.org> In-reply-to: <87liepq8qo.fsf@octavius.laptop.org> Subject: [PATCH v2 2/2] mmc: sdhci-s3c: fix the card detection in runtime-pm Date: Tue, 30 Oct 2012 14:28:36 +0900 Message-id: <00b001cdb65f$6958fb80$3c0af280$%jun@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac22GroG+UzmKnffTGOGSfi7AOOgAAAKFCkg Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDLMWRmVeSWpSXmKPExsVy+t9jQd3W1P4AgxuLOC2O/O9ndGD0+LxJ LoAxissmJTUnsyy1SN8ugSvj8NcN7AVnOSoapj9jbmBcwN7FyMkhIWAiMfX/ZFYIW0ziwr31 bF2MXBxCAtMZJW5s+s0I4cxiklh1sYEFpIpNQEvi75s3zCC2iICsxM8/F8A6mAWWMEo87dvB BNHxhFFi29Y1YB2cAoYSc68+ZASxhQV8JGYc3Qm2j0VAVeLcloVgk3gFbCVW39jPBmELSvyY fA+olwNoqrrElCm5IGFmAXmJzWveMoOEJYDCj/7qgpgiAkYS76fkQVSISOx78Y5xAqPQLCRz ZiHMmYVkziwkHQsYWVYxiqYWJBcUJ6XnGukVJ+YWl+al6yXn525iBIfxM+kdjKsaLA4xCnAw KvHwblzTFyDEmlhWXJl7iFGCg1lJhDffuz9AiDclsbIqtSg/vqg0J7X4EKM0B4uSOG+zR0qA kEB6YklqdmpqQWoRTJaJg1OqgdFNxPaywuqvoW+eFTIV9myV6vyyVGNRnY7KldBdAiq3v0za HVpYubn6N7fpuWvCZtpS2vaCj0RFjqSdWLXt72GVtU+sjn3h3nM/K6zU/dSsnzO+TjH7eb1T TEgoYtJ9gR/b9dLzo3k9ChgL3K0e2IRln2remT69f839ft+ojh+Wn1qNPu98cEGJpTgj0VCL uag4EQCi/icAXwIAAA== Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org If host clock is disabled, host cannot detect a card in case of using CD internal for detection. Signed-off-by: Seungwon Jeon --- Rebased with mmc-next. drivers/mmc/host/sdhci-s3c.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index a79b153..d680c0b 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -747,7 +747,8 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) sdhci_s3c_setup_card_detect_gpio(sc); #ifdef CONFIG_PM_RUNTIME - clk_disable_unprepare(sc->clk_io); + if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL) + clk_disable_unprepare(sc->clk_io); #endif return 0; @@ -794,7 +795,8 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev) gpio_free(sc->ext_cd_gpio); #ifdef CONFIG_PM_RUNTIME - clk_prepare_enable(sc->clk_io); + if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL) + clk_prepare_enable(sc->clk_io); #endif sdhci_remove_host(host, 1);