mmc: fsl_esdhc_imx: disable the CMD CRC check for standard tuning
[oweals/u-boot.git] / common / board_r.c
index 33efcf6ad5bcd0a1ddf6668623badefab452dcc3..fa57fa9b699399d91d20a16199d68c51993328b6 100644 (file)
 
 #include <common.h>
 #include <api.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <exports.h>
 #include <flash.h>
 #include <hang.h>
 #include <image.h>
 #include <irq_func.h>
+#include <log.h>
 #include <net.h>
 #include <asm/cache.h>
 #include <u-boot/crc.h>
@@ -312,9 +314,9 @@ static int initr_dm(void)
 #ifdef CONFIG_TIMER
        gd->timer = NULL;
 #endif
-       bootstage_start(BOOTSTATE_ID_ACCUM_DM_R, "dm_r");
+       bootstage_start(BOOTSTAGE_ID_ACCUM_DM_R, "dm_r");
        ret = dm_init_and_scan(false);
-       bootstage_accum(BOOTSTATE_ID_ACCUM_DM_R);
+       bootstage_accum(BOOTSTAGE_ID_ACCUM_DM_R);
        if (ret)
                return ret;
 
@@ -356,8 +358,8 @@ static int initr_announce(void)
 #ifdef CONFIG_NEEDS_MANUAL_RELOC
 static int initr_manual_reloc_cmdtable(void)
 {
-       fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd),
-                      ll_entry_count(cmd_tbl_t, cmd));
+       fixup_cmdtable(ll_entry_start(struct cmd_tbl, cmd),
+                      ll_entry_count(struct cmd_tbl, cmd));
        return 0;
 }
 #endif
@@ -371,11 +373,19 @@ static int initr_binman(void)
 }
 
 #if defined(CONFIG_MTD_NOR_FLASH)
+__weak int is_flash_available(void)
+{
+       return 1;
+}
+
 static int initr_flash(void)
 {
        ulong flash_size = 0;
        bd_t *bd = gd->bd;
 
+       if (!is_flash_available())
+               return 0;
+
        puts("Flash: ");
 
        if (board_flash_wp_on())