drivers: mmc: pass the mmc ext_csd to kernel

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I95dbd0da5d8750e5b19f00a54596ca484f72ecb2
This commit is contained in:
Jason Zhu 2020-05-06 22:10:17 +08:00
parent e68ead627b
commit 2056aa9f86
1 changed files with 10 additions and 0 deletions

View File

@ -572,7 +572,17 @@ static int mmc_send_ext_csd(struct mmc *mmc, u8 *ext_csd)
err = mmc_send_cmd(mmc, &cmd, &data);
memcpy(mmc_ext_csd, ext_csd, 512);
#if defined(CONFIG_MMC_USE_PRE_CONFIG) && defined(CONFIG_SPL_BUILD)
char *mmc_ecsd_base = NULL;
ulong mmc_ecsd;
mmc_ecsd = dev_read_u32_default(mmc->dev, "mmc-ecsd", 0);
mmc_ecsd_base = (char *)mmc_ecsd;
if (mmc_ecsd_base) {
memcpy(mmc_ecsd_base, ext_csd, 512);
*(unsigned int *)(mmc_ecsd_base + 512) = 0x55aa55aa;
}
#endif
return err;
}