MLK-21690 clk: imx8qm/imx8qxp: Store clock rate in SCU clock driver
Linux clock framework does not work correctly when the SCFW API returns
the rate of the clock based on the HW power mode (LP vs ON).
This causes issues in two ways:
1. Linux clock framework always calls clk_recalc() after set_rate() as
a mechanism to get the actual rate set by the HW. This does not work on
iMX8QM/iMX8QXP when the resource is in LP mode, as clocks are sourced
from 24MHz when resource is in LP mode.
2. On iMX8QM/iMX8QXP multiple resources share the same power domain.
As resources enter runtime idle, the iMXQM/QXP power domain driver in
Linux sets the resources in LP mode which can result in the entire power
domain entering LP mode. If a clock get_rate()/recalc_rate() is executed
as part of probing a new driver, the rate returned by SCFW API will not
match the rate requested by the driver.
To fix the above two problems, store the clock rate in SCU driver and
return the stored clock rate if the resource is in LP mode.
Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>