EMMC子系统分析-读写流程

EMMC读写操作的调用栈

mmc_queue_thread ->

    mmc_blk_issue_rq ->

        mmc_blk_issue_rw_rq ->

            mmc_start_req ->

                __mmc_start_data_req ->

                    mmc_start_request ->

                        omap_hsmmc_request


mmc_queue_thread

 49 static int mmc_queue_thread(void *d)
 50 {
 51     struct mmc_queue *mq = d;
 52     struct request_queue *q = mq->queue;
 53 
 54     current->flags |= PF_MEMALLOC;
 55 
 56     down(&mq->thread_sem);
 57     do {
 58         struct request *req = NULL;
 59         struct mmc_queue_req *tmp;
 60         unsigned int cmd_flags = 0;
 61 
 62         spin_lock_irq(q->queue_lock);
 63         set_current_state(TASK_INTERRUPTIBLE);
 64         req = blk_fetch_request(q);
 65         mq->mqrq_cur->req = req;
 66         spin_unlock_irq(q->queue_lock);
 67 
 68         if (req || mq->mqrq_prev->req) {
 69             set_current_state(TASK_RUNNING);
 70             cmd_flags = req ? req->cmd_flags : 0;
 71             mq->issue_fn(mq, req);
 72             if (mq->flags & MMC_QUEUE_NEW_REQUEST) {
 73                 mq->flags &= ~MMC_QUEUE_NEW_REQUEST;
 74                 continue; /* fetch again */
 75             }
 76 
 77             /*
 78              * Current request be
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值