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

From: Maxime Ripard
Date: Mon Dec 16 2019 - 09:00:31 EST


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@xxxxxxxxxxxx>

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: signature.asc
Description: PGP signature