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

 

上一篇:Upload-labs靶场_第1~12关总结


下一篇:Linux Ext 文件系统