From patchwork Thu Oct 18 09:59:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seungwon Jeon X-Patchwork-Id: 1609381 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 34E9FDFB34 for ; Thu, 18 Oct 2012 09:59:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754893Ab2JRJ7l (ORCPT ); Thu, 18 Oct 2012 05:59:41 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:16669 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753275Ab2JRJ7l (ORCPT ); Thu, 18 Oct 2012 05:59:41 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MC3008202FFLE20@mailout1.samsung.com> for linux-mmc@vger.kernel.org; Thu, 18 Oct 2012 18:59:39 +0900 (KST) X-AuditID: cbfee61a-b7f976d000001eb9-85-507fd30b6f0f Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 2E.D8.07865.B03DF705; Thu, 18 Oct 2012 18:59:39 +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 <0MC300LGZ2FFL7F0@mmp2.samsung.com> for linux-mmc@vger.kernel.org; Thu, 18 Oct 2012 18:59:39 +0900 (KST) From: Seungwon Jeon To: linux-mmc@vger.kernel.org Cc: =?utf-8?Q?'Heiko_St=C3=BCbner'?= , 'Chander Kashyap' , 'Chris Ball' References: In-reply-to: Subject: [PATCH] mmc: sdhci-s3c: fix the card detection in runtime-pm Date: Thu, 18 Oct 2012 18:59:39 +0900 Message-id: <004801cdad17$498d9140$dca8b3c0$%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: Ac2tFmfkaBRK1jYGT5i9FMWwA6u/7AAAB/ag Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNLMWRmVeSWpSXmKPExsVy+t9jQV3uy/UBBst3q1oc+d/P6MDo8XmT XABjFJdNSmpOZllqkb5dAlfGtKkb2Ar6OSr6tp9ibWB8wdbFyMkhIWAisePofhYIW0ziwr31 QHEuDiGB6YwSW9buY4VwZjFJbL/aDdbBJqAl8ffNG2YQW0RAVuLnnwtgHcwC7YwSB3+1s3cx cgB1cEusbg4CqeEU4JFY96cTrF5YwFXi6NbH7CA2i4CqxMSvc8Fm8grYSmx/1w9lC0r8mHyP BWQMs4C6xJQpuSBhZgF5ic1r3jKDhCWAwo/+6kJcYCSxecZ2VogSEYl9L94xTmAUmoVk0CyE QbOQDJqFpGMBI8sqRtHUguSC4qT0XEO94sTc4tK8dL3k/NxNjOAgfia1g3Flg8UhRgEORiUe 3ks99QFCrIllxZW5hxglOJiVRHhXbgIK8aYkVlalFuXHF5XmpBYfYpTmYFES5232SAkQEkhP LEnNTk0tSC2CyTJxcEo1MJ6J/sP5/0uJzMXLhoa/rv177vy9NnJjkeyVpcppbI2T7Z5ayvBF h0bcDzr29O5vGTXjetakF3qy1tfVTh01yP3LdLPZejfD5zULAz0cGn5abktbG3ioUSV3oteP tdX3g9Mq68NPHtlazudcfH3Gm5CM2VdZ77k4hE7WZX32MOos78VvbjNuxSqxFGckGmoxFxUn AgBgVADFXgIAAA== 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 --- 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 2903949..e57f200 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(sc->clk_io); + if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL) + clk_disable(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_enable(sc->clk_io); + if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL) + clk_enable(sc->clk_io); #endif sdhci_remove_host(host, 1);