]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:37 +0000 (15:37 -0500)
commit9f596279a9e6eb265254bacfb4e43664ef80119e
tree96176e56a28e7400fec97487842549167ab271ab
parente8e06b7797f67f64139f44eb687ec61e3f5a9afa
clk: at91: clk-sam9x60-pll: force write to PLL_UPDT register

[ Upstream commit af98caeaa7b6ad11eb7b7c8bfaddc769df2889f3 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/at91/clk-sam9x60-pll.c