Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
06f1af91
Commit
06f1af91
authored
11 years ago
by
Jon Medhurst
Committed by
Sandrine Bailleux
11 years ago
Browse files
Options
Download
Email Patches
Plain Diff
juno: Initialise TZC-400
Signed-off-by:
Jon Medhurst
<
tixy@linaro.org
>
parent
0be17c44
v0.3-Juno
v0.3-Juno-0.3
v0.3-Juno-0.2
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plat/juno/bl1_plat_setup.c
+40
-0
plat/juno/bl1_plat_setup.c
plat/juno/platform.h
+1
-0
plat/juno/platform.h
with
41 additions
and
0 deletions
+41
-0
plat/juno/bl1_plat_setup.c
View file @
06f1af91
...
...
@@ -136,6 +136,45 @@ static void init_nic400(void)
}
#define TZC400_GATE_KEEPER_REG 0x008
#define TZC400_REGION_ATTRIBUTES_0_REG 0x110
#define TZC400_REGION_ID_ACCESS_0_REG 0x114
#define TZC400_NSAID_WR_EN (1 << 16)
#define TZC400_NSAID_RD_EN (1 << 0)
#define TZC400_NSAID_RD_RW (TZC400_NSAID_WR_EN | TZC400_NSAID_RD_EN)
static
void
init_tzc400
(
void
)
{
/* Enable all filter units available */
mmio_write_32
(
TZC400_BASE
+
TZC400_GATE_KEEPER_REG
,
0x0000000f
);
/*
* Secure read and write are enabled for region 0, and the background
* region (region 0) is enabled for all four filter units
*/
mmio_write_32
(
TZC400_BASE
+
TZC400_REGION_ATTRIBUTES_0_REG
,
0xc0000000
);
/*
* Enable Non-secure read/write accesses for the Soc Devices from the
* Non-Secure World
*/
mmio_write_32
(
TZC400_BASE
+
TZC400_REGION_ID_ACCESS_0_REG
,
(
TZC400_NSAID_RD_RW
<<
0
)
|
/* CCI400 */
(
TZC400_NSAID_RD_RW
<<
1
)
|
/* PCIE */
(
TZC400_NSAID_RD_RW
<<
2
)
|
/* HDLCD0 */
(
TZC400_NSAID_RD_RW
<<
3
)
|
/* HDLCD1 */
(
TZC400_NSAID_RD_RW
<<
4
)
|
/* USB */
(
TZC400_NSAID_RD_RW
<<
5
)
|
/* DMA330 */
(
TZC400_NSAID_RD_RW
<<
6
)
|
/* THINLINKS */
(
TZC400_NSAID_RD_RW
<<
9
)
|
/* AP */
(
TZC400_NSAID_RD_RW
<<
10
)
|
/* GPU */
(
TZC400_NSAID_RD_RW
<<
11
)
|
/* SCP */
(
TZC400_NSAID_RD_RW
<<
12
)
/* CORESIGHT */
);
}
/*******************************************************************************
* Function which will perform any remaining platform-specific setup that can
* occur after the MMU and data cache have been enabled.
...
...
@@ -143,6 +182,7 @@ static void init_nic400(void)
void
bl1_platform_setup
(
void
)
{
init_nic400
();
init_tzc400
();
/* Initialise the IO layer and register platform IO devices */
io_setup
();
...
...
This diff is collapsed.
Click to expand it.
plat/juno/platform.h
View file @
06f1af91
...
...
@@ -110,6 +110,7 @@
#define DEVICE0_BASE 0x20000000
#define DEVICE0_SIZE 0x0e000000
#define CSS_NIC400_BASE 0x2a000000
#define TZC400_BASE 0x2a4a0000
#define NSRAM_BASE 0x2e000000
#define NSRAM_SIZE 0x00008000
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help