Analysis on the hardware detection flow of SD card under Linux Sdio interface __linux

Source: Internet
Author: User

Mmc_alloc_host () Application Platform SD unit corresponding to the MMC_HOST structure->
Init_delayed_work (&host->detect, Mmc_rescan) creates a corresponding SDIO device insert for this platform SD unit
Detection kernel work_queue task column function Mmc_rescan->mmc_rescan () This is a shared function, if there are 4 SD card controllers on your arm platform,
Then 4 SD controllers will correspond to 4 mmc_host structures respectively, corresponding to 4 sdio device Insert detection kernel work_queue Task Force column,
But the work queue will call the Mmc_rescan () 1 functions, so the object-oriented class-sharing mechanism of the Linux kernel is doing well->

Use the Mmc_alloc_host () function to request a platform mmc_host structure that does not assign a bus pointer to it, assigning only the parent to which it belongs, that is, this MMC does not belong to a bus,
So this mmc_host corresponding dev will not be assigned to any driver drivers from any bus buses, which is also true.

Mmc_attach_sdio ()->mmc_attach_bus (host, &mmc_sdio_ops);
Mmc_sdio_init_card ()->sdio_init_func ()->sdio_alloc_func ()-> so that after detect to the SDIO device,
will assign dev corresponding to the SDIO_FUNC structure problem,

Call the Sdio_read_func_cis () Cistpl_manfid () to populate the SD card's vendor so that when the WLAN drives probe,
Will attempt to match the vendor in the WLAN-driven ID table, if successful, then the WLAN driver will take over the detected SD card

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.