arm64: ZynqMP SoC changes for v5.20
- Register SGI separately out of EEMI -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCYsbo6QAKCRDKSWXLKUoM IRL/AJ9mGQtMNdf1hmlf6M+9IMGWcIFJ+gCeKzBZ5LTEDLszQDxqHyHrtxDQ0Uw= =SSyQ -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLH2J0ACgkQmmx57+YA GNkNcg//VEbdBHgjNmTriDMWV1+g8dz4l0wrlUHBgza0ZEKZJ4DuM61r7WT5+M/3 u+ahD4ZV2EdUk95OhHFRPI2bjKZBvHLJSdWColjD/Xd8Vd4PqmYkviv/080hB5tF lcM86m3G0IFWoeBExn7kdvc7q9uLEl7jn4UhqiukTqOeVquv54w/MG5df4k70oKX 60KUY+eScYenj2cGKnb+/D1XMWde1bhAoADss3UtlxdS6PTc8zdHsoi6L/0BslPg 5zOAH0Bat/Y+9Z92jHatw1LBpwh4pB8MRzD6E+m4t/hA7YvhF7MfWXEEKBRJ1XcI ekHzKqDO1+GBEfiZ1/+ZpgB4rGcTFqdtOYJPp5GiJbt/ju281fm7gq5WSP107kLN l6TR8WLC+PjJaR60oqWH9uooUWaMWP84WPwPGIWYt5En13KFDkQNlZnS2EKDMzlR c3O3v2FXkSrPb7XV7sg///dSuS4G2Qkt6LD5ZnU+qRE4mlOYhHdCZvC5e8bX4iFV vDTe8cUbmTmfdRI2kZrHeWKwRuMNLk9WM7w5OtL5NdD9155ZSUMs6VEtoWyDbFHT BEMMOm5YfufYG/h3ZvT3ylTeCO9BQ1T8biuKwmdvshy5t9OiJ5rthgtLIYwzWfZx M5XdESDnwCJVdnSpwvhSsDJ1HgU9tndVIHyubFPLg4sxb3U3TBw= =CF+P -----END PGP SIGNATURE----- Merge tag 'zynqmp-soc-for-v5.20' of https://github.com/Xilinx/linux-xlnx into arm/soc arm64: ZynqMP SoC changes for v5.20 - Register SGI separately out of EEMI * tag 'zynqmp-soc-for-v5.20' of https://github.com/Xilinx/linux-xlnx: firmware: xilinx: Add TF_A_PM_REGISTER_SGI SMC call Link: https://lore.kernel.org/r/0196d1f3-e9c7-ef51-143d-e98b14980f63@monstr.eu Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
8fcdf10295
@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Xilinx Zynq MPSoC Firmware layer
|
||||
*
|
||||
* Copyright (C) 2014-2021 Xilinx, Inc.
|
||||
* Copyright (C) 2014-2022 Xilinx, Inc.
|
||||
*
|
||||
* Michal Simek <michal.simek@xilinx.com>
|
||||
* Davorin Mista <davorin.mista@aggios.com>
|
||||
@ -340,6 +340,20 @@ int zynqmp_pm_invoke_fn(u32 pm_api_id, u32 arg0, u32 arg1,
|
||||
static u32 pm_api_version;
|
||||
static u32 pm_tz_version;
|
||||
|
||||
int zynqmp_pm_register_sgi(u32 sgi_num, u32 reset)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = zynqmp_pm_invoke_fn(TF_A_PM_REGISTER_SGI, sgi_num, reset, 0, 0,
|
||||
NULL);
|
||||
if (!ret)
|
||||
return ret;
|
||||
|
||||
/* try old implementation as fallback strategy if above fails */
|
||||
return zynqmp_pm_invoke_fn(PM_IOCTL, 0, IOCTL_REGISTER_SGI, sgi_num,
|
||||
reset, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* zynqmp_pm_get_api_version() - Get version number of PMU PM firmware
|
||||
* @version: Returned version value
|
||||
|
@ -647,8 +647,7 @@ static int xlnx_event_manager_probe(struct platform_device *pdev)
|
||||
cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "soc/event:starting",
|
||||
xlnx_event_cpuhp_start, xlnx_event_cpuhp_down);
|
||||
|
||||
ret = zynqmp_pm_invoke_fn(PM_IOCTL, 0, IOCTL_REGISTER_SGI, sgi_num,
|
||||
0, NULL);
|
||||
ret = zynqmp_pm_register_sgi(sgi_num, 0);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "SGI %d Registration over TF-A failed with %d\n", sgi_num, ret);
|
||||
xlnx_event_cleanup_sgi(pdev);
|
||||
@ -681,7 +680,7 @@ static int xlnx_event_manager_remove(struct platform_device *pdev)
|
||||
kfree(eve_data);
|
||||
}
|
||||
|
||||
ret = zynqmp_pm_invoke_fn(PM_IOCTL, 0, IOCTL_REGISTER_SGI, 0, 1, NULL);
|
||||
ret = zynqmp_pm_register_sgi(0, 1);
|
||||
if (ret)
|
||||
dev_err(&pdev->dev, "SGI unregistration over TF-A failed with %d\n", ret);
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
#define PM_API_VERSION_2 2
|
||||
|
||||
/* ATF only commands */
|
||||
#define TF_A_PM_REGISTER_SGI 0xa04
|
||||
#define PM_GET_TRUSTZONE_VERSION 0xa03
|
||||
#define PM_SET_SUSPEND_MODE 0xa02
|
||||
#define GET_CALLBACK_DATA 0xa01
|
||||
@ -468,6 +469,7 @@ int zynqmp_pm_feature(const u32 api_id);
|
||||
int zynqmp_pm_is_function_supported(const u32 api_id, const u32 id);
|
||||
int zynqmp_pm_set_feature_config(enum pm_feature_config_id id, u32 value);
|
||||
int zynqmp_pm_get_feature_config(enum pm_feature_config_id id, u32 *payload);
|
||||
int zynqmp_pm_register_sgi(u32 sgi_num, u32 reset);
|
||||
#else
|
||||
static inline int zynqmp_pm_get_api_version(u32 *version)
|
||||
{
|
||||
@ -733,6 +735,11 @@ static inline int zynqmp_pm_get_feature_config(enum pm_feature_config_id id,
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int zynqmp_pm_register_sgi(u32 sgi_num, u32 reset)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __FIRMWARE_ZYNQMP_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user