Redpine card often isn't recognized at mmc_rescan
The Redpine card often doesn't show up during MMC scan. Currently we have plastered it over by rescanning every second, so it eventually shows up - but it's not battery-friendly (see #184) and it doesn't address the actual problem.
When it doesn't work:
[ 1410.401187] mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
[ 1410.401229] mmc1: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0
[ 1410.401256] sdhci-esdhc-imx 30b50000.mmc: change pinctrl state for uhs 0
[ 1410.406789] sdhci-esdhc-imx 30b50000.mmc: Initial signal voltage of 3.3v
[ 1410.428625] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[ 1410.428670] sdhci-esdhc-imx 30b50000.mmc: desired SD clock: 400000, actual: 390625
[ 1410.452644] mmc1: starting CMD52 arg 00000c00 flags 00000195
[ 1410.453010] mmc1: sdhci: IRQ status 0x00018000
[ 1410.453053] mmc1: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[ 1410.453071] mmc1: starting CMD52 arg 80000c08 flags 00000195
[ 1410.453426] mmc1: sdhci: IRQ status 0x00018000
[ 1410.453463] mmc1: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[ 1410.453480] mmc1: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 1 timing 0
[ 1410.453511] sdhci-esdhc-imx 30b50000.mmc: change pinctrl state for uhs 0
[ 1410.453522] sdhci-esdhc-imx 30b50000.mmc: desired SD clock: 400000, actual: 390625
[ 1410.454804] mmc1: starting CMD0 arg 00000000 flags 000000c0
[ 1410.454983] mmc1: sdhci: IRQ status 0x00000001
[ 1410.454992] mmc1: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[ 1410.456263] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[ 1410.456288] sdhci-esdhc-imx 30b50000.mmc: change pinctrl state for uhs 0
[ 1410.456296] sdhci-esdhc-imx 30b50000.mmc: desired SD clock: 400000, actual: 390625
[ 1410.457580] mmc1: starting CMD8 arg 000001aa flags 000002f5
[ 1410.457940] mmc1: sdhci: IRQ status 0x00018000
[ 1410.457980] mmc1: req done (CMD8): -110: 00000000 00000000 00000000 00000000
[ 1410.457996] mmc1: starting CMD5 arg 00000000 flags 000002e1
[ 1410.458351] mmc1: sdhci: IRQ status 0x00018000
[ 1410.458393] mmc1: req failed (CMD5): -110, retrying...
[ 1410.458745] mmc1: sdhci: IRQ status 0x00018000
[ 1410.458787] mmc1: req failed (CMD5): -110, retrying...
[ 1410.459140] mmc1: sdhci: IRQ status 0x00018000
[ 1410.459181] mmc1: req failed (CMD5): -110, retrying...
[ 1410.459534] mmc1: sdhci: IRQ status 0x00018000
[ 1410.459570] mmc1: req done (CMD5): -110: 00000000 00000000 00000000 00000000
[ 1410.459586] mmc1: starting CMD55 arg 00000000 flags 000000f5
[ 1410.459941] mmc1: sdhci: IRQ status 0x00018000
[ 1410.459976] mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 1410.459991] mmc1: starting CMD55 arg 00000000 flags 000000f5
[ 1410.460345] mmc1: sdhci: IRQ status 0x00018000
[ 1410.460381] mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 1410.460396] mmc1: starting CMD55 arg 00000000 flags 000000f5
[ 1410.460750] mmc1: sdhci: IRQ status 0x00018000
[ 1410.460794] mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 1410.460814] mmc1: starting CMD55 arg 00000000 flags 000000f5
[ 1410.461170] mmc1: sdhci: IRQ status 0x00018000
[ 1410.461220] mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 1410.461238] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 1 timing 0
[ 1410.461273] sdhci-esdhc-imx 30b50000.mmc: change pinctrl state for uhs 0
[ 1410.461283] sdhci-esdhc-imx 30b50000.mmc: desired SD clock: 400000, actual: 390625
[ 1410.461307] mmc1: starting CMD1 arg 00000000 flags 000000e1
[ 1410.461664] mmc1: sdhci: IRQ status 0x00018000
[ 1410.461712] mmc1: req done (CMD1): -110: 00000000 00000000 00000000 00000000
[ 1410.461745] mmc1: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0
[ 1410.461788] sdhci-esdhc-imx 30b50000.mmc: change pinctrl state for uhs 0
When in works:
[ 1414.324980] mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
[ 1414.325023] mmc1: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0
[ 1414.325049] sdhci-esdhc-imx 30b50000.mmc: change pinctrl state for uhs 0
[ 1414.330140] sdhci-esdhc-imx 30b50000.mmc: Initial signal voltage of 3.3v
[ 1414.355722] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[ 1414.355764] sdhci-esdhc-imx 30b50000.mmc: desired SD clock: 400000, actual: 390625
[ 1414.380374] mmc1: starting CMD52 arg 00000c00 flags 00000195
[ 1414.380772] mmc1: sdhci: IRQ status 0x00018000
[ 1414.380907] mmc1: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[ 1414.380936] mmc1: starting CMD52 arg 80000c08 flags 00000195
[ 1414.381300] mmc1: sdhci: IRQ status 0x00018000
[ 1414.381346] mmc1: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[ 1414.381478] mmc1: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 1 timing 0
[ 1414.381510] sdhci-esdhc-imx 30b50000.mmc: change pinctrl state for uhs 0
[ 1414.381521] sdhci-esdhc-imx 30b50000.mmc: desired SD clock: 400000, actual: 390625
[ 1414.382804] mmc1: starting CMD0 arg 00000000 flags 000000c0
[ 1414.382985] mmc1: sdhci: IRQ status 0x00000001
[ 1414.382994] mmc1: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[ 1414.384267] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[ 1414.384298] sdhci-esdhc-imx 30b50000.mmc: change pinctrl state for uhs 0
[ 1414.384308] sdhci-esdhc-imx 30b50000.mmc: desired SD clock: 400000, actual: 390625
[ 1414.385606] mmc1: starting CMD8 arg 000001aa flags 000002f5
[ 1414.385982] mmc1: sdhci: IRQ status 0x00018000
[ 1414.386028] mmc1: req done (CMD8): -110: 00000000 00000000 00000000 00000000
[ 1414.386047] mmc1: starting CMD5 arg 00000000 flags 000002e1
[ 1414.386377] mmc1: sdhci: IRQ status 0x00000001
[ 1414.386385] mmc1: req done (CMD5): 0: 90ff8000 00000000 00000000 00000000
[ 1414.386401] mmc1: starting CMD5 arg 01300000 flags 000002e1
[ 1414.386732] mmc1: sdhci: IRQ status 0x00000001
[ 1414.386739] mmc1: req done (CMD5): 0: 90ff8000 00000000 00000000 00000000
[ 1414.386760] mmc1: starting CMD3 arg 00000000 flags 00000075
[ 1414.387083] mmc1: sdhci: IRQ status 0x00000001
[ 1414.387092] mmc1: req done (CMD3): 0: fffd0000 00000000 00000000 00000000
[ 1414.387107] mmc1: starting CMD7 arg fffd0000 flags 00000015
[ 1414.387429] mmc1: sdhci: IRQ status 0x00000001
[ 1414.387436] mmc1: req done (CMD7): 0: 00001ed7 00000000 00000000 00000000
[ 1414.387450] mmc1: starting CMD52 arg 00000000 flags 00000195
[ 1414.387784] mmc1: sdhci: IRQ status 0x00000001
[ 1414.387791] mmc1: req done (CMD52): 0: 00001032 00000000 00000000 00000000
[ 1414.387805] mmc1: starting CMD52 arg 00001000 flags 00000195
[ 1414.388140] mmc1: sdhci: IRQ status 0x00000001
[ 1414.388147] mmc1: req done (CMD52): 0: 00001017 00000000 00000000 00000000
[ 1414.388161] mmc1: starting CMD52 arg 00002400 flags 00000195
[ 1414.388494] mmc1: sdhci: IRQ status 0x00000001
[ 1414.388502] mmc1: req done (CMD52): 0: 00001001 00000000 00000000 00000000
[ 1414.388521] mmc1: starting CMD52 arg 00002600 flags 00000195
[ 1414.388860] mmc1: sdhci: IRQ status 0x00000001
[ 1414.388869] mmc1: req done (CMD52): 0: 00001001 00000000 00000000 00000000
[ 1414.388888] mmc1: starting CMD52 arg 00001200 flags 00000195
[ 1414.389223] mmc1: sdhci: IRQ status 0x00000001
[ 1414.389232] mmc1: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 1414.389249] mmc1: starting CMD52 arg 00001400 flags 00000195
[ 1414.389584] mmc1: sdhci: IRQ status 0x00000001
[ 1414.389593] mmc1: req done (CMD52): 0: 00001010 00000000 00000000 00000000
[ 1414.389609] mmc1: starting CMD52 arg 00001600 flags 00000195
[ 1414.389945] mmc1: sdhci: IRQ status 0x00000001
[ 1414.389952] mmc1: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 1414.389967] mmc1: starting CMD52 arg 00200000 flags 00000195
[ 1414.390301] mmc1: sdhci: IRQ status 0x00000001
[ 1414.390308] mmc1: req done (CMD52): 0: 00001020 00000000 00000000 00000000
[ 1414.390323] mmc1: starting CMD52 arg 00200200 flags 00000195
[ 1414.390656] mmc1: sdhci: IRQ status 0x00000001
[ 1414.390664] mmc1: req done (CMD52): 0: 00001004 00000000 00000000 00000000
[ 1414.390679] mmc1: starting CMD52 arg 00200400 flags 00000195
[ 1414.391014] mmc1: sdhci: IRQ status 0x00000001
[ 1414.391026] mmc1: req done (CMD52): 0: 0000101b 00000000 00000000 00000000
[ 1414.391048] mmc1: starting CMD52 arg 00200600 flags 00000195
[ 1414.391387] mmc1: sdhci: IRQ status 0x00000001
[ 1414.391399] mmc1: req done (CMD52): 0: 00001004 00000000 00000000 00000000
[ 1414.391421] mmc1: starting CMD52 arg 00200800 flags 00000195
[ 1414.391758] mmc1: sdhci: IRQ status 0x00000001
[ 1414.391770] mmc1: req done (CMD52): 0: 00001016 00000000 00000000 00000000
[ 1414.391792] mmc1: starting CMD52 arg 00200a00 flags 00000195
[ 1414.392129] mmc1: sdhci: IRQ status 0x00000001
[ 1414.392140] mmc1: req done (CMD52): 0: 00001091 00000000 00000000 00000000
[ 1414.392163] mmc1: starting CMD52 arg 00200c00 flags 00000195
[ 1414.392500] mmc1: sdhci: IRQ status 0x00000001
[ 1414.392513] mmc1: req done (CMD52): 0: 00001021 00000000 00000000 00000000
[ 1414.392539] mmc1: starting CMD52 arg 00200e00 flags 00000195
[ 1414.392886] mmc1: sdhci: IRQ status 0x00000001
[ 1414.392899] mmc1: req done (CMD52): 0: 00001002 00000000 00000000 00000000
[ 1414.392925] mmc1: starting CMD52 arg 00201000 flags 00000195
[ 1414.393266] mmc1: sdhci: IRQ status 0x00000001
[ 1414.393279] mmc1: req done (CMD52): 0: 0000100c 00000000 00000000 00000000
[ 1414.393305] mmc1: starting CMD52 arg 00201200 flags 00000195
[ 1414.393647] mmc1: sdhci: IRQ status 0x00000001
[ 1414.393660] mmc1: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 1414.393687] mmc1: starting CMD52 arg 00201400 flags 00000195
[ 1414.394032] mmc1: sdhci: IRQ status 0x00000001
[ 1414.394045] mmc1: req done (CMD52): 0: 00001022 00000000 00000000 00000000
[ 1414.394071] mmc1: starting CMD52 arg 00201600 flags 00000195
[ 1414.394413] mmc1: sdhci: IRQ status 0x00000001
[ 1414.394426] mmc1: req done (CMD52): 0: 00001004 00000000 00000000 00000000
[ 1414.394450] mmc1: starting CMD52 arg 00201800 flags 00000195
[ 1414.394792] mmc1: sdhci: IRQ status 0x00000001
[ 1414.394804] mmc1: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 1414.394827] mmc1: starting CMD52 arg 00201a00 flags 00000195
[ 1414.395166] mmc1: sdhci: IRQ status 0x00000001
[ 1414.395176] mmc1: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 1414.395197] mmc1: starting CMD52 arg 00201c00 flags 00000195
[ 1414.395538] mmc1: sdhci: IRQ status 0x00000001
[ 1414.395550] mmc1: req done (CMD52): 0: 00001020 00000000 00000000 00000000
[ 1414.395572] mmc1: starting CMD52 arg 00201e00 flags 00000195
[ 1414.395911] mmc1: sdhci: IRQ status 0x00000001
[ 1414.395923] mmc1: req done (CMD52): 0: 00001032 00000000 00000000 00000000
[ 1414.395946] mmc1: starting CMD52 arg 00202000 flags 00000195
[ 1414.396287] mmc1: sdhci: IRQ status 0x00000001
[ 1414.396297] mmc1: req done (CMD52): 0: 000010ff 00000000 00000000 00000000
[ 1414.396320] mmc1: starting CMD52 arg 00002600 flags 00000195
[ 1414.396659] mmc1: sdhci: IRQ status 0x00000001
[ 1414.396672] mmc1: req done (CMD52): 0: 00001001 00000000 00000000 00000000
[ 1414.396695] mmc1: starting CMD52 arg 80002603 flags 00000195
[ 1414.397038] mmc1: sdhci: IRQ status 0x00000001
[ 1414.397051] mmc1: req done (CMD52): 0: 00001003 00000000 00000000 00000000
[ 1414.397074] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 2
[ 1414.397118] sdhci-esdhc-imx 30b50000.mmc: change pinctrl state for uhs 2
[ 1414.397132] sdhci-esdhc-imx 30b50000.mmc: desired SD clock: 400000, actual: 390625
[ 1414.397170] mmc1: clock 50000000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 2
[ 1414.397199] sdhci-esdhc-imx 30b50000.mmc: desired SD clock: 50000000, actual: 50000000
[ 1414.397230] sdhci-esdhc-imx 30b50000.mmc: change pinctrl state for uhs 2
[ 1414.397241] sdhci-esdhc-imx 30b50000.mmc: desired SD clock: 50000000, actual: 50000000