forked from OP-TEE/optee_os
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plat-imx: mx6: support for TZASC on 6UL/ULL
The i.MX6UL/ULL processors support only one instance of the TZC380 IP. Use only one to setup the firewall mappings. Signed-off-by: Rouven Czerwinski <[email protected]> Reviewed-by: Peng Fan <[email protected]> Acked-by: Etienne Carriere <[email protected]>
- Loading branch information
1 parent
5966660
commit 549c2eb
Showing
1 changed file
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,22 +6,39 @@ | |
* Rouven Czerwinski <[email protected]> | ||
*/ | ||
|
||
#include <config.h> | ||
#include <drivers/tzc380.h> | ||
#include <imx-regs.h> | ||
#include <imx.h> | ||
#include <mm/core_memprot.h> | ||
#include <mm/generic_ram_layout.h> | ||
|
||
/* | ||
* TZASC2_BASE is asserted non null when used. | ||
* This is needed to compile the code for i.MX6UL/L | ||
* and i.MX8MQ. | ||
*/ | ||
#ifndef TZASC2_BASE | ||
#define TZASC2_BASE 0 | ||
#endif | ||
|
||
void imx_configure_tzasc(void) | ||
{ | ||
|
||
int i; | ||
int i = 0; | ||
int end = 1; | ||
vaddr_t addr[2] = {0}; | ||
|
||
addr[0] = core_mmu_get_va(TZASC_BASE, MEM_AREA_IO_SEC); | ||
addr[1] = core_mmu_get_va(TZASC2_BASE, MEM_AREA_IO_SEC); | ||
|
||
for (i = 0; i < 2; i++) { | ||
if (IS_ENABLED(CFG_MX6Q) || IS_ENABLED(CFG_MX6D) || | ||
IS_ENABLED(CFG_MX6DL)) { | ||
assert(TZASC2_BASE != 0); | ||
addr[1] = core_mmu_get_va(TZASC2_BASE, MEM_AREA_IO_SEC); | ||
end = 2; | ||
} | ||
|
||
for (i = 0; i < end; i++) { | ||
uint8_t region = 1; | ||
|
||
tzc_init(addr[i]); | ||
|