Re: [PATCH v4 01/17] clk: at91: re-factor clocks suspend/resume

From: Claudiu.Beznea
Date: Thu Sep 23 2021 - 09:23:08 EST


On 23.09.2021 16:20, Claudiu Beznea wrote:
> SAMA5D2 and SAMA7G5 have a special power saving mode (backup mode) where
> most of the SoC's components are powered off (including PMC). Resuming
> from this mode is done with the help of bootloader. Peripherals are not
> aware of the power saving mode thus most of them are disabling clocks in
> proper suspend API and re-enable them in resume API without taking into
> account the previously setup rate. Moreover some of the peripherals are
> acting as wakeup sources and are not disabling the clocks in this
> scenario, when suspending. Since backup mode cuts the power for
> peripherals, in resume part these clocks needs to be re-configured.
>
> The initial PMC suspend/resume code was designed only for SAMA5D2's PMC
> (as it was the only one supporting backup mode). SAMA7G supports also
> backup mode and its PMC is different (few new functionalities, different
> registers offsets, different offsets in registers for each
> functionalities). To address both SAMA5D2 and SAMA7G5 PMC add
> .save_context()/.resume_context() support to each clocks driver and call
> this from PMC driver.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea@xxxxxxxxxxxxx>
> ---

I forgot to mention that this patch applies good on top of patch at [1].

Thank you,
Claudiu Beznea

[1]
https://lore.kernel.org/lkml/20210913082633.110168-1-clement.leger@xxxxxxxxxxx/