clk: at91: clk-generated: make gclk determine audio_pll rate
authorQuentin Schulz <quentin.schulz@free-electrons.com>
Thu, 10 Aug 2017 06:34:05 +0000 (08:34 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Fri, 1 Sep 2017 22:46:54 +0000 (15:46 -0700)
commit1a1a36d72e3d34afbb738bd3b00a0b09382962fb
treea55ce24a9f4f926c11ef431d6c058558263f9603
parent8a8f4bf0c48055f0648b5449f4685b6cd0fc1c85
clk: at91: clk-generated: make gclk determine audio_pll rate

This allows gclk to determine audio_pll rate and set the parent rate
accordingly.

However, there are multiple children clocks that could technically
change the rate of audio_pll (via gck). With the rate locking, the first
consumer to enable the clock will be the one definitely setting the rate
of the clock.

Since audio IPs are most likely to request the same rate, we enforce
that the only clks able to modify gck rate are those of audio IPs.

To remain consistent, we deny other clocks to be children of audio_pll.

Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/at91/clk-generated.c