summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/board_f.c6
-rw-r--r--common/board_r.c14
-rw-r--r--common/bootm.c2
-rw-r--r--common/image-fit.c16
4 files changed, 32 insertions, 6 deletions
diff --git a/common/board_f.c b/common/board_f.c
index a960144..622093a 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -45,6 +45,7 @@
#include <post.h>
#include <spi.h>
#include <status_led.h>
+#include <timer.h>
#include <trace.h>
#include <video.h>
#include <watchdog.h>
@@ -805,6 +806,11 @@ static int initf_dm(void)
if (ret)
return ret;
#endif
+#ifdef CONFIG_TIMER_EARLY
+ ret = dm_timer_init();
+ if (ret)
+ return ret;
+#endif
return 0;
}
diff --git a/common/board_r.c b/common/board_r.c
index 6c23865..52a9b26 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -46,6 +46,7 @@
#include <serial.h>
#include <spi.h>
#include <stdio_dev.h>
+#include <timer.h>
#include <trace.h>
#include <watchdog.h>
#ifdef CONFIG_CMD_AMBAPP
@@ -312,13 +313,22 @@ static int initr_noncached(void)
#ifdef CONFIG_DM
static int initr_dm(void)
{
+ int ret;
+
/* Save the pre-reloc driver model and start a new one */
gd->dm_root_f = gd->dm_root;
gd->dm_root = NULL;
-#ifdef CONFIG_TIMER
+ ret = dm_init_and_scan(false);
+ if (ret)
+ return ret;
+#ifdef CONFIG_TIMER_EARLY
gd->timer = NULL;
+ ret = dm_timer_init();
+ if (ret)
+ return ret;
#endif
- return dm_init_and_scan(false);
+
+ return 0;
}
#endif
diff --git a/common/bootm.c b/common/bootm.c
index 99d574d..df27089 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -201,7 +201,7 @@ static int bootm_find_os(cmd_tbl_t *cmdtp, int flag, int argc,
images.ep += images.os.load;
}
- images.os.start = (ulong)os_hdr;
+ images.os.start = map_to_sysmem(os_hdr);
return 0;
}
diff --git a/common/image-fit.c b/common/image-fit.c
index c531ee7..fbd9e0d 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -851,6 +851,11 @@ static int fit_image_hash_get_ignore(const void *fit, int noffset, int *ignore)
return 0;
}
+ulong fit_get_end(const void *fit)
+{
+ return map_to_sysmem((void *)(fit + fdt_totalsize(fit)));
+}
+
/**
* fit_set_timestamp - set node timestamp property
* @fit: pointer to the FIT format image header
@@ -1030,10 +1035,15 @@ int fit_image_verify(const void *fit, int image_noffset)
strlen(FIT_SIG_NODENAME))) {
ret = fit_image_check_sig(fit, noffset, data,
size, -1, &err_msg);
- if (ret) {
+
+ /*
+ * Show an indication on failure, but do not return
+ * an error. Only keys marked 'required' can cause
+ * an image validation failure. See the call to
+ * fit_image_verify_required_sigs() above.
+ */
+ if (ret)
puts("- ");
- goto error;
- }
else
puts("+ ");
}