Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: scmi-msg: fix clock min/max/step triplet description support #7171

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions core/drivers/scmi-msg/clock_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,20 @@ int32_t plat_scmi_clock_rates_array(unsigned int channel_id,
unsigned long *rates,
size_t *nb_elts)
{
TEE_Result res = TEE_ERROR_GENERIC;
struct scmi_clk *clk = NULL;

clk = clk_scmi_get_by_id(channel_id, scmi_id);
if (!clk)
return SCMI_DENIED;

if (clk_get_rates_array(clk->clk, start_index, rates, nb_elts))
res = clk_get_rates_array(clk->clk, start_index, rates, nb_elts);
if (res == TEE_SUCCESS)
return SCMI_SUCCESS;
else if (res == TEE_ERROR_NOT_SUPPORTED)
return SCMI_NOT_SUPPORTED;
else
return SCMI_GENERIC_ERROR;

return SCMI_SUCCESS;
}

unsigned long plat_scmi_clock_get_rate(unsigned int channel_id,
Expand Down
Loading