Re: [PATCH v5 1/8] clk: sunxi-ng: Mark msgbox clocks as critical

Maxime Ripard
2019-12-16T14:00:34Z

[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]

On Sat, Dec 14, 2019 at 10:24:48PM -0600, Samuel Holland wrote:
> The msgbox clock is critical because the hardware it controls is shared
> between Linux and system firmware. The message box may be used by the
> EL3 secure monitor's PSCI implementation. On 64-bit sunxi SoCs, this is
> provided by ARM TF-A; 32-bit SoCs use a different implementation. The
> secure monitor uses the message box to forward requests to power
> management firmware running on a separate CPU.
>
> It is not enough for the secure monitor to enable the clock each time
> Linux performs a SMC into EL3, as both the firmware and Linux can run
> concurrently on separate CPUs. So it is never safe for Linux to turn
> this clock off, and it should be marked as critical.
>
> At this time, such power management firmware only exists for the A64 and
> H5 SoCs. However, it makes sense to take care of all CCU drivers now
> for consistency, and to ease the transition in the future once firmware
> is ported to the other SoCs.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>

This is pretty much the same case than for the AR100 clock though,
right?

I'm still not sure about why we should enable it that clock all the
time, even if you're not using the ARISC.

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]