其他分享
首页 > 其他分享> > get the emmc capacity in kernel

get the emmc capacity in kernel

作者:互联网

get the emmc capacity in kernel

4.19\drivers\mmc\core\Mmc.c

static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)

if (card->ext_csd.rev >= 2) {

card->ext_csd.sectors =

ext_csd[EXT_CSD_SEC_CNT + 0] << 0 |

ext_csd[EXT_CSD_SEC_CNT + 1] << 8 |

ext_csd[EXT_CSD_SEC_CNT + 2] << 16 |

ext_csd[EXT_CSD_SEC_CNT + 3] << 24;

 

 

funcs to process mmc core request:

struct mmc_host_ops

 

标签:kernel,CNT,capacity,emmc,csd,EXT,ext,SEC,mmc
来源: https://www.cnblogs.com/aspirs/p/14664855.html