Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754607AbcKYNBe (ORCPT ); Fri, 25 Nov 2016 08:01:34 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:36045 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751634AbcKYNBJ (ORCPT ); Fri, 25 Nov 2016 08:01:09 -0500 MIME-Version: 1.0 In-Reply-To: <76ce72f8-4b86-3b83-544f-b9a7ef871393@marvell.com> References: <0390e7a05b6163deabb545f93729ea615eeaaee2.1477911954.git-series.gregory.clement@free-electrons.com> <76ce72f8-4b86-3b83-544f-b9a7ef871393@marvell.com> From: Ulf Hansson Date: Fri, 25 Nov 2016 14:01:04 +0100 Message-ID: Subject: Re: [PATCH 6/10] mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality To: Ziji Hu Cc: Adrian Hunter , Gregory CLEMENT , "linux-mmc@vger.kernel.org" , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Rob Herring , "devicetree@vger.kernel.org" , Thomas Petazzoni , "linux-arm-kernel@lists.infradead.org" , Jimmy Xu , Jisheng Zhang , Nadav Haklai , Ryan Gao , Doug Jones , Victor Gu , "Wei(SOCP) Liu" , Wilson Ding , Romain Perier , Yehuda Yitschak , Marcin Wojtas , Hanna Hawa , Kostya Porotchkin , "linux-kernel@vger.kernel.org" , Zhen Huang Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2224 Lines: 56 [...] >> >> Moreover, we have ->enable_sdio_irq() ops that deals with this. >> > Yes. I mean the SDIO irqs on DAT1 line in async mode. > This field enables our host to recognize the async SDIO irq from SDIO device. > It controls our host side behavior, other than the SDIO device. > > I think ->enable_sdio_irq() is a more reasonable place to put this workraound. > I will export sdhci_enable_sdio_irq() and implement out host own > enable_sdio_irq() calling sdhci_enable_sdio)irq() plus this workaround. > Does it sound reasonable to you? Yes. [...] >> >> Got it. Although I think we can cope with that fine just by using the >> different SD/eMMC speed modes settings defined in DT (or from the >> SDHCI caps register) >> > In my very opinion, I'm not sure if there is any corner case that driver cannot > determine the eMMC card type from DT and SDHC caps. > >>> Unfortunately, MMC driver cannot determine the card type yet when eMMC voltage >>> setting should be executed. >>> Thus an flag is required here to tell driver to execute eMMC voltage setting. >>> >>> Besides, additional eMMC specific settings might be implemented in future, besides >>> voltage setting. Most of them should be completed before MMC driver recognizes the >>> card type. Thus I have to keep this flag to indicate current SDHC is for eMMC. >> >> I doubt you will need a generic "eMMC" flag, but let's see when we go forward. >> >> Currently it's clear you don't need such a flag, so I will submit a >> change adding a DT binding for "mmc-ddr-3_3v" then we can take it from >> there, to see if it suits your needs. >> > > Actually, our eMMC is usually fixed as 1.8V. > > The pair "no-sd" + "no-sdio" can provide the similar information. > But I'm not sure if it is proper to use those two property in such a way. Well, potentially those could be used like that. The point of why we added them was to allow hosts that don't support the different protocols (which is somewhat true for your case, because of signal voltage issues) to tell the mmc core about it. That instead of having to all kind of crazy hacks in the drives, that in then didn't work out so well. Kind regards Uffe