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
dbf5789e
Commit
dbf5789e
authored
11 years ago
by
Jon Medhurst
Committed by
Sandrine Bailleux
11 years ago
Browse files
Options
Download
Email Patches
Plain Diff
juno: Implement SCPI Set CSS Power State command
Signed-off-by:
Jon Medhurst
<
tixy@linaro.org
>
parent
0aadcc0f
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/scpi.c
+11
-0
plat/juno/scpi.c
plat/juno/scpi.h
+9
-0
plat/juno/scpi.h
with
20 additions
and
0 deletions
+20
-0
plat/juno/scpi.c
View file @
dbf5789e
...
...
@@ -112,3 +112,14 @@ int scpi_wait_ready(void)
return
response
==
SCP_OK
?
0
:
-
1
;
}
void
scpi_set_css_power_state
(
unsigned
mpidr
,
scpi_power_state
cpu_state
,
scpi_power_state
cluster_state
,
scpi_power_state
css_state
)
{
uint32_t
state
=
mpidr
&
0x0f
;
/* CPU ID */
state
|=
(
mpidr
&
0xf00
)
>>
4
;
/* Cluster ID */
state
|=
cpu_state
<<
8
;
state
|=
cluster_state
<<
12
;
state
|=
css_state
<<
16
;
scpi_secure_send32
(
SCPI_CMD_SET_CSS_POWER_STATE
,
state
);
}
This diff is collapsed.
Click to expand it.
plat/juno/scpi.h
View file @
dbf5789e
...
...
@@ -58,8 +58,17 @@ typedef uint32_t spci_status;
typedef
enum
{
SCPI_CMD_SCP_READY
=
0x01
,
SCPI_CMD_SET_CSS_POWER_STATE
=
0x04
,
}
spci_command
;
typedef
enum
{
scpi_power_on
=
0
,
scpi_power_retention
=
1
,
scpi_power_off
=
3
,
}
scpi_power_state
;
extern
int
scpi_wait_ready
(
void
);
extern
void
scpi_set_css_power_state
(
unsigned
mpidr
,
scpi_power_state
cpu_state
,
scpi_power_state
cluster_state
,
scpi_power_state
css_state
);
#endif
/* __SCPI_H__ */
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