]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mmc/fsl_esdhc_spl.c
dm: Add GPIO support and tests
[karo-tx-uboot.git] / drivers / mmc / fsl_esdhc_spl.c
index 25a1dff1b0092595f9e8825e0fff0f17594f6b68..8fc263f4f40b864d8c9c8090c88896a7995a2a87 100644 (file)
@@ -1,22 +1,7 @@
 /*
  * Copyright 2013 Freescale Semiconductor, Inc.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- *
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -57,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) {
@@ -106,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,