Unstuff_bits macro definition analysis

Source: Internet
Author: User

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 ;}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.