2 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 DECLARE_GLOBAL_DATA_PTR;
24 static void mmc_load_image(struct mmc *mmc)
27 void (*uboot)(void) __noreturn;
29 err = mmc->block_dev.block_read(0, CONFIG_SYS_MMC_U_BOOT_OFFS,
30 CONFIG_SYS_MMC_U_BOOT_SIZE/512,
31 (u32 *)CONFIG_SYS_TEXT_BASE);
34 printf("spl: error reading image %s, err - %d\n",
38 uboot = (void *) CONFIG_SYS_TEXT_BASE;
42 void spl_mmc_load(void)
46 void (mmc_load_image)(struct mmc *mmc) __noreturn;
48 mmc_initialize(gd->bd);
49 mmc = find_mmc_device(0);
51 puts("spl: mmc device not found!!\n");
54 puts("spl: mmc device found\n");
58 printf("spl: mmc init failed: err - %d\n", err);