Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755534AbcKVITl (ORCPT ); Tue, 22 Nov 2016 03:19:41 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:46934 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752817AbcKVITj (ORCPT ); Tue, 22 Nov 2016 03:19:39 -0500 X-AuditID: cbfee61a-f79916d0000062de-61-5833ff93ac4d Subject: Re: [PATCH] ARM: dts: exynos: remove the cd-gpios property for eMMC of odroid-xu3/4 To: Andrzej Hajda , Krzysztof Kozlowski References: <20161121071032.10183-1-jh80.chung@samsung.com> <20161121170605.GA8181@kozik-lap> <9ecce088-b91d-d51a-5a19-33476961d2ea@samsung.com> <7e072e61-0a14-ebee-03ac-2eff4f029848@samsung.com> Cc: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kgene@kernel.org, cw00.choi@samsung.com, robh+dt@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, m.szyprowski@samsung.com, jy0922.shim@samsung.com From: Jaehoon Chung Message-id: <00c4e163-98ed-fcc5-2248-22c697967032@samsung.com> Date: Tue, 22 Nov 2016 17:19:30 +0900 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-version: 1.0 In-reply-to: <7e072e61-0a14-ebee-03ac-2eff4f029848@samsung.com> Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFIsWRmVeSWpSXmKPExsVy+t9jAd3J/40jDJZek7a4te4cq8X7ZT2M Fte/PGe1mH8EyH1x7yKLRf/j18wW589vYLe4vGsOm8WM8/uYLNYeuctusfT6RSaL1r1H2C1e fjzB4sDrsWbeGkaPTas62Tz6tqxi9Pi8SS6AJcrNJiM1MSW1SCE1Lzk/JTMv3VYpNMRN10JJ IS8xN9VWKULXNyRISaEsMacUyDMyQAMOzgHuwUr6dgluGR/WLmIreC5WseGlUQPjVqEuRk4O CQETifMtM9ggbDGJC/fWA9lcHEICSxkl/s2fywThPGCU+LqhjQmkSlggTmLlpsesILaIgJ/E 96U/oYrmMkmsP3CAGSTBLDCTSaJvjyCIzSagI7H923GgIg4OXgE7iV2La0HCLAKqEl8mdrCD hEUFwiSeNzqBhHkFBCV+TL7HAmJzCthLbOt8wQpSwiygLjFlSi7EcHmJzWveMk9gFJiFpGMW QtUsJFULGJlXMUqkFiQXFCel5xrmpZbrFSfmFpfmpesl5+duYgTH4zOpHYwHd7kfYhTgYFTi 4T1x0jhCiDWxrLgy9xCjBAezkgjv019AId6UxMqq1KL8+KLSnNTiQ4ymQF9MZJYSTc4Hpoq8 knhDE3MTc2MDC3NLSxMjJXHextnPwoUE0hNLUrNTUwtSi2D6mDg4pRoYOdL4rQ4JL15zXorF tfHrI8ENxg09dRw9KQ/7Si3c9V/03fyv9Ve94OHCXpnN4mK3NbbaZGn9en2+ZEbe7avuOqHT v7Tel2neIbxYPEdLac937lr3mq9hXiU/d9/M6TyhJL78hM/ambfYXZ1vz5fjNny0+izz4lUs mfl562LsRJQEeFt95/IosRRnJBpqMRcVJwIAcmWnhd0CAAA= X-MTR: 20000000000000000@CPGS Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2829 Lines: 88 On 11/22/2016 04:51 PM, Andrzej Hajda wrote: > On 22.11.2016 02:24, Jaehoon Chung wrote: >> On 11/22/2016 02:06 AM, Krzysztof Kozlowski wrote: >>> On Mon, Nov 21, 2016 at 04:10:32PM +0900, Jaehoon Chung wrote: >>>> Odroid-xu3/4 didn't need to use the cd-gpios for detecting card. >>>> Because Host controller has the CDETECT register through SDx_CDN line. >>>> Host controller can know whether card is inserted or not with this >>>> register. >>>> >>>> When i have checked the Odroid-xu3/4, they are using CDETECT register. >>>> (Not using exteranl cd-gpio.) >>> Makes sense. Just one question: the sd0_cd pinctrl setting should stay, >>> right? >> Right, It needs to use SD0_CD function. >> I have tested on Odroid-XU3/XU4. >> >> Tested with the below cases. >> >> 1) On boot with SD-card (without eMMC) >> - Inserted eMMC : Detected >> - Removed eMMC : Detected >> >> 2) On boot with Sd-card (with eMMC) >> - Detected >> >> 3) On boot with eMMC >> - Detected > > I suspect that MMC device (or its parts) should be always awake to keep > working CDETECT register. With cd-gpio it should be possible to power it > off when unused but still having detection working, am I right? I am not > familiar enough with the code to be certain that it improves PM but it > could be the case. CDETECT register is used only "card is present or not". not needs to keep power.. > > My other question is about polling thread, original patch was developed > to avoid polling thread which caused occasional hangs, crashes and > unnecessary work. Since then lot of mmc code changed and I do not follow > these changes. So my question is if this patch will not re-enable polling? This patch didn't use polling scheme. It just uses the CDETECT register for detecting. And Host controller has enabled the Card detect bit at INTMSK register. (For interrupt handling) Best Regards, Jaehoon Chung > > Regards > Andrzej > >> >> Best Regards, >> Jaehoon Chung >> >>> Best regards, >>> Krzysztof >>> >>>> Fixes: fb1aeedb61ad ("ARM: dts: add mmc detect gpio for exynos5422-odroidxu3") >>>> Signed-off-by: Jaehoon Chung >>>> --- >>>> arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 1 - >>>> 1 file changed, 1 deletion(-) >>>> >>>> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi >>>> index 9e63328..05b9afdd 100644 >>>> --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi >>>> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi >>>> @@ -510,7 +510,6 @@ >>>> &mmc_0 { >>>> status = "okay"; >>>> mmc-pwrseq = <&emmc_pwrseq>; >>>> - cd-gpios = <&gpc0 2 GPIO_ACTIVE_LOW>; >>>> card-detect-delay = <200>; >>>> samsung,dw-mshc-ciu-div = <3>; >>>> samsung,dw-mshc-sdr-timing = <0 4>; >>>> -- >>>> 2.10.1 >>>> >>> >>> >> >> > > >