bbb mmc驱动分析

1. drivers/mmc/host/omap_hsmmc.c
static int __init omap_hsmmc_init(void)
{
     /* Register the MMC driver */
     return platform_driver_probe(&omap_hsmmc_driver, omap_hsmmc_probe);
}


static int __init omap_hsmmc_probe(struct platform_device *pdev)
{
     mmc = mmc_alloc_host(sizeof(struct omap_hsmmc_host), &pdev->dev);
}


2. drivers/mmc/core/host.c
struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
{
     INIT_DELAYED_WORK(&host->detect, mmc_rescan);
}


3. drivers/mmc/core/core.c
void mmc_rescan(struct work_struct *work)
{
     host->bus_ops->detect(host);
}


4. drivers/mmc/core/mmc.c
static void mmc_detect(struct mmc_host *host)
{
     err = _mmc_detect_card_removed(host);
}


5. drivers/mmc/core/core.c
int _mmc_detect_card_removed(struct mmc_host *host)
{
     ret = host->bus_ops->alive(host);
}


6. drivers/mmc/core/mmc.c
static int mmc_alive(struct mmc_host *host)
{
     return mmc_send_status(host->card, NULL);
}


7. drivers/mmc/core/mmc_ops.c
int mmc_send_status(struct mmc_card *card, u32 *status)
{
     err = mmc_wait_for_cmd(card->host, &cmd, MMC_CMD_RETRIES);
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值