Skip to content

Commit

Permalink
soc: ti: ti_sci_pm_domains: check for proper args count in xlate
Browse files Browse the repository at this point in the history
K2G devices still only use single parameter for power-domains property,
so check for this properly in the driver. Without this, every peripheral
fails to probe resulting in boot failure.

Link: https://lore.kernel.org/r/[email protected]
Fixes: efa5c01 ("soc: ti: ti_sci_pm_domains: switch to use multiple genpds instead of one")
Reported-by: Nishanth Menon <[email protected]>
Signed-off-by: Tero Kristo <[email protected]>
Acked-by: Nishanth Menon <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
  • Loading branch information
Tero Kristo authored and arndb committed Oct 29, 2020
1 parent 01eea23 commit 3d696f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/soc/ti/ti_sci_pm_domains.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static struct generic_pm_domain *ti_sci_pd_xlate(
struct genpd_onecell_data *genpd_data = data;
unsigned int idx = genpdspec->args[0];

if (genpdspec->args_count < 2)
if (genpdspec->args_count != 1 && genpdspec->args_count != 2)
return ERR_PTR(-EINVAL);

if (idx >= genpd_data->num_domains) {
Expand Down

0 comments on commit 3d696f4

Please sign in to comment.