summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 60a2ced)
raw | patch | inline | side by side (parent: 60a2ced)
author | Sam Nelson <sam.nelson@ti.com> | |
Tue, 8 Jul 2014 17:14:57 +0000 (13:14 -0400) | ||
committer | Sam Nelson <sam.nelson@ti.com> | |
Tue, 8 Jul 2014 17:14:57 +0000 (13:14 -0400) |
- Fix issues to allow backward compatibility
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
src/daemon/mpmdlif.c | patch | blob | history |
diff --git a/src/daemon/mpmdlif.c b/src/daemon/mpmdlif.c
index 0be4a04a5851ef2911a78f7dbec987ac29c029f3..283624634053be681ff01abf36777653b1f1112b 100644 (file)
--- a/src/daemon/mpmdlif.c
+++ b/src/daemon/mpmdlif.c
/* Open device to read */
fd = open("/dev/secmgr", (O_RDWR | O_SYNC));
if (fd < 0) {
- error_msg("devmem open failed (err: %s)", strerror(errno));
+ info_msg("No secmgr uio device: Assume non secure device");
+ ret_val = 0;
goto close_n_exit;
}
goto close_n_exit;
}
}
- if( !mpm_cfg.security_status ) {
+ if( mpm_cfg.security_status != 1 ) {
if (uioutil_write_reg (uio_class, UIO_NAME_MODULE_CONROL, sp->uio_fd_info.fd, MD_CTRL_LRST, or_op)) {
error_msg("Can't MDCTL to %s not found for %s",
uio_class, sp->image_name);
goto close_n_exit;
}
- if( !mpm_cfg.security_status ) {
+ if( mpm_cfg.security_status != 1 ) {
/* Install trampoline code to support non-aligned entrypoint */
if (mpm_get_global_addr (sp, sp->entry_point, 4, &gaddr) < 0) {
error_msg("entry point %x global address not found ",
error_msg(" Not expected ....");
}
/* Check if it is secure device */
- if(!mpm_cfg.security_status) {
+ if(mpm_cfg.security_status != 1) {
if (uioutil_write_reg (uio_class, UIO_NAME_MAGIC_ADDRESS, sp->uio_fd_info.fd, mpm_cfg.scratch_block, assign_op)) {
error_msg("Can't write start address to %s not found for %s",
uio_class, sp->image_name);
goto close_n_exit;
}
usleep(1000);
- }while ((read_value != 0) && (++timeout_count <= 100));
+ }while ((read_value != 0)
+ && (++timeout_count <= MPM_DOWNLOAD_TIMEOUT_MS));
if (timeout_count > MPM_DOWNLOAD_TIMEOUT_MS) {
- mpm_errno = MPM_ERROR_DOWNLOAD_TIMEOUT;
+ mpm_errno = MPM_ERROR_DOWNLOAD_TIMEOUT;
goto close_n_exit;
}
}