]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
clk: keystone: sci-clk: Add restore_context() operation
authorThomas Richard (TI) <thomas.richard@bootlin.com>
Tue, 19 May 2026 15:06:58 +0000 (17:06 +0200)
committerNishanth Menon <nm@ti.com>
Tue, 26 May 2026 11:44:33 +0000 (06:44 -0500)
commit3c5912373340cb79db6585f0fcd8107198d4933d
tree11e147da8454d472c2415a1bb7f72fcfc397c502
parent703b341fdd875c2d9c30a835021689e5a430a39a
clk: keystone: sci-clk: Add restore_context() operation

Implement the restore_context() operation to restore the clock rate
and the clock parent state. The clock rate is saved in sci_clk struct
during set_rate() and recalc_rate() operations. The parent index
is saved in sci_clk struct during set_parent() operation. During
clock registration, the core retrieves each clock’s parent using
get_parent() operation to ensure the internal clock tree reflects
the actual hardware state, including any configurations made by the
bootloader. So we also save the parent index in get_parent().

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Kendall Willis <k-willis@ti.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Thomas Richard (TI) <thomas.richard@bootlin.com>
Link: https://patch.msgid.link/20260519-ti-sci-jacinto-s2r-restore-irq-v9-3-c550a8ae0f31@bootlin.com
Signed-off-by: Nishanth Menon <nm@ti.com>
drivers/clk/keystone/sci-clk.c