]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
clk: at91: clk-sam9x60-pll: force write to PLL_UPDT register
authorNicolas Ferre <nicolas.ferre@microchip.com>
Wed, 27 Aug 2025 15:08:10 +0000 (17:08 +0200)
committerNicolas Ferre <nicolas.ferre@microchip.com>
Wed, 17 Sep 2025 17:15:32 +0000 (19:15 +0200)
commitaf98caeaa7b6ad11eb7b7c8bfaddc769df2889f3
tree4fe13d629b1af0fc2699c664fb95ab976dd31607
parent0c01fe49651d387776abed6a28541e80c8a93319
clk: at91: clk-sam9x60-pll: force write to PLL_UPDT register

This register is important for sequencing the commands to PLLs, so
actually write the update bits with regmap_write_bits() instead of
relying on a read/modify/write regmap command that could skip the actual
hardware write if the value is identical to the one read.

It's changed when modification is needed to the PLL, when
read-only operation is done, we could keep the call to
regmap_update_bits().

Add a comment to the sam9x60_div_pll_set_div() function that uses this
PLL_UPDT register so that it's used consistently, according to the
product's datasheet.

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Tested-by: Ryan Wanner <ryan.wanner@microchip.com> # on sama7d65 and sam9x75
Link: https://lore.kernel.org/r/20250827150811.82496-1-nicolas.ferre@microchip.com
[claudiu.beznea: fix "Alignment should match open parenthesis"
 checkpatch.pl check]
Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
drivers/clk/at91/clk-sam9x60-pll.c