diff options
author | Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com> | 2017-03-31 10:29:19 -0500 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 62a36b35009da76a7e815f95189c201e66504d1e (patch) | |
tree | a32a990ac1ae5b220276d33e0131fab871b955cd /include/soc/imx8/sc/svc | |
parent | b1a8d7376fec55843ffdc7109e12425aae5ca89f (diff) |
MLK-14599-1 soc:imx8:Update SCFW API
Update SCFW API to the following commit in SCFW git:
"
'commit: ("a620caf7444c45715b68b5cf128219005598365f")'
Author: Mike <michael.kjar@nxp.com>
Date: Thu Mar 30 18:35:27 2017 -0500
Added a DDR Stress Test to the test folder
- New DDR test is like the stress test where we increment/sweep the DDR freq
- More tests may be added as development continues
- Modified mx8qm/soc.h to boot the A72 to DDR when building with option qmddr
"
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Diffstat (limited to 'include/soc/imx8/sc/svc')
-rw-r--r-- | include/soc/imx8/sc/svc/irq/api.h | 2 | ||||
-rw-r--r-- | include/soc/imx8/sc/svc/misc/api.h | 123 | ||||
-rw-r--r-- | include/soc/imx8/sc/svc/pad/api.h | 216 | ||||
-rw-r--r-- | include/soc/imx8/sc/svc/pm/api.h | 79 | ||||
-rw-r--r-- | include/soc/imx8/sc/svc/timer/api.h | 20 |
5 files changed, 253 insertions, 187 deletions
diff --git a/include/soc/imx8/sc/svc/irq/api.h b/include/soc/imx8/sc/svc/irq/api.h index ca6965ebcf18..8adc4d4dc8f2 100644 --- a/include/soc/imx8/sc/svc/irq/api.h +++ b/include/soc/imx8/sc/svc/irq/api.h @@ -62,6 +62,8 @@ typedef enum sc_irq_temp_e { SC_IRQ_TEMP_VPU_LOW = (1 << 17), /* DRC1 temp alarm interrupt */ SC_IRQ_TEMP_PMIC0_LOW = (1 << 18), /* PMIC0 temp alarm interrupt */ SC_IRQ_TEMP_PMIC1_LOW = (1 << 19), /* PMIC1 temp alarm interrupt */ + SC_IRQ_TEMP_PMIC2_HIGH = (1 << 20), /* PMIC2 temp alarm interrupt */ + SC_IRQ_TEMP_PMIC2_LOW = (1 << 21) /* PMIC2 temp alarm interrupt */ } sc_irq_temp_t; /*! diff --git a/include/soc/imx8/sc/svc/misc/api.h b/include/soc/imx8/sc/svc/misc/api.h index 0f58735a08f9..6c3cd74f4004 100644 --- a/include/soc/imx8/sc/svc/misc/api.h +++ b/include/soc/imx8/sc/svc/misc/api.h @@ -63,6 +63,11 @@ typedef enum sc_misc_seco_auth_cmd_e { /* Functions */ /*! + * @name Control Functions + * @{ + */ + +/*! * This function sets a miscellaneous control value. * * @param[in] ipc IPC handle @@ -102,28 +107,12 @@ sc_err_t sc_misc_set_control(sc_ipc_t ipc, sc_rsrc_t resource, sc_err_t sc_misc_get_control(sc_ipc_t ipc, sc_rsrc_t resource, sc_ctrl_t ctrl, uint32_t *val); +/* @} */ + /*! - * This function configures the ARI match value for PCIe/SATA resources. - * - * @param[in] ipc IPC handle - * @param[in] resource match resource - * @param[in] resource_mst PCIe/SATA master to match - * @param[in] ari ARI to match - * @param[in] enable enable match or not - * - * @return Returns an error code (SC_ERR_NONE = success). - * - * Return errors: - * - SC_PARM if arguments out of range or invalid, - * - SC_ERR_NOACCESS if caller's partition is not the owner or parent - * of the owner of the resource and translation - * - * For PCIe, the ARI is the 16-bit value that includes the bus number, - * device number, and function number. For SATA, this value includes the - * FISType and PM_Port. + * @name DMA Functions + * @{ */ -sc_err_t sc_misc_set_ari(sc_ipc_t ipc, sc_rsrc_t resource, - sc_rsrc_t resource_mst, uint16_t ari, bool enable); /*! * This function configures the max DMA channel priority group for a @@ -167,29 +156,12 @@ sc_err_t sc_misc_set_max_dma_group(sc_ipc_t ipc, sc_rm_pt_t pt, sc_err_t sc_misc_set_dma_group(sc_ipc_t ipc, sc_rsrc_t resource, sc_misc_dma_group_t group); -/*! - * This function starts/stops emulation waveform capture. - * - * @param[in] ipc IPC handle - * @param[in] enable flag to enable/disable capture - * - * @return Returns an error code (SC_ERR_NONE = success). - * - * Return errors: - * - SC_ERR_UNAVAILABLE if not running on emulation - */ -sc_err_t sc_misc_waveform_capture(sc_ipc_t ipc, bool enable); +/* @} */ /*! - * This function reports boot status. - * - * @param[in] ipc IPC handle - * @param[in] status boot status - * - * This is used by SW partitions to report status of boot. This is - * normally used to report a boot failure. + * @name Security Functions + * @{ */ -void sc_misc_boot_status(sc_ipc_t ipc, sc_misc_boot_status_t status); /*! * This function loads a SECO image. @@ -221,6 +193,77 @@ sc_err_t sc_misc_seco_authenticate(sc_ipc_t ipc, sc_misc_seco_auth_cmd_t cmd, uint32_t addr_meta); +/* @} */ + +/*! + * @name Debug Functions + * @{ + */ + +/*! + * This function is used output a debug character from the SCU UART. + * + * @param[in] ipc IPC handle + * @param[in] ch character to output + */ +void sc_misc_debug_out(sc_ipc_t ipc, uint8_t ch); + +/*! + * This function starts/stops waveform capture. + * + * @param[in] ipc IPC handle + * @param[in] enable flag to enable/disable capture + * + * @return Returns an error code (SC_ERR_NONE = success). + * + * Return errors: + * - SC_ERR_UNAVAILABLE if not running + */ +sc_err_t sc_misc_waveform_capture(sc_ipc_t ipc, bool enable); + +/* @} */ + +/*! + * @name Other Functions + * @{ + */ + +/*! + * This function configures the ARI match value for PCIe/SATA resources. + * + * @param[in] ipc IPC handle + * @param[in] resource match resource + * @param[in] resource_mst PCIe/SATA master to match + * @param[in] ari ARI to match + * @param[in] enable enable match or not + * + * @return Returns an error code (SC_ERR_NONE = success). + * + * Return errors: + * - SC_PARM if arguments out of range or invalid, + * - SC_ERR_NOACCESS if caller's partition is not the owner or parent + * of the owner of the resource and translation + * + * For PCIe, the ARI is the 16-bit value that includes the bus number, + * device number, and function number. For SATA, this value includes the + * FISType and PM_Port. + */ +sc_err_t sc_misc_set_ari(sc_ipc_t ipc, sc_rsrc_t resource, + sc_rsrc_t resource_mst, uint16_t ari, bool enable); + +/*! + * This function reports boot status. + * + * @param[in] ipc IPC handle + * @param[in] status boot status + * + * This is used by SW partitions to report status of boot. This is + * normally used to report a boot failure. + */ +void sc_misc_boot_status(sc_ipc_t ipc, sc_misc_boot_status_t status); + +/* @} */ + #endif /* _SC_MISC_API_H */ /**@}*/ diff --git a/include/soc/imx8/sc/svc/pad/api.h b/include/soc/imx8/sc/svc/pad/api.h index d8b5d8b56be9..6159f6b7cf30 100644 --- a/include/soc/imx8/sc/svc/pad/api.h +++ b/include/soc/imx8/sc/svc/pad/api.h @@ -72,19 +72,19 @@ typedef enum sc_pad_28lpp_dse_e { */ typedef enum sc_pad_28fdsio_dse_e { SC_PAD_28FDSOI_DSE_18V_1MA = 0, /* Drive strength of 1mA for 1.8v */ - SC_PAD_28FDSOI_DSE_33V_2MA = 0, /* Drive strength of 2mA for 3.3v */ - SC_PAD_28FDSOI_DSE_DV_HIGH = 0, /* Drive strength of 12mA for dual volt */ SC_PAD_28FDSOI_DSE_18V_2MA = 1, /* Drive strength of 2mA for 1.8v */ - SC_PAD_28FDSOI_DSE_33V_4MA = 1, /* Drive strength of 4mA for 3.3v */ - SC_PAD_28FDSOI_DSE_DV_LOW = 1, /* Drive strength of 12mA for dual volt */ SC_PAD_28FDSOI_DSE_18V_4MA = 2, /* Drive strength of 4mA for 1.8v */ - SC_PAD_28FDSOI_DSE_33V_8MA = 2, /* Drive strength of 8mA for 3.3v */ SC_PAD_28FDSOI_DSE_18V_6MA = 3, /* Drive strength of 6mA for 1.8v */ - SC_PAD_28FDSOI_DSE_33V_12MA = 3, /* Drive strength of 12mA for 3.3v */ SC_PAD_28FDSOI_DSE_18V_8MA = 4, /* Drive strength of 8mA for 1.8v */ SC_PAD_28FDSOI_DSE_18V_10MA = 5, /* Drive strength of 10mA for 1.8v */ SC_PAD_28FDSOI_DSE_18V_12MA = 6, /* Drive strength of 12mA for 1.8v */ - SC_PAD_28FDSOI_DSE_33V_HS = 7 /* High-speed drive strength for 1.8v */ + SC_PAD_28FDSOI_DSE_33V_2MA = 0, /* Drive strength of 2mA for 3.3v */ + SC_PAD_28FDSOI_DSE_33V_4MA = 1, /* Drive strength of 4mA for 3.3v */ + SC_PAD_28FDSOI_DSE_33V_8MA = 2, /* Drive strength of 8mA for 3.3v */ + SC_PAD_28FDSOI_DSE_33V_12MA = 3, /* Drive strength of 12mA for 3.3v */ + SC_PAD_28FDSOI_DSE_33V_HS = 7, /* High-speed drive strength for 1.8v */ + SC_PAD_28FDSOI_DSE_DV_LOW = 0, /* Low drive strength for dual volt */ + SC_PAD_28FDSOI_DSE_DV_HIGH = 1 /* High drive strength for dual volt */ } sc_pad_28fdsoi_dse_t; /*! @@ -124,6 +124,11 @@ typedef enum sc_pad_wakeup_e { /* Functions */ /*! + * @name Generic Functions + * @{ + */ + +/*! * This function configures the mux settings for a pin. This includes * the signal mux, pad config, and low-power isolation mode. * @@ -145,6 +150,28 @@ sc_err_t sc_pad_set_mux(sc_ipc_t ipc, sc_pin_t pin, uint8_t mux, sc_pad_config_t config, sc_pad_iso_t iso); /*! + * This function gets the mux settings for a pin. This includes + * the signal mux, pad config, and low-power isolation mode. + * + * @param[in] ipc IPC handle + * @param[in] pin pin to query + * @param[out] mux pointer to return mux setting + * @param[out] config pointer to return pad config + * @param[out] iso pointer to return low-power isolation mode + * + * @return Returns an error code (SC_ERR_NONE = success). + * + * Return errors: + * - SC_PARM if arguments out of range or invalid, + * - SC_ERR_NOACCESS if caller's partition is not the pin owner + * + * Refer to the SoC [Pin List](@ref PINS) for valid pin values. + */ +sc_err_t sc_pad_get_mux(sc_ipc_t ipc, sc_pin_t pin, + uint8_t *mux, sc_pad_config_t *config, + sc_pad_iso_t *iso); + +/*! * This function configures the general purpose pad control. This * is technology dependent and includes things like drive strength, * slew rate, pull up/down, etc. Refer to the SoC Reference Manual @@ -165,28 +192,24 @@ sc_err_t sc_pad_set_mux(sc_ipc_t ipc, sc_pin_t pin, sc_err_t sc_pad_set_gp(sc_ipc_t ipc, sc_pin_t pin, uint32_t ctrl); /*! - * This function configures the pad control specific to 28LPP. + * This function gets the general purpose pad control. This + * is technology dependent and includes things like drive strength, + * slew rate, pull up/down, etc. Refer to the SoC Reference Manual + * for bit field details. * * @param[in] ipc IPC handle - * @param[in] pin pin to configure - * @param[in] dse drive strength - * @param[in] sre slew rate - * @param[in] hys hysteresis - * @param[in] pe pull enable - * @param[in] ps pull select + * @param[in] pin pin to query + * @param[out] ctrl pointer to return control value * * @return Returns an error code (SC_ERR_NONE = success). * * Return errors: * - SC_PARM if arguments out of range or invalid, - * - SC_ERR_NOACCESS if caller's partition is not the pin owner, - * - SC_ERR_UNAVAILABLE if process not applicable + * - SC_ERR_NOACCESS if caller's partition is not the pin owner * * Refer to the SoC [Pin List](@ref PINS) for valid pin values. */ -sc_err_t sc_pad_set_gp_28lpp(sc_ipc_t ipc, sc_pin_t pin, - sc_pad_28lpp_dse_t dse, bool sre, bool hys, - bool pe, sc_pad_28lpp_ps_t ps); +sc_err_t sc_pad_get_gp(sc_ipc_t ipc, sc_pin_t pin, uint32_t *ctrl); /*! * This function configures the wakeup mode of the pin. @@ -206,6 +229,23 @@ sc_err_t sc_pad_set_gp_28lpp(sc_ipc_t ipc, sc_pin_t pin, sc_err_t sc_pad_set_wakeup(sc_ipc_t ipc, sc_pin_t pin, sc_pad_wakeup_t wakeup); /*! + * This function gets the wakeup mode of a pin. + * + * @param[in] ipc IPC handle + * @param[in] pin pin to query + * @param[out] wakeup pointer to return wakeup + * + * @return Returns an error code (SC_ERR_NONE = success). + * + * Return errors: + * - SC_PARM if arguments out of range or invalid, + * - SC_ERR_NOACCESS if caller's partition is not the pin owner + * + * Refer to the SoC [Pin List](@ref PINS) for valid pin values. + */ +sc_err_t sc_pad_get_wakeup(sc_ipc_t ipc, sc_pin_t pin, sc_pad_wakeup_t *wakeup); + +/*! * This function configures a pad. * * @param[in] ipc IPC handle @@ -232,36 +272,45 @@ sc_err_t sc_pad_set_all(sc_ipc_t ipc, sc_pin_t pin, uint8_t mux, sc_pad_wakeup_t wakeup); /*! - * This function gets the mux settings for a pin. This includes - * the signal mux, pad config, and low-power isolation mode. + * This function gets a pad's config. * * @param[in] ipc IPC handle * @param[in] pin pin to query * @param[out] mux pointer to return mux setting * @param[out] config pointer to return pad config * @param[out] iso pointer to return low-power isolation mode + * @param[out] ctrl pointer to return control value + * @param[out] wakeup pointer to return wakeup to set * - * @return Returns an error code (SC_ERR_NONE = success). + * @see sc_pad_set_mux(). + * @see sc_pad_set_gp(). * * Return errors: * - SC_PARM if arguments out of range or invalid, * - SC_ERR_NOACCESS if caller's partition is not the pin owner * + * @return Returns an error code (SC_ERR_NONE = success). + * * Refer to the SoC [Pin List](@ref PINS) for valid pin values. */ -sc_err_t sc_pad_get_mux(sc_ipc_t ipc, sc_pin_t pin, - uint8_t *mux, sc_pad_config_t *config, - sc_pad_iso_t *iso); +sc_err_t sc_pad_get_all(sc_ipc_t ipc, sc_pin_t pin, uint8_t *mux, + sc_pad_config_t *config, sc_pad_iso_t *iso, + uint32_t *ctrl, sc_pad_wakeup_t *wakeup); + +/* @} */ /*! - * This function gets the general purpose pad control. This - * is technology dependent and includes things like drive strength, - * slew rate, pull up/down, etc. Refer to the SoC Reference Manual - * for bit field details. + * @name SoC Specific Functions + * @{ + */ + +/*! + * This function configures the settings for a pin. This setting is SoC + * specific. * * @param[in] ipc IPC handle - * @param[in] pin pin to query - * @param[out] ctrl pointer to return control value + * @param[in] pin pin to configure + * @param[in] val value to set * * @return Returns an error code (SC_ERR_NONE = success). * @@ -271,75 +320,80 @@ sc_err_t sc_pad_get_mux(sc_ipc_t ipc, sc_pin_t pin, * * Refer to the SoC [Pin List](@ref PINS) for valid pin values. */ -sc_err_t sc_pad_get_gp(sc_ipc_t ipc, sc_pin_t pin, uint32_t *ctrl); +sc_err_t sc_pad_set(sc_ipc_t ipc, sc_pin_t pin, uint32_t val); /*! - * This function gets the pad control specific to 28LPP. + * This function gets the settings for a pin. This setting is SoC + * specific. * * @param[in] ipc IPC handle * @param[in] pin pin to query - * @param[out] dse pointer to return drive strength - * @param[out] sre pointer to return slew rate - * @param[out] hys pointer to return hysteresis - * @param[out] pe pointer to return pull enable - * @param[out] ps pointer to return pull select + * @param[out] val pointer to return setting * * @return Returns an error code (SC_ERR_NONE = success). * * Return errors: * - SC_PARM if arguments out of range or invalid, - * - SC_ERR_NOACCESS if caller's partition is not the pin owner, - * - SC_ERR_UNAVAILABLE if process not applicable + * - SC_ERR_NOACCESS if caller's partition is not the pin owner * * Refer to the SoC [Pin List](@ref PINS) for valid pin values. */ -sc_err_t sc_pad_get_gp_28lpp(sc_ipc_t ipc, sc_pin_t pin, - sc_pad_28lpp_dse_t *dse, bool *sre, bool *hys, - bool *pe, sc_pad_28lpp_ps_t *ps); +sc_err_t sc_pad_get(sc_ipc_t ipc, sc_pin_t pin, uint32_t *val); + +/* @} */ /*! - * This function gets the wakeup mode of a pin. + * @name Technology Specific Functions + * @{ + */ + +/*! + * This function configures the pad control specific to 28LPP. * * @param[in] ipc IPC handle - * @param[in] pin pin to query - * @param[out] wakeup pointer to return wakeup + * @param[in] pin pin to configure + * @param[in] dse drive strength + * @param[in] sre slew rate + * @param[in] hys hysteresis + * @param[in] pe pull enable + * @param[in] ps pull select * * @return Returns an error code (SC_ERR_NONE = success). * * Return errors: * - SC_PARM if arguments out of range or invalid, - * - SC_ERR_NOACCESS if caller's partition is not the pin owner + * - SC_ERR_NOACCESS if caller's partition is not the pin owner, + * - SC_ERR_UNAVAILABLE if process not applicable * * Refer to the SoC [Pin List](@ref PINS) for valid pin values. */ -sc_err_t sc_pad_get_wakeup(sc_ipc_t ipc, sc_pin_t pin, - sc_pad_wakeup_t *wakeup); +sc_err_t sc_pad_set_gp_28lpp(sc_ipc_t ipc, sc_pin_t pin, + sc_pad_28lpp_dse_t dse, bool sre, bool hys, + bool pe, sc_pad_28lpp_ps_t ps); /*! - * This function gets a pad's config. + * This function gets the pad control specific to 28LPP. * * @param[in] ipc IPC handle * @param[in] pin pin to query - * @param[out] mux pointer to return mux setting - * @param[out] config pointer to return pad config - * @param[out] iso pointer to return low-power isolation mode - * @param[out] ctrl pointer to return control value - * @param[out] wakeup pointer to return wakeup to set + * @param[out] dse pointer to return drive strength + * @param[out] sre pointer to return slew rate + * @param[out] hys pointer to return hysteresis + * @param[out] pe pointer to return pull enable + * @param[out] ps pointer to return pull select * - * @see sc_pad_set_mux(). - * @see sc_pad_set_gp(). + * @return Returns an error code (SC_ERR_NONE = success). * * Return errors: * - SC_PARM if arguments out of range or invalid, - * - SC_ERR_NOACCESS if caller's partition is not the pin owner - * - * @return Returns an error code (SC_ERR_NONE = success). + * - SC_ERR_NOACCESS if caller's partition is not the pin owner, + * - SC_ERR_UNAVAILABLE if process not applicable * * Refer to the SoC [Pin List](@ref PINS) for valid pin values. */ -sc_err_t sc_pad_get_all(sc_ipc_t ipc, sc_pin_t pin, uint8_t *mux, - sc_pad_config_t *config, sc_pad_iso_t *iso, - uint32_t *ctrl, sc_pad_wakeup_t *wakeup); +sc_err_t sc_pad_get_gp_28lpp(sc_ipc_t ipc, sc_pin_t pin, + sc_pad_28lpp_dse_t *dse, bool *sre, bool *hys, + bool *pe, sc_pad_28lpp_ps_t *ps); /*! * This function configures the pad control specific to 28FDSOI. @@ -436,41 +490,7 @@ sc_err_t sc_pad_get_gp_28fdsoi_comp(sc_ipc_t ipc, sc_pin_t pin, bool *nasrc_sel, bool *compok, uint8_t *nasrc); -/*! - * This function configures the settings for a pin. This setting is SoC - * specific. - * - * @param[in] ipc IPC handle - * @param[in] pin pin to configure - * @param[in] val value to set - * - * @return Returns an error code (SC_ERR_NONE = success). - * - * Return errors: - * - SC_PARM if arguments out of range or invalid, - * - SC_ERR_NOACCESS if caller's partition is not the pin owner - * - * Refer to the SoC [Pin List](@ref PINS) for valid pin values. - */ -sc_err_t sc_pad_set(sc_ipc_t ipc, sc_pin_t pin, uint32_t val); - -/*! - * This function gets the settings for a pin. This setting is SoC - * specific. - * - * @param[in] ipc IPC handle - * @param[in] pin pin to query - * @param[out] val pointer to return setting - * - * @return Returns an error code (SC_ERR_NONE = success). - * - * Return errors: - * - SC_PARM if arguments out of range or invalid, - * - SC_ERR_NOACCESS if caller's partition is not the pin owner - * - * Refer to the SoC [Pin List](@ref PINS) for valid pin values. - */ -sc_err_t sc_pad_get(sc_ipc_t ipc, sc_pin_t pin, uint32_t *val); +/* @} */ #endif /* _SC_PAD_API_H */ diff --git a/include/soc/imx8/sc/svc/pm/api.h b/include/soc/imx8/sc/svc/pm/api.h index 6044be9da3f6..f02de622d652 100644 --- a/include/soc/imx8/sc/svc/pm/api.h +++ b/include/soc/imx8/sc/svc/pm/api.h @@ -87,11 +87,12 @@ typedef enum sc_pm_clk_e { * This type is used to declare a clock mode. */ typedef enum sc_pm_clk_mode_e { - SC_PM_CLK_MODE_OFF = 0, /* Clock is disabled */ - SC_PM_CLK_MODE_ON = 1, /* Clock is enabled. */ - SC_PM_CLK_MODE_AUTOGATE_SW = 2, /* Clock is in SW autogate mode */ - SC_PM_CLK_MODE_AUTOGATE_HW = 3, /* Clock is in HW autogate mode */ - SC_PM_CLK_MODE_AUTOGATE_SW_HW = 4, /* Clock is in SW-HW autogate mode */ + SC_PM_CLK_MODE_ROM_INIT = 0, + SC_PM_CLK_MODE_OFF = 1, /* Clock is disabled */ + SC_PM_CLK_MODE_ON = 2, /* Clock is enabled. */ + SC_PM_CLK_MODE_AUTOGATE_SW = 3, /* Clock is in SW autogate mode */ + SC_PM_CLK_MODE_AUTOGATE_HW = 4, /* Clock is in HW autogate mode */ + SC_PM_CLK_MODE_AUTOGATE_SW_HW = 5, /* Clock is in SW-HW autogate mode */ } sc_pm_clk_mode_t; /*! @@ -283,6 +284,31 @@ sc_err_t sc_pm_clock_enable(sc_ipc_t ipc, sc_rsrc_t resource, */ /*! + * This function is used to reset the system. Only the owner of the + * SC_R_SYSTEM resource can do this. + * + * @param[in] ipc IPC handle + * @param[in] type reset type + * + * @return Returns an error code (SC_ERR_NONE = success). + * + * Return errors: + * - SC_ERR_PARM if invalid type + * + * If this function returns, then the reset did not occur due to an + * invalid parameter. + */ +sc_err_t sc_pm_reset(sc_ipc_t ipc, sc_pm_reset_type_t type); + +/*! + * This function gets a caller's reset reason. + * + * @param[in] ipc IPC handle + * @param[out] reason pointer to return reset reason + */ +sc_err_t sc_pm_reset_reason(sc_ipc_t ipc, sc_pm_reset_reason_t *reason); + +/*! * This function is used to boot a partition. * * @param[in] ipc IPC handle @@ -325,32 +351,6 @@ sc_err_t sc_pm_boot(sc_ipc_t ipc, sc_rm_pt_t pt, void sc_pm_reboot(sc_ipc_t ipc, sc_pm_reset_type_t type); /*! - * This function gets a caller's reset reason. - * - * @param[in] ipc IPC handle - * @param[out] reason pointer to return reset reason - */ -sc_err_t sc_pm_reset_reason(sc_ipc_t ipc, sc_pm_reset_reason_t *reason); - -/*! - * This function is used to start/stop a CPU. - * - * @param[in] ipc IPC handle - * @param[in] resource ID of the CPU resource - * @param[in] enable start if true; otherwise stop - * @param[in] address 64-bit boot 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_cpu_start(sc_ipc_t ipc, sc_rsrc_t resource, bool enable, - sc_faddr_t address); - -/*! * This function is used to reboot a partition. * * @param[in] ipc IPC handle @@ -382,21 +382,22 @@ sc_err_t sc_pm_reboot_partition(sc_ipc_t ipc, sc_rm_pt_t pt, sc_pm_reset_type_t type); /*! - * This function is used to reset the system. Only the owner of the - * SC_R_SYSTEM resource can do this. + * This function is used to start/stop a CPU. * * @param[in] ipc IPC handle - * @param[in] type reset type + * @param[in] resource ID of the CPU resource + * @param[in] enable start if true; otherwise stop + * @param[in] address 64-bit boot address * * @return Returns an error code (SC_ERR_NONE = success). * * Return errors: - * - SC_ERR_PARM if invalid type - * - * If this function returns, then the reset did not occur due to an - * invalid parameter. + * - 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_reset(sc_ipc_t ipc, sc_pm_reset_type_t type); +sc_err_t sc_pm_cpu_start(sc_ipc_t ipc, sc_rsrc_t resource, bool enable, + sc_faddr_t address); /* @} */ diff --git a/include/soc/imx8/sc/svc/timer/api.h b/include/soc/imx8/sc/svc/timer/api.h index 971fdc02b82e..c9d8d71c5ef8 100644 --- a/include/soc/imx8/sc/svc/timer/api.h +++ b/include/soc/imx8/sc/svc/timer/api.h @@ -152,6 +152,16 @@ sc_err_t sc_timer_get_rtc_time(sc_ipc_t ipc, uint16_t *year, uint8_t *mon, uint8_t *sec); /*! + * This function gets the RTC time in seconds since 1/1/1970. + * + * @param[in] ipc IPC handle + * @param[out] sec pointer to return second + * + * @return Returns an error code (SC_ERR_NONE = success). + */ +sc_err_t sc_timer_get_rtc_sec1970(sc_ipc_t ipc, uint32_t *sec); + +/*! * This function sets the RTC alarm. Only the owner of the SC_R_SYSTEM * resource can set the alarm. * @@ -173,16 +183,6 @@ sc_err_t sc_timer_set_rtc_alarm(sc_ipc_t ipc, uint16_t year, uint8_t mon, uint8_t day, uint8_t hour, uint8_t min, uint8_t sec); -/*! - * This function gets the RTC time in seconds since 1/1/1970. - * - * @param[in] ipc IPC handle - * @param[out] sec pointer to return second - * - * @return Returns an error code (SC_ERR_NONE = success). - */ -sc_err_t sc_timer_get_rtc_sec1970(sc_ipc_t ipc, uint32_t *sec); - /* @} */ #endif /* _SC_TIMER_API_H */ |