On Mon, 2015-05-18 at 21:49 -0500, Lu Yangbo-B47093 wrote: > > > > -----Original Message----- > > From: Wood Scott-B07421 > > Sent: Tuesday, May 19, 2015 10:28 AM > > To: Lu Yangbo-B47093 > > Cc: Ulf Hansson; linux-mmc; Chris Ball > > Subject: Re: [PATCH v2, 2/2] mmc: sdhci-pltfm: enable interrupt mode to > > detect card > > > > On Mon, 2015-05-18 at 21:16 -0500, Lu Yangbo-B47093 wrote: > > > > > > > > > > -----Original Message----- > > > > From: Wood Scott-B07421 > > > > Sent: Tuesday, May 19, 2015 4:43 AM > > > > To: Lu Yangbo-B47093 > > > > Cc: Ulf Hansson; linux-mmc; Chris Ball > > > > Subject: Re: [PATCH v2, 2/2] mmc: sdhci-pltfm: enable interrupt mode > > > > to detect card > > > > > > > > On Mon, 2015-05-18 at 04:55 -0500, Lu Yangbo-B47093 wrote: > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > From: Ulf Hansson [mailto:ulf.hansson@xxxxxxxxxx] > > > > > > Sent: Monday, May 18, 2015 5:50 PM > > > > > > To: Lu Yangbo-B47093 > > > > > > Cc: linux-mmc; Chris Ball; Wood Scott-B07421 > > > > > > Subject: Re: [PATCH v2, 2/2] mmc: sdhci-pltfm: enable interrupt > > > > > > mode to detect card > > > > > > > > > > > > Those platforms could still update their DT files and add > > > > > > "broken-cd", since that would be the proper description of the HW. > > > > > > Once that's done, it would enable you to remove the > > > > > > SDHCI_QUIRK_BROKEN_CARD_DETECTION as default, right? > > > > > > > > > > > Yes, and if remove SDHCI_QUIRK_BROKEN_CARD_DETECTION as default, > > > > 'borken-cd' would be needed to be added for most platforms using > > esdhc. > > > > > > > > I was OK with changing the device tree if it just meant that things > > > > that previously didn't work now work. I'm not OK with requiring the > > > > device trees to change in order for things that already work to stay > > working. > > > > > > > > In general it is not reasonable to expect device trees to enumerate > > > > hardware bugs since the bugs (or the need to work aronud them) are > > > > often discovered after the device tree has been created. > > > > > > > > Yangbo, when I asked why you couldn't use SVR you said that it was a > > > > common SDHC file. But, the file that sets > > > > SDHCI_QUIRK_BROKEN_CARD_DETECTION in the first place is > > > > sdhci-of-esdhc.c which is Freescale-specific. Why not just test SVR > > > > in there to determine whether the quirk should be set? > > > Thanks Scott. > > > The SVR testing could be only used for PPC. It doesn’t support ARM that > > we will use. > > > I think using the dts should be better way. > > > > None of the chips that this patch looks for are ARM chips. Are you're > > saying our ARM chips don't have any form of identification? Even if > > that's the case, there's nothing wrong with looking at the device tree; > > it's changing the device tree that I'm objecting to if there's an > > alternative. > > > > In any case, I don't know why these checks are being added to common code > > rather than sdhci-of-esdhc.c. > > > Scott, I know what you mean now. > What about moving these checks to sdhci-of-esdhc and still using dts? The only thing I'm strongly opposed to is requiring chips that are already working to add broken-cd to their device trees to continue working. I'd rather see SVR be used, as we do for errata in other devices, but assuming the chips affected by this patch have never had this feature work I'm not insisting on it. > I know the SVR checks is from <asm/mpc85xx.h> and we will need to check > ARM architecture like LS2085A later although it hasn't been exist on > upstream now. Again, ARM can use the device tree (ESDHC isn't described in the upstream LS2085A device tree yet, and the internal one already has "fsl,ls2085a-esdhc"). And looking at the manual, LS2085A *does* have SVR. You'd need to read it from the DCFG block rather than a core register, but it's there. -Scott -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html