Skip to content
Snippets Groups Projects
Commit 501f0ef3 authored by Daniel Allred's avatar Daniel Allred Committed by Tom Rini
Browse files

ARM: DRA7: Add secure emif setup calls


After EMIF DRAM is configured, but before it is used,
calls are made on secure devices to reserve any configured
memory region needed by the secure world and then to lock the
EMIF firewall configuration. If any other firewall
configuration needs to be applied, it must happen before the
lock call.

Signed-off-by: default avatarDaniel Allred <d-allred@ti.com>
parent 6d132b2b
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
#include <asm/omap_common.h>
#include <asm/omap_sec_common.h>
#include <asm/utils.h>
#include <linux/compiler.h>
......@@ -1477,6 +1478,20 @@ void sdram_init(void)
debug("get_ram_size() successful");
}
#if defined(CONFIG_TI_SECURE_DEVICE)
/*
* On HS devices, do static EMIF firewall configuration
* but only do it if not already running in SDRAM
*/
if (!in_sdram)
if (0 != secure_emif_reserve())
hang();
/* On HS devices, ensure static EMIF firewall APIs are locked */
if (0 != secure_emif_firewall_lock())
hang();
#endif
if (sdram_type == EMIF_SDRAM_TYPE_DDR3 &&
(!in_sdram && !warm_reset()) && (!is_dra7xx())) {
if (emif1_enabled)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment