Skip to content
GitLab
Menu
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
a53fad35
Commit
a53fad35
authored
Jul 17, 2020
by
Madhukar Pappireddy
Committed by
TrustedFirmware Code Review
Jul 17, 2020
Browse files
Merge "rpi4/fdt: Move dtb_size() function to fdt_wrappers.h" into integration
parents
c82a2bcd
5a430c02
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/common/fdt_wrappers.h
View file @
a53fad35
...
...
@@ -9,6 +9,8 @@
#ifndef FDT_WRAPPERS_H
#define FDT_WRAPPERS_H
#include <libfdt_env.h>
/* Number of cells, given total length in bytes. Each cell is 4 bytes long */
#define NCELLS(len) ((len) / 4U)
...
...
@@ -37,4 +39,11 @@ int fdt_get_stdout_node_offset(const void *dtb);
uint64_t
fdtw_translate_address
(
const
void
*
dtb
,
int
bus_node
,
uint64_t
base_address
);
static
inline
uint32_t
fdt_blob_size
(
const
void
*
dtb
)
{
const
uint32_t
*
dtb_header
=
dtb
;
return
fdt32_to_cpu
(
dtb_header
[
1
]);
}
#endif
/* FDT_WRAPPERS_H */
plat/rpi/rpi4/rpi4_bl31_setup.c
View file @
a53fad35
...
...
@@ -17,6 +17,7 @@
#include <lib/xlat_tables/xlat_tables_v2.h>
#include <plat/common/platform.h>
#include <common/fdt_fixup.h>
#include <common/fdt_wrappers.h>
#include <libfdt.h>
#include <drivers/arm/gicv2.h>
...
...
@@ -200,13 +201,6 @@ void bl31_plat_arch_setup(void)
enable_mmu_el3
(
0
);
}
static
uint32_t
dtb_size
(
const
void
*
dtb
)
{
const
uint32_t
*
dtb_header
=
dtb
;
return
fdt32_to_cpu
(
dtb_header
[
1
]);
}
static
void
rpi4_prepare_dtb
(
void
)
{
void
*
dtb
=
(
void
*
)
rpi4_get_dtb_address
();
...
...
@@ -250,7 +244,7 @@ static void rpi4_prepare_dtb(void)
if
(
ret
<
0
)
ERROR
(
"Failed to pack Device Tree at %p: error %d
\n
"
,
dtb
,
ret
);
clean_dcache_range
((
uintptr_t
)
dtb
,
dtb_size
(
dtb
));
clean_dcache_range
((
uintptr_t
)
dtb
,
f
dt
_blo
b_size
(
dtb
));
INFO
(
"Changed device tree to advertise PSCI.
\n
"
);
}
...
...
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