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
83531703
Commit
83531703
authored
Sep 02, 2016
by
Soren Brinkmann
Browse files
zynqmp: PM: Migrate to new shutdown interface
Signed-off-by:
Soren Brinkmann
<
soren.brinkmann@xilinx.com
>
parent
46cb684f
Changes
5
Hide whitespace changes
Inline
Side-by-side
plat/xilinx/zynqmp/plat_psci.c
View file @
83531703
...
...
@@ -270,7 +270,8 @@ static void __dead2 zynqmp_system_off(void)
plat_arm_interconnect_exit_coherency
();
/* Send the power down request to the PMU */
pm_system_shutdown
(
0
);
pm_system_shutdown
(
PMF_SHUTDOWN_TYPE_SHUTDOWN
,
PMF_SHUTDOWN_SUBTYPE_SUBSYSTEM
);
while
(
1
)
wfi
();
...
...
@@ -304,7 +305,8 @@ static void __dead2 zynqmp_system_reset(void)
plat_arm_interconnect_exit_coherency
();
/* Send the system reset request to the PMU */
pm_system_shutdown
(
1
);
pm_system_shutdown
(
PMF_SHUTDOWN_TYPE_RESET
,
PMF_SHUTDOWN_SUBTYPE_SUBSYSTEM
);
while
(
1
)
wfi
();
...
...
plat/xilinx/zynqmp/pm_service/pm_api_sys.c
View file @
83531703
...
...
@@ -243,11 +243,11 @@ enum pm_ret_status pm_set_wakeup_source(enum pm_node_id target,
*
* @return Returns status, either success or error+reason
*/
enum
pm_ret_status
pm_system_shutdown
(
unsigned
int
restart
)
enum
pm_ret_status
pm_system_shutdown
(
unsigned
int
type
,
unsigned
int
subtype
)
{
uint32_t
payload
[
PAYLOAD_ARG_CNT
];
PM_PACK_PAYLOAD
2
(
payload
,
PM_SYSTEM_SHUTDOWN
,
restart
);
PM_PACK_PAYLOAD
3
(
payload
,
PM_SYSTEM_SHUTDOWN
,
type
,
subtype
);
return
pm_ipi_send
(
primary_proc
,
payload
);
}
...
...
plat/xilinx/zynqmp/pm_service/pm_api_sys.h
View file @
83531703
...
...
@@ -61,7 +61,7 @@ enum pm_ret_status pm_set_wakeup_source(enum pm_node_id target,
enum
pm_node_id
wkup_node
,
unsigned
int
enable
);
enum
pm_ret_status
pm_system_shutdown
(
unsigned
int
restart
);
enum
pm_ret_status
pm_system_shutdown
(
unsigned
int
type
,
unsigned
int
subtype
);
enum
pm_ret_status
pm_init_suspend_cb
(
enum
pm_suspend_reason
reason
,
unsigned
int
latency
,
...
...
plat/xilinx/zynqmp/pm_service/pm_defs.h
View file @
83531703
...
...
@@ -225,4 +225,15 @@ enum pm_boot_status {
PM_BOOT_ERROR
,
};
enum
pm_shutdown_type
{
PMF_SHUTDOWN_TYPE_SHUTDOWN
,
PMF_SHUTDOWN_TYPE_RESET
,
};
enum
pm_shutdown_subtype
{
PMF_SHUTDOWN_SUBTYPE_SUBSYSTEM
,
PMF_SHUTDOWN_SUBTYPE_PS_ONLY
,
PMF_SHUTDOWN_SUBTYPE_SYSTEM
,
};
#endif
/* _PM_DEFS_H_ */
plat/xilinx/zynqmp/pm_service/pm_svc_main.c
View file @
83531703
...
...
@@ -152,7 +152,7 @@ uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3,
SMC_RET1
(
handle
,
(
uint64_t
)
ret
);
case
PM_SYSTEM_SHUTDOWN
:
ret
=
pm_system_shutdown
(
pm_arg
[
0
]);
ret
=
pm_system_shutdown
(
pm_arg
[
0
]
,
pm_arg
[
1
]
);
SMC_RET1
(
handle
,
(
uint64_t
)
ret
);
case
PM_REQ_NODE
:
...
...
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