summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2014-10-14 15:39:27 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2014-10-14 15:39:27 +0200
commit4181f1b45cdbac89f2f626a50ce59aa9c4fdf8dd (patch)
tree3bb7b8623e3caeaa0153b18bd8c9a5594330d4f9 /common
parent673ed5cf1f142b0e01959fa1e086ec7fdec4a9ae (diff)
parentc43fd23cf619856b0763a64a6a3bcf3663058c49 (diff)
Merge tag 'v2014.10' into 2014.10-toradex-next
Prepare v2014.10
Diffstat (limited to 'common')
-rw-r--r--common/board_r.c8
-rw-r--r--common/cmd_pxe.c9
-rw-r--r--common/spl/spl_sata.c1
3 files changed, 14 insertions, 4 deletions
diff --git a/common/board_r.c b/common/board_r.c
index 1fcfd8793f..1794257102 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -672,7 +672,7 @@ int initr_mem(void)
/* Also take the logbuffer into account (pram is in kB) */
pram += (LOGBUFF_LEN + LOGBUFF_OVERHEAD) / 1024;
# endif
- sprintf(memsz, "%ldk", (gd->ram_size / 1024) - pram);
+ sprintf(memsz, "%ldk", (long int) ((gd->ram_size / 1024) - pram));
setenv("mem", memsz);
return 0;
@@ -725,6 +725,9 @@ init_fnc_t init_sequence_r[] = {
initr_caches,
#endif
initr_reloc_global_data,
+#if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500)
+ initr_unlock_ram_in_cache,
+#endif
initr_barrier,
initr_malloc,
#ifdef CONFIG_SYS_NONCACHED_MEMORY
@@ -770,9 +773,6 @@ init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_SYS_DELAYED_ICACHE
initr_icache_enable,
#endif
-#if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500)
- initr_unlock_ram_in_cache,
-#endif
#if defined(CONFIG_PCI) && defined(CONFIG_SYS_EARLY_PCI_INIT)
/*
* Do early PCI configuration _before_ the flash gets initialised,
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 0ab1e0aaa6..7e32c95df3 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -674,6 +674,15 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
char bootargs[CONFIG_SYS_CBSIZE] = "";
char finalbootargs[CONFIG_SYS_CBSIZE];
+ if (strlen(label->append ?: "") +
+ strlen(ip_str) + strlen(mac_str) + 1 > sizeof(bootargs)) {
+ printf("bootarg overflow %zd+%zd+%zd+1 > %zd\n",
+ strlen(label->append ?: ""),
+ strlen(ip_str), strlen(mac_str),
+ sizeof(bootargs));
+ return 1;
+ }
+
if (label->append)
strcpy(bootargs, label->append);
strcat(bootargs, ip_str);
diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c
index 2e7adca0ca..12e16d9603 100644
--- a/common/spl/spl_sata.c
+++ b/common/spl/spl_sata.c
@@ -32,6 +32,7 @@ void spl_sata_load_image(void)
hang();
} else {
/* try to recognize storage devices immediately */
+ scsi_scan(0);
stor_dev = scsi_get_dev(0);
}