Lines Matching full:mmc
7 #include <mmc.h>
26 struct mmc *mmc = find_mmc_device(0); in mmc_spl_load_image() local
27 if (!mmc) { in mmc_spl_load_image()
28 puts("spl: mmc device not found!!\n"); in mmc_spl_load_image()
32 if (mmc_init(mmc)) { in mmc_spl_load_image()
33 puts("MMC init failed\n"); in mmc_spl_load_image()
37 blk_start = ALIGN(offs, mmc->read_bl_len) / mmc->read_bl_len; in mmc_spl_load_image()
38 blk_cnt = ALIGN(size, mmc->read_bl_len) / mmc->read_bl_len; in mmc_spl_load_image()
40 err = mmc->block_dev.block_read(&mmc->block_dev, blk_start, blk_cnt, in mmc_spl_load_image()
43 puts("spl: mmc read failed!!\n"); in mmc_spl_load_image()
49 * The main entry for mmc booting. It's necessary that SDRAM is already
51 * from mmc into SDRAM and starts it from there.
65 struct mmc *mmc; in mmc_boot() local
67 mmc = find_mmc_device(0); in mmc_boot()
68 if (!mmc) { in mmc_boot()
69 puts("spl: mmc device not found!!\n"); in mmc_boot()
77 blklen = mmc->read_bl_len; in mmc_boot()
88 err = mmc->block_dev.block_read(&mmc->block_dev, in mmc_boot()
91 puts("spl: mmc read failed!!\n"); in mmc_boot()
98 puts("spl: mmc signature is not valid!!\n"); in mmc_boot()
104 puts("spl: mmc signature is not valid!!\n"); in mmc_boot()
125 * Load U-Boot image from mmc into RAM in mmc_boot()
128 blk_start = ALIGN(offset, mmc->read_bl_len) / mmc->read_bl_len; in mmc_boot()
129 blk_cnt = ALIGN(code_len, mmc->read_bl_len) / mmc->read_bl_len; in mmc_boot()
130 err = mmc->block_dev.block_read(&mmc->block_dev, blk_start, blk_cnt, in mmc_boot()
133 puts("spl: mmc read failed!!\n"); in mmc_boot()