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
d81e38f6
Commit
d81e38f6
authored
5 years ago
by
Sandrine Bailleux
Committed by
TrustedFirmware Code Review
5 years ago
Browse files
Options
Download
Plain Diff
Merge "FDT helper functions: Fix MISRA issues" into integration
parents
f44d291f
feb358b6
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/fdt_fixup.c
+9
-6
common/fdt_fixup.c
with
9 additions
and
6 deletions
+9
-6
common/fdt_fixup.c
View file @
d81e38f6
...
...
@@ -95,7 +95,7 @@ int dt_add_psci_node(void *fdt)
* or none have to be patched in the first place.
* Returns 1 if *one* such subnode has been found and successfully changed
* to "psci".
* Returns
-1
on error.
* Returns
negative values
on error.
*
* Call in a loop until it returns 0. Recalculate the node offset after
* it has returned 1.
...
...
@@ -109,20 +109,23 @@ static int dt_update_one_cpu_node(void *fdt, int offset)
offs
=
fdt_next_subnode
(
fdt
,
offs
))
{
const
char
*
prop
;
int
len
;
int
ret
;
prop
=
fdt_getprop
(
fdt
,
offs
,
"device_type"
,
&
len
);
if
(
!
prop
)
if
(
prop
==
NULL
)
continue
;
if
(
mem
cmp
(
prop
,
"cpu"
,
4
)
!=
0
||
len
!=
4
)
if
(
(
str
cmp
(
prop
,
"cpu"
)
!=
0
)
||
(
len
!=
4
)
)
continue
;
/* Ignore any nodes which already use "psci". */
prop
=
fdt_getprop
(
fdt
,
offs
,
"enable-method"
,
&
len
);
if
(
prop
&&
memcmp
(
prop
,
"psci"
,
5
)
==
0
&&
len
==
5
)
if
((
prop
!=
NULL
)
&&
(
strcmp
(
prop
,
"psci"
)
==
0
)
&&
(
len
==
5
))
continue
;
if
(
fdt_setprop_string
(
fdt
,
offs
,
"enable-method"
,
"psci"
))
return
-
1
;
ret
=
fdt_setprop_string
(
fdt
,
offs
,
"enable-method"
,
"psci"
);
if
(
ret
<
0
)
return
ret
;
/*
* Subnode found and patched.
* Restart to accommodate potentially changed offsets.
...
...
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