On Tue, Feb 11, 2014 at 6:27 PM, Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> wrote: > On Tue, Feb 11, 2014 at 03:33:09PM +0800, Dong Aisheng wrote: >> It depends on both host and card that 1) if host is able to detect >> SDIO interrupts without clock >> and 2) if the card is able to send interrupt to host without clock. >> If any one of both can't do that, we may need to tell host to not >> do runtime suspend to prevent the clock from being disabled. >> Or the SDIO interrupt may not work. >> >> The IMX esdhc/usdhc can not detect the SDIO interrupts sent from card >> if the clock is disabled. >> So we need such quirk to not allow runtime PM for SDIO cards. >> Doesn't it make sense? > > That's strange. I have it working as of last night. > > Yes, I have to leave the AHB clock on so that the registers are readable, > in the interrupt handler, and that's something I only do if the SDIO > interrupt is enabled, but everything else gets disabled. > The ahb, ipg and per of usdhc are using the same clock. Looking at arch/arm/boot/dts/imx6qdl.dtsi usdhc2: usdhc@02194000 { compatible = "fsl,imx6q-usdhc"; reg = <0x02194000 0x4000>; interrupts = <0 23 0x04>; clocks = <&clks 164>, <&clks 164>, <&clks 164>; clock-names = "ipg", "ahb", "per"; bus-width = <4>; status = "disabled"; }; That means enabling of ahb clock actually will make ipg and per also open. Then card interrupts can be detected well. You can measure the card clock(pin5) with a scope to double check it. Regards Dong Aisheng > -- > FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up. Estimation > in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad. > Estimate before purchase was "up to 13.2Mbit". -- 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