]> git.baikalelectronics.ru Git - uboot.git/commit
clk: ti: k3-pll: Change DIV_CTRL programming to read-modify-write
authorDave Gerlach <d-gerlach@ti.com>
Tue, 7 Sep 2021 22:16:57 +0000 (17:16 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 17 Sep 2021 18:47:03 +0000 (14:47 -0400)
commit2c8fafd3e315dd3f8edaae869463a2ba8f6c9d3c
tree27eb900004ada55d5c9e4fdbce81daae50244f62
parent082c45608150b16196bc2c2e8c29c34b2d9c57ec
clk: ti: k3-pll: Change DIV_CTRL programming to read-modify-write

There are three different divider values in the DIV_CTRL register
controlled by the k3-pll driver. Currently the ti_pll_clk_set_rate
function writes the entire register when programming plld, even though
plld only resides in the lower 6 bits.

Change the plld programming to read-modify-write to only affect the
relevant bits for plld and to preserve the other two divider values
present in the upper 16 bits, otherwise they will always get set to zero
when programming plld.

Fixes: 5a5f3984a2f7 ("clk: add support for TI K3 SoC PLL")
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
drivers/clk/ti/clk-k3-pll.c