summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPriyanka Jain <Priyanka.Jain@freescale.com>2013-11-28 10:12:16 +0530
committerPantelis Antoniou <panto@antoniou-consulting.com>2013-12-08 14:17:28 +0200
commit4520a2f28eade14b97618b37148ac615e78783df (patch)
treefeb3b1f2b49a842dcc6a408ef8d705e6e8e9419a /drivers
parent9108b315f228b464379211be26f594ea3dc82cc5 (diff)
powerpc: mmc: Add corenet devices support in esdhc spl
Existing eSDHC SPL framework assumes booting from sd-image with boot_format header which contains final u-boot Image offset and size. No such header is present in case of corenet devices like T1040 as corenet deivces use PBI-RCW based intialization. So, for corenet deives, SPL bootloader use values provided at compilation time. These values can be defined in board specific config file. Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com> Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/fsl_esdhc_spl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/fsl_esdhc_spl.c b/drivers/mmc/fsl_esdhc_spl.c
index 65c52a22db..8fc263f4f4 100644
--- a/drivers/mmc/fsl_esdhc_spl.c
+++ b/drivers/mmc/fsl_esdhc_spl.c
@@ -42,6 +42,10 @@ void __noreturn mmc_boot(void)
hang();
}
+#ifdef CONFIG_FSL_CORENET
+ offset = CONFIG_SYS_MMC_U_BOOT_OFFS;
+ code_len = CONFIG_SYS_MMC_U_BOOT_SIZE;
+#else
blklen = mmc->read_bl_len;
tmp_buf = malloc(blklen);
if (!tmp_buf) {
@@ -91,6 +95,7 @@ void __noreturn mmc_boot(void)
/*
* Load U-Boot image from mmc into RAM
*/
+#endif
blk_start = ALIGN(offset, mmc->read_bl_len) / mmc->read_bl_len;
blk_cnt = ALIGN(code_len, mmc->read_bl_len) / mmc->read_bl_len;
err = mmc->block_dev.block_read(0, blk_start, blk_cnt,