Unverified Commit 897117e3 authored by Yao Zi's avatar Yao Zi Committed by Stephen Boyd
Browse files

clk: loongson2: Support scale clocks with an alternative mode



LS2K0300 and LS2K1500 ship scale clocks with an alternative mode.
There's one mode bit in clock configuration register indicating the
operation mode.

When mode bit is unset, the scale clock acts the same as previous
generation of scale clocks. When it's set, a different equation for
calculating result frequency, Fout = Fin / (scale + 1), is used.

This patch adds frequency calculation support for the scale clock
variant. A helper macro, CLK_SCALE_MODE, is added to simplify
definitions.

Signed-off-by: default avatarYao Zi <ziyao@disroot.org>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 499f8184
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment