Linux SD/MMC Driver Stack

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    4 Favorites

    Linux SD/MMC Driver Stack - Presentation Transcript

    1. Linux SD/MMC Driver Stack Champ Yen http://champyen.blogspot.com champ.yen@gmail.com champ yen 1
    2. SD/MMC Stack Architecture  Device BLOCK UART BlueTooth WIFI ● Implement specific Device (SDIO) (SDIO) (SDIO) subsystem devices(ex: UART, WIFI) by utilizing Core API. Core  Core - Diagnosing SD/MMC/SDIO device SDIO SD MMC - SD/MMC/SDIO Protocol Layer implementation Host - Power Management Policy  Host - Hardware dependent interface AIT OMAP S3C ...... - Handling requests from Core layer. champ yen 2
    3. Host Structure struct mmc_host { …… const struct mmc_host_ops *ops; /* minimum frequency */ unsigned int f_min; /* maximum frequency */ unsigned int f_max; /* provided voltages */ u32 ocr_avail; unsigned long caps; /* host specific block data */ unsigned int max_seg_size; unsigned short max_hw_segs; unsigned short max_phys_segs; unsigned short unused; unsigned int max_req_size; unsigned int max_blk_size; unsigned int max_blk_count; …… }; champ yen 3
    4. host allocation struct mmc_host *mmc; //private host data, hw dependent info is saved here. struct foo_host *host; //allocate mmc_host structure with private data size //pdev is the pointer of platform_device mmc = mmc_alloc_host(sizeof(struct foo_host), &pdev->dev); ////////////// initialization after allocation /////////////////// ////////////// private host data pointer is get as below struct foo_host *host; host = mmc_priv(mmc); champ yen 4
    5. Host Operations struct mmc_host_ops { /* request handler */ void (*request)(struct mmc_host *host, struct mmc_request *req); /* host controller setting function */ void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios); /* read-only detection , return 1: read-only, 0: read-write */ int (*get_ro)(struct mmc_host *host); /* card detection return 1: Card Inserted, 0: Card Not Inserted */ int (*get_cd)(struct mmc_host *host); /* enable SDIO irq */ void (*enable_sdio_irq)(struct mmc_host *host, int enable); }; champ yen 5
    6. request struct mmc_request { /* command to be issued */ struct mmc_command *cmd; /* data transmission, NULL means no transmission */ struct mmc_data *data; /*stop command after data transmission */ struct mmc_command *stop; /* completion data, used by core layer for sync. */ void *done_data; /* request post processing function */ void (*done)(struct mmc_request *); }; champ yen 6
    7. request handling flow cmd datammc_request stop Y sendcmd(req->cmd) req->data == NULL mmc_request_done N Y Data Transmission req>stop == NULL N sendcmd(req->stop) champ yen 7
    8. Q&A champ yen 8

    + Champ YenChamp Yen, 3 months ago

    custom

    994 views, 4 favs, 3 embeds more stats

    Linux SD/MMC Driver Stack presentation

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 994
      • 905 on SlideShare
      • 89 from embeds
    • Comments 0
    • Favorites 4
    • Downloads 0
    Most viewed embeds
    • 80 views on http://champyen.blogspot.com
    • 8 views on http://blog.harrylau.com
    • 1 views on http://203.208.37.132

    more

    All embeds
    • 80 views on http://champyen.blogspot.com
    • 8 views on http://blog.harrylau.com
    • 1 views on http://203.208.37.132

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories