Raspberry Pi Compute Module
Martin Sperl
martin at sperl.org
Fri Aug 28 02:14:54 PDT 2015
> On 27.08.2015, at 20:09, Martin Sperl <martin at sperl.org> wrote:
>
>
>
>> On 27.08.2015, at 20:04, Martin Sperl <martin at sperl.org> wrote:
>>
>>
>>
>>> On 27.08.2015, at 18:11, Stephen Warren <swarren at wwwdotorg.org>
>>>> Compiling the kernel with mmc as module plus mmc-debug enabled gives the
>>>> below:
>>>> after loading the driver:
>>> ...
>>>> [ 69.432782] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21
>>>> width 0 timing 0
>>>
>>> ... lot of working commands ...
>>>
>>>> [ 69.499732] mmc0: clock 25000000Hz busmode 2 powermode 2 cs 0 Vdd 21
>>>> width 0 timing 0
>>>
>>> (up until now, the clock has always be 400KHz, not it's 25MHz)
>>>
>>>> [ 69.499854] mmc0: starting CMD6 arg 03a10101 flags 0000049d
>>>> [ 69.499924] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00038000
>>>> [ 69.499982] mmc0: req failed (CMD6): -110, retrying...
>>>> [ 69.500041] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00038000
>>>> [ 69.500091] mmc0: req failed (CMD6): -110, retrying...
>>>> [ 69.500146] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00038000
>>>> [ 69.500188] mmc0: req failed (CMD6): -110, retrying...
>>>> [ 69.500251] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00038000
>>>> [ 69.500300] mmc0: req done (CMD6): -110: 00000000 00000000 00000000
>>>> 00000000
>>>> [ 69.500345] mmc0: error -110 whilst initialising MMC card
>>>
>>> My guess it that the clock rate change caused this, not the CMD6 itself?
>>
>> I saw a patch for one device that required more delay (in the order of 100us) between cmd13 and cmd6 - can't pinpoint it right now...
>>
>> But then logging would add some delays, but maybe not enough...
>>
>> Maybe changing clock to 400khz would allow access to the device - even if it is slow...
>>
>> Can we configure that with the device tree, just to see if it makes a difference?
>>
> See here: https://lkml.org/lkml/2014/9/9/382
> for one device that required it…
I tried to add a delay in that location mentioned in the above patch, but it does not help!
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 0e9ae1c..2a6a912 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -530,6 +530,8 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8
if (!use_busy_signal)
goto out;
+ msleep(1);
+
/*
* CRC errors shall only be ignored in cases were CMD13 is used to poll
* to detect busy completion.
Also note that I have tried to force a slow transfer speed via the device-tree,
but it did not help either - it still uses 25MHz...
Here the device-tree for sdhci - taken after all the modifications:
sdhci at 7e300000 {
reg = <0x7e300000 0x100>;
interrupts = <0x2 0x1e>;
compatible = "brcm,bcm2835-sdhci";
bus-width = <0x4>;
clocks = <0xc>;
status = "okay”;
/* local modifications after it did not work */
max-frequency = <0x61a80>; /* 400000 */
mmc-hs200-1_8v;
mmc-hs400-1_8v;
non-removable;
};
Martin
More information about the linux-rpi-kernel
mailing list