irqchip/gic-pm: Update driver to use clk_bulk APIs
authorSameer Pujar <spujar@nvidia.com>
Fri, 22 Mar 2019 12:13:04 +0000 (17:43 +0530)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 29 Apr 2019 14:45:01 +0000 (15:45 +0100)
commitfe00f8900ca71a991849b9413f0bfa0ec50f0ad4
tree2492258a0f8a4a678a013b14f067e97f82d7affb
parent08970ecf744e09837bb6620c95406710f4c81ae2
irqchip/gic-pm: Update driver to use clk_bulk APIs

gic-pm driver is using pm-clk framework to manage clock resources, where
clocks remain always ON. This happens on Tegra devices which use BPMP
co-processor to manage the clocks. Calls to BPMP are always blocking and
hence it is necessary to enable/disable clocks during prepare/unprepare
phase respectively. When pm-clk is used, prepare count of clock is not
balanced until pm_clk_remove() happens. Clock is prepared in the driver
probe() and thus prepare count of clock remains non-zero, which in turn
keeps clock ON always.

Please note that above mentioned behavior is specific to Tegra devices
using BPMP for clock management and this should not be seen on other
devices. Though this patch uses clk_bulk APIs to address the mentioned
behavior, this works fine for all devices.

To simplify gic_get_clocks() API is removed and instead probe can do
necessary setup.

Suggested-by: Mohan Kumar D <mkumard@nvidia.com>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
drivers/irqchip/irq-gic-pm.c