Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] pmdomain: amlogic: duplicated memory power-up loop in
  meson_ee_pwrc_on()
--

commit a69a64ee3e13ba7f9072dbadb0f25ec3e146c336
Author: Ronald Claveau <[email protected]>

pmdomain: amlogic: meson-ee-pwrc: power up memories for boot-enabled domains

This commit introduces a helper to clear the HHI memory power-down bits
for power domains that are found already enabled at probe time.

> diff --git a/drivers/pmdomain/amlogic/meson-ee-pwrc.c 
> b/drivers/pmdomain/amlogic/meson-ee-pwrc.c
> index 338f70d77bf03..404af46192562 100644
> --- a/drivers/pmdomain/amlogic/meson-ee-pwrc.c
> +++ b/drivers/pmdomain/amlogic/meson-ee-pwrc.c
> @@ -428,6 +428,16 @@ static int meson_ee_pwrc_on(struct generic_pm_domain 
> *domain)
>                                      pwrc_domain->clks);
>  }
>  
> +static void meson_ee_pwrc_mem_power_up(struct meson_ee_pwrc_domain *dom)
> +{
> +     int i;
> +
> +     for (i = 0; i < dom->desc.mem_pd_count; i++)
> +             regmap_update_bits(dom->pwrc->regmap_hhi,
> +                                dom->desc.mem_pd[i].reg,
> +                                dom->desc.mem_pd[i].mask, 0);
> +}

[Severity: Low]
This isn't a bug, but meson_ee_pwrc_on() right above has the same loop:

drivers/pmdomain/amlogic/meson-ee-pwrc.c:meson_ee_pwrc_on() {
    ...
        for (i = 0 ; i < pwrc_domain->desc.mem_pd_count ; ++i)
                regmap_update_bits(pwrc_domain->pwrc->regmap_hhi,
                                   pwrc_domain->desc.mem_pd[i].reg,
                                   pwrc_domain->desc.mem_pd[i].mask, 0);
    ...
}

Could meson_ee_pwrc_mem_power_up() be defined above meson_ee_pwrc_on()
and reused there as well?

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=6

Reply via email to