summaryrefslogtreecommitdiff
path: root/rust/kernel/net.rs
diff options
context:
space:
mode:
authorYao Zi <ziyao@disroot.org>2025-09-19 14:26:44 +0000
committerStephen Boyd <sboyd@kernel.org>2025-09-21 12:48:46 -0700
commit897117e35e180bc3f7346424c8b885ddb57fddc6 (patch)
treeb629401dac2ebb7180f8329ff28dcaf28370d917 /rust/kernel/net.rs
parent499f81848ef3bdca53122e0c3758381f7cd40934 (diff)
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: Yao Zi <ziyao@disroot.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'rust/kernel/net.rs')
0 files changed, 0 insertions, 0 deletions