Lines Matching refs:mmc
18 static int mmc_load_legacy(struct spl_image_info *spl_image, struct mmc *mmc, in mmc_load_legacy() argument
30 image_size_sectors = (spl_image->size + mmc->read_bl_len - 1) / in mmc_load_legacy()
31 mmc->read_bl_len; in mmc_load_legacy()
34 count = blk_dread(mmc_get_blk_desc(mmc), sector, image_size_sectors, in mmc_load_legacy()
47 struct mmc *mmc = load->dev; in h_spl_load_read() local
49 return blk_dread(mmc_get_blk_desc(mmc), sector, count, buf); in h_spl_load_read()
54 struct mmc *mmc, unsigned long sector) in mmc_load_image_raw_sector() argument
64 count = blk_dread(mmc_get_blk_desc(mmc), sector, 1, header); in mmc_load_image_raw_sector()
76 load.dev = mmc; in mmc_load_image_raw_sector()
79 load.bl_len = mmc->read_bl_len; in mmc_load_image_raw_sector()
83 ret = mmc_load_legacy(spl_image, mmc, sector, header); in mmc_load_image_raw_sector()
114 static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device) in spl_mmc_find_device()
153 struct mmc *mmc, int partition) in mmc_load_image_raw_partition() argument
162 err = part_get_info(mmc_get_blk_desc(mmc), type_part, &info); in mmc_load_image_raw_partition()
173 err = part_get_info(mmc_get_blk_desc(mmc), partition, &info); in mmc_load_image_raw_partition()
182 return mmc_load_image_raw_sector(spl_image, mmc, in mmc_load_image_raw_partition()
185 return mmc_load_image_raw_sector(spl_image, mmc, info.start); in mmc_load_image_raw_partition()
192 struct mmc *mmc) in mmc_load_image_raw_os() argument
197 count = blk_dread(mmc_get_blk_desc(mmc), in mmc_load_image_raw_os()
208 ret = mmc_load_image_raw_sector(spl_image, mmc, in mmc_load_image_raw_os()
226 struct mmc *mmc) in mmc_load_image_raw_os() argument
233 static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image, struct mmc *mmc) in spl_mmc_do_fs_boot() argument
239 err = spl_load_image_fat_os(spl_image, mmc_get_blk_desc(mmc), in spl_mmc_do_fs_boot()
245 err = spl_load_image_fat(spl_image, mmc_get_blk_desc(mmc), in spl_mmc_do_fs_boot()
254 err = spl_load_image_ext_os(spl_image, mmc_get_blk_desc(mmc), in spl_mmc_do_fs_boot()
260 err = spl_load_image_ext(spl_image, mmc_get_blk_desc(mmc), in spl_mmc_do_fs_boot()
275 static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image, struct mmc *mmc) in spl_mmc_do_fs_boot() argument
303 struct mmc *mmc = NULL; in spl_mmc_load_image() local
308 err = spl_mmc_find_device(&mmc, bootdev->boot_device); in spl_mmc_load_image()
312 err = mmc_init(mmc); in spl_mmc_load_image()
329 part = (mmc->part_config >> 3) & PART_ACCESS_MASK; in spl_mmc_load_image()
335 err = mmc_switch_part(mmc, part); in spl_mmc_load_image()
337 err = blk_dselect_hwpart(mmc_get_blk_desc(mmc), part); in spl_mmc_load_image()
350 err = mmc_load_image_raw_os(spl_image, mmc); in spl_mmc_load_image()
359 err = mmc_load_image_raw_partition(spl_image, mmc, err); in spl_mmc_load_image()
364 err = mmc_load_image_raw_sector(spl_image, mmc, in spl_mmc_load_image()
373 err = spl_mmc_do_fs_boot(spl_image, mmc); in spl_mmc_load_image()