Unstuff_bits macro definition analysis (RGB: 185 225 221)
Zero X 1234567 0x89abcdefZero X 12345670x89abcDEF
, GetUnstuff_bits (resp, 8, 4) = 0xd
Config_mmc_debug = y
Echo 8>/proc/sys/kernel/printk
[177.022399] mmc1: Starting running 9 Arg e6240000 flags 00000007
[1, 177.028015] set_mmc_cken: On
[177.031616] pxamci: IRQ 00000004 stat 00002140
[177.036041] mmc1: req done (cost 9): 0: 400e0032 5b590000 edc87f80 0a40403f
Resp [0] indicates the highest bit
Resp does not contain (start bit/Transmission Bit/command index)
[177.185485] mmc1: Starting running 55 Arg e6240000 flags 00000095 (R1-32bit (card status) + 8bit)
[1, 177.191192] set_mmc_cken: On
[177.194061] pxamci: IRQ 00000004 stat 00002140
[177.198516] mmc1: req done (cost 55): 0:00000920 5b590000 edc87f80 0a404037 (valid in red and invalid in the back)
Static void sdhci_finish_command (struct sdhci_host * Host) {int I; bug_on (host-> cmd = NULL); If (host-> cmd-> flags & mmc_rsp_present) {If (host-> cmd-> flags & mmc_rsp_136) {// The 128-bit data in spec contains CRC, but the esdhci controller automatically removes CRC verification, so we need to make the RESP conform to spec/* CRC is stripped so we need to do some shifting. */For (I = 0; I <4; I ++) {Host-> cmd-> resp [I] = readl (host-> ioaddr + sdhci_response + (3-I) * 4) <8; if (I! = 3) Host-> cmd-> resp [I] | = readb (host-> ioaddr + sdhci_response + (3-I) * 4-1 );}} else {Host-> cmd-> resp [0] = readl (host-> ioaddr + sdhci_response ); // This does not contain CRC} host-> cmd-> error = 0; If (host-> Data & host-> data_early) sdhci_finish_data (host); If (! Host-> cmd-> data) tasklet_schedule (& host-> finish_tasklet); host-> cmd = NULL ;}