]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
allwinner: Add a new clock aw_clk_m
authormanu <manu@FreeBSD.org>
Sat, 10 Aug 2019 18:50:37 +0000 (18:50 +0000)
committermanu <manu@FreeBSD.org>
Sat, 10 Aug 2019 18:50:37 +0000 (18:50 +0000)
commite294e7ee0ebb9081a350108c7b16475202c6258d
tree71f29be16968ce01eca1ea3a92e4516a35a5e798
parent5bac6ddf567f03e7bc48e5dac34c0f7e6713e71a
allwinner: Add a new clock aw_clk_m

We used the aw_clk_nm clock for clock with only one divider factor
and used a fake multiplier factor. This cannot work properly as we
end up writing the "fake" factor to the register (and so always set
the LSB to 1).
Create a new clock for those.
The reason for not using the clk_div clock is because those clocks are
a bit special. Since they are (almost) all related to video we also need
to set the parent clock (the main PLL) to a frequency that they can support.
As the main PLL have some minimal frequency that they can support we need to
be able to set the main PLL to a multiple of the desired frequency.
Let say you want to have a 71Mhz pixel clock (typical for a 1280x800 display)
and the main PLL cannot go under 192Mhz, you need to set it to 3 times the
desired frequency and set the divider to 3 on the hdmi clock.
So this also introduce the CLK_SET_ROUND_MULTIPLE flag that allow for this kind
of scenario.
sys/arm/allwinner/clkng/aw_ccung.c
sys/arm/allwinner/clkng/aw_ccung.h
sys/arm/allwinner/clkng/aw_clk.h
sys/arm/allwinner/clkng/aw_clk_m.c [new file with mode: 0644]
sys/arm/allwinner/clkng/aw_clk_m.h [new file with mode: 0644]
sys/arm/allwinner/clkng/ccu_a64.c
sys/arm/allwinner/files.allwinner
sys/conf/files.arm64
sys/dev/extres/clk/clk.h