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
5d582ff9
Commit
5d582ff9
authored
3 years ago
by
Manish Pandey
Committed by
TrustedFirmware Code Review
3 years ago
Browse files
Options
Download
Plain Diff
Merge "refactor(plat/st): avoid fixed DT address" into integration
parents
96a0f978
c20b0606
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
plat/st/common/include/stm32mp_dt.h
+4
-3
plat/st/common/include/stm32mp_dt.h
plat/st/common/stm32mp_dt.c
+10
-9
plat/st/common/stm32mp_dt.c
plat/st/stm32mp1/bl2_plat_setup.c
+1
-1
plat/st/stm32mp1/bl2_plat_setup.c
plat/st/stm32mp1/sp_min/sp_min_setup.c
+1
-1
plat/st/stm32mp1/sp_min/sp_min_setup.c
with
16 additions
and
14 deletions
+16
-14
plat/st/common/include/stm32mp_dt.h
View file @
5d582ff9
/*
* Copyright (c) 2020, STMicroelectronics - All Rights Reserved
* Copyright (c) 2017-201
9
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2020
-2021
, STMicroelectronics - All Rights Reserved
* Copyright (c) 2017-20
2
1, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -9,6 +9,7 @@
#define STM32MP_DT_H
#include <stdbool.h>
#include <stdint.h>
#define DT_DISABLED U(0)
#define DT_NON_SECURE U(1)
...
...
@@ -25,7 +26,7 @@ struct dt_node_info {
/*******************************************************************************
* Function and variable prototypes
******************************************************************************/
int
dt_open_and_check
(
void
);
int
dt_open_and_check
(
uintptr_t
dt_addr
);
int
fdt_get_address
(
void
**
fdt_addr
);
bool
fdt_check_node
(
int
node
);
uint8_t
fdt_get_status
(
int
node
);
...
...
This diff is collapsed.
Click to expand it.
plat/st/common/stm32mp_dt.c
View file @
5d582ff9
...
...
@@ -19,20 +19,19 @@
#include <stm32mp_dt.h>
static
int
fdt_checked
;
static
void
*
fdt
=
(
void
*
)(
uintptr_t
)
STM32MP_DTB_BASE
;
static
void
*
fdt
;
/*******************************************************************************
* This function checks device tree file with its header.
* Returns 0 on success and a negative FDT error code on failure.
******************************************************************************/
int
dt_open_and_check
(
void
)
int
dt_open_and_check
(
uintptr_t
dt_addr
)
{
int
ret
=
fdt_check_header
(
fdt
)
;
int
ret
;
ret
=
fdt_check_header
((
void
*
)
dt_addr
);
if
(
ret
==
0
)
{
fdt
_checked
=
1
;
fdt
=
(
void
*
)
dt_addr
;
}
return
ret
;
...
...
@@ -45,11 +44,13 @@ int dt_open_and_check(void)
******************************************************************************/
int
fdt_get_address
(
void
**
fdt_addr
)
{
if
(
fdt
_checked
==
1
)
{
*
fdt_addr
=
fdt
;
if
(
fdt
==
NULL
)
{
return
0
;
}
return
fdt_checked
;
*
fdt_addr
=
fdt
;
return
1
;
}
/*******************************************************************************
...
...
This diff is collapsed.
Click to expand it.
plat/st/stm32mp1/bl2_plat_setup.c
View file @
5d582ff9
...
...
@@ -196,7 +196,7 @@ void bl2_el3_plat_arch_setup(void)
configure_mmu
();
if
(
dt_open_and_check
()
<
0
)
{
if
(
dt_open_and_check
(
STM32MP_DTB_BASE
)
<
0
)
{
panic
();
}
...
...
This diff is collapsed.
Click to expand it.
plat/st/stm32mp1/sp_min/sp_min_setup.c
View file @
5d582ff9
...
...
@@ -146,7 +146,7 @@ void sp_min_early_platform_setup2(u_register_t arg0, u_register_t arg1,
bl_params
=
bl_params
->
next_params_info
;
}
if
(
dt_open_and_check
()
<
0
)
{
if
(
dt_open_and_check
(
STM32MP_DTB_BASE
)
<
0
)
{
panic
();
}
...
...
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