diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2017-10-16 23:40:31 +0800 |
---|---|---|
committer | Abel Vesa <abel.vesa@nxp.com> | 2018-06-11 10:08:39 +0300 |
commit | 1ca2c3e540431f41dda3b809779e1da08d3a8375 (patch) | |
tree | a3ace1f563961a0c54c5a47ec45a683dc6c0f7d4 /plat/imx/common/include | |
parent | 1b324bd02d34f2b0868bd43fbe9a3b8c529d7c37 (diff) |
Add SCFW APIs to support suspend/resume
Add SCFW APIs to support suspend/resume with all CPUs
power down.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Diffstat (limited to 'plat/imx/common/include')
-rw-r--r--[-rwxr-xr-x] | plat/imx/common/include/sci/svc/pm/api.h | 41 | ||||
-rw-r--r--[-rwxr-xr-x] | plat/imx/common/include/sci/types.h | 5 |
2 files changed, 44 insertions, 2 deletions
diff --git a/plat/imx/common/include/sci/svc/pm/api.h b/plat/imx/common/include/sci/svc/pm/api.h index ec70010d..30a35a0c 100755..100644 --- a/plat/imx/common/include/sci/svc/pm/api.h +++ b/plat/imx/common/include/sci/svc/pm/api.h @@ -222,8 +222,7 @@ sc_err_t sc_pm_get_sys_power_mode(sc_ipc_t ipc, sc_rm_pt_t pt, * - SC_ERR_NOACCESS if caller's partition is not the resource owner * or parent of the owner * - * Note only SC_PM_PW_MODE_OFF and SC_PM_PW_MODE_ON are valid. Other modes - * will return an error. Resources set to SC_PM_PW_MODE_ON will reflect the + * Resources set to SC_PM_PW_MODE_ON will reflect the * power mode of the partition and will change as that changes. * * Note some resources are still not accessible even when powered up if bus @@ -251,6 +250,44 @@ sc_err_t sc_pm_set_resource_power_mode(sc_ipc_t ipc, sc_rsrc_t resource, sc_err_t sc_pm_get_resource_power_mode(sc_ipc_t ipc, sc_rsrc_t resource, sc_pm_power_mode_t *mode); +/*! + * This function requests the low power mode some of the resources + * can enter based on their state. This API is only valid for the + * following resources : SC_R_A53, SC_R_A53_0, SC_R_A53_1, SC_A53_2, + * SC_A53_3, SC_R_A72, SC_R_A72_0, SC_R_A72_1, SC_R_CC1, SC_R_A35, + * SC_R_A35_0, SC_R_A35_1, SC_R_A35_2, SC_R_A35_3. + * For all other resources it will return SC_ERR_PARAM. + * This function will set the low power mode the cores, cluster + * and cluster associated resources will enter when all the cores + * in a given cluster execute WFI + * + * @param[in] ipc IPC handle + * @param[in] resource ID of the resource + * @param[out] mode pointer to return power mode + * + * @return Returns an error code (SC_ERR_NONE = success). + * + */ +sc_err_t sc_pm_req_low_power_mode(sc_ipc_t ipc, sc_rsrc_t resource, + sc_pm_power_mode_t mode); + +/*! + * This function is used to set the resume address of a CPU. + * + * @param[in] ipc IPC handle + * @param[in] resource ID of the CPU resource + * @param[in] address 64-bit resume address + * + * @return Returns an error code (SC_ERR_NONE = success). + * + * Return errors: + * - SC_ERR_PARM if invalid resource or address, + * - SC_ERR_NOACCESS if caller's partition is not the parent of the + * resource (CPU) owner + */ +sc_err_t sc_pm_set_cpu_resume_addr(sc_ipc_t ipc, sc_rsrc_t resource, + sc_faddr_t address); + /* @} */ /*! diff --git a/plat/imx/common/include/sci/types.h b/plat/imx/common/include/sci/types.h index a35058dc..f07e0a4f 100755..100644 --- a/plat/imx/common/include/sci/types.h +++ b/plat/imx/common/include/sci/types.h @@ -27,6 +27,7 @@ #define SC_10MHZ 10000000 /* 10MHz */ #define SC_20MHZ 20000000 /* 20MHz */ #define SC_25MHZ 25000000 /* 25MHz */ +#define SC_27MHZ 27000000 /* 27MHz */ #define SC_40MHZ 40000000 /* 40MHz */ #define SC_45MHZ 45000000 /* 45MHz */ #define SC_50MHZ 50000000 /* 50MHz */ @@ -90,6 +91,7 @@ #define SC_24MHZ 24000000 /* 24MHz */ #define SC_120MHZ 120000000 /* 120MHz */ #define SC_132MHZ 132000000 /* 132MHz */ +#define SC_144MHZ 144000000 /* 144MHz */ #define SC_192MHZ 192000000 /* 192MHz */ #define SC_211MHZ 211200000 /* 211.2MHz */ #define SC_240MHZ 240000000 /* 240MHz */ @@ -102,6 +104,7 @@ #define SC_600MHZ 600000000 /* 600MHz */ #define SC_744MHZ 744000000 /* 744MHz */ #define SC_792MHZ 792000000 /* 792MHz */ +#define SC_864MHZ 864000000 /* 864MHz */ #define SC_960MHZ 960000000 /* 960MHz */ #define SC_1056MHZ 1056000000 /* 1056MHz */ #define SC_1200MHZ 1200000000 /* 1.2GHz */ @@ -693,6 +696,8 @@ typedef enum sc_rsrc_e { SC_R_BOARD_R5 = 529, SC_R_BOARD_R6 = 530, SC_R_BOARD_R7 = 531, + SC_R_MJPEG_DEC_MP = 532, + SC_R_MJPEG_ENC_MP = 533, SC_R_LAST } sc_rsrc_t; |