aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-08-26 17:45:20 -0400
committerTom Rini <trini@konsulko.com>2019-08-26 17:45:20 -0400
commit12277acda0802e4517ca82842c71aae723f0da16 (patch)
tree34a610694fdcee8f19f81337f6658a84210262ee /common
parent7a4b0bc5fe70225ae3595ba81d1473c06fd6b83b (diff)
parent44de15d6867c246e7a09ef061d3de56e1799a606 (diff)
downloadu-boot-12277acda0802e4517ca82842c71aae723f0da16.zip
u-boot-12277acda0802e4517ca82842c71aae723f0da16.tar.gz
u-boot-12277acda0802e4517ca82842c71aae723f0da16.tar.bz2
Merge branch '2019-08-26-master-imports'
- Assorted minor bugfixes
Diffstat (limited to 'common')
-rw-r--r--common/board_f.c17
-rw-r--r--common/spl/Kconfig1
2 files changed, 18 insertions, 0 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 31181a9..6867abc 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -467,12 +467,29 @@ static int reserve_uboot(void)
return 0;
}
+#ifdef CONFIG_SYS_NONCACHED_MEMORY
+static int reserve_noncached(void)
+{
+ /* round down to SECTION SIZE (typicaly 1MB) limit */
+ gd->start_addr_sp &= ~(MMU_SECTION_SIZE - 1);
+ gd->start_addr_sp -= CONFIG_SYS_NONCACHED_MEMORY;
+ debug("Reserving %dM for noncached_alloc() at: %08lx\n",
+ CONFIG_SYS_NONCACHED_MEMORY >> 20, gd->start_addr_sp);
+
+ return 0;
+}
+#endif
+
/* reserve memory for malloc() area */
static int reserve_malloc(void)
{
gd->start_addr_sp = gd->start_addr_sp - TOTAL_MALLOC_LEN;
debug("Reserving %dk for malloc() at: %08lx\n",
TOTAL_MALLOC_LEN >> 10, gd->start_addr_sp);
+#ifdef CONFIG_SYS_NONCACHED_MEMORY
+ reserve_noncached();
+#endif
+
return 0;
}
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index bb56e3f..f467eca 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -435,6 +435,7 @@ config SPL_HASH_SUPPORT
config TPL_HASH_SUPPORT
bool "Support hashing drivers in TPL"
+ depends on TPL
select SHA1
select SHA256
help