In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1. SDIO scan function call flow dw_mci_probe (zx29_mmc.c)-->dw_mci_init_slot(zx29_mmc.c)-->Mmc_alloc_host (host.c)-->INIT_DELAYED_WORK(host.c) Create delayed_work and put mmc_rescan into the work queue. dw_mci_probe (zx29_mmc.c)-->dw_mci_init_slot(zx29_mmc.c)-->Mmc_add_host (host.c)-->mmc_start_host(core.c)-->mmc_detect_change(core.c), in mmc_detect_change will wake up the work queue, mmc_rescan.
mmcrescan-> Use 400k, 300k, 200k and 100k rates to call mmc_rescan_try_freq to scan, and exit scanning as long as the device is scanned. So if you scan for sdio devices at 400k, you don't need to scan for the next three rates.
mmcrescantryfreq->mmc_power_up->sdio_reset->(cmd52, cmd52) Neither command responds because the sdio device is in initialization state when it is powered on and does not respond to cmd52 command. In this case, these two commands have no effect on the sdio device. If the current sdio device is in commond state or transfer state and needs to rescan sido devices, these two commands will work and reset the sdio device;mmc_go_idle->(cmd0) switches the card from sd mode to spi modemmc_send_if_cond->(cmd8) This command is optional for sdio devices and can not be implemented.
3. mmcattachsdio->
1)mmc_send_io_op_cond->(cmd5) Get configuration 2)mmc_sdio_init_card-> response Found that the sdio device does not support 1.8V, and the 1.8V switch will not be performed later; meanwhile, the sdio device does not support sd memory, and relevant initialization of sd memory is not required. mmcsendioopcond->(cmd5) Set configuration mmcsendrelativeaddr->(cmd3) Get RCAmmcselectcard->(cmd7) Select sdio device sdioreadcccr->(cmd52…) Read cccr and Card Capability registers to get sdio version, CCCR format version, whether to support multi-block transmission, whether to support master power control, whether to support high speed mode and bus rate selection. sdioreadcommoncis->(cmd52…) Read CIS for vendor id, device id, etc. sdioenablehs-> Switch to high speed mode mmcsdioswitchhs->(cmd52…) Switch to high speed mode sdioenable4bitbus-> Set SDIO device bus width, Set controller bus widthsdioenablewide->(cmd52…)
3)sdio_init_func->sdioreadfbr->(cmd52…) Read fbrsdioreadfunccis->(cmd52…) Read CIS, read CIS of function is the same process as reading CIS of sdio_read_common_cis, except that the address of reading CIS is different and the content of CIS is different. One of the most important parameters is func->max_blksize;
At the same time, if you read vendor id, device id, save it in the function structure, if you don't read it, copy it from card->cis.vendor, card->cis.device (sdio_read_common_cis)
4)mmc_add_card-> add sdio device
5)sdio_add_func-> add function device
From the whole scanning process, the data line is not used, so if the device can be detected when the sdio device is initialized, but the initialization fails, it is likely that there is a problem with the data line.
2. Linux sdio read and write process
mmc_request (queue.c) calls wake_up_process to wake up mmc_queue_thread;
mmc_queue_thread(queue.c)-->
-blk_fetch_request (queue.c)--> Get corresponding mmc_request
--mq->issue_fn()(mmc_blockk_issue_rq block.c)--> process request request
---mmc_blockk_issue_rw_rq (block.c)--> Operate on the data of the request queue, and finally call mmc_wait_for_req
---mmc_start_req (core.c)--> Start processing requests and enter the core layer of the protocol
-----__mmc_start_data_req(core.c)
------mmc_start_request(core.c)
------host->ops->request()(dw_mci_request zx29_mmc.c)--> invoke host control layer to implement real hardware request processing
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.