bus: sunxi-rsb: Split out controller init/exit functions
authorSamuel Holland <samuel@sholland.org>
Sun, 3 Jan 2021 11:06:33 +0000 (05:06 -0600)
committerChen-Yu Tsai <wens@csie.org>
Wed, 6 Jan 2021 11:33:57 +0000 (19:33 +0800)
commit22754ac9a632f9bcb2cfd91243459e679778a497
tree878f6131a7041122544e7be658b868ec95d518be
parent014d65b60e46e1af262419139c07bfa1f0775715
bus: sunxi-rsb: Split out controller init/exit functions

This separates the resource acquisition from the hardware initialization
phase, so the hardware initialization can be repeated after system
suspend/resume. The same is done for the exit/remove function, except
that there is no resource deallocation phase due to the use of devres.

The requested RSB clock frequency is stored in `struct sunxi_rsb` so it
will be available when reinitializing the hardware.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
drivers/bus/sunxi-rsb.c