iommu/rockchip: Add pd/clk operation in iommu
authorSimon <xxm@rock-chips.com>
Fri, 16 Dec 2016 03:48:06 +0000 (11:48 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 3 Jan 2017 09:03:53 +0000 (17:03 +0800)
commit943ec345649d4752ee00de11d4e0ae0f07d07ddc
tree69440d489de522a066262305555fa8eb300774b5
parent4301c33db2829da207884f4c66bba798062db033
iommu/rockchip: Add pd/clk operation in iommu

Rk iommus share pd and clk with their masters, to make iommus independent,
iommus need to manage pd and clk by using pm_runtime_get_sync API who is
not atomic save, might lead to sleep, we change the spin lock to mutex to
satisfy the pm_runtime_get_sync, callers of rk_iommu_attach_device
and rk_iommu_map should guarantee not in a atomic path.

Change-Id: Icbe175030d36572e19740d23eae94f49fe59eb10
Signed-off-by: Simon <xxm@rock-chips.com>
drivers/iommu/rockchip-iommu.c