msm: pil-venus: Fix iommu programming order in reset and shutdown

In reset function, venus internal clocks need to be on to access some of
the iommu registers. Fix the order to turn on the internal clocks and then
program iommu.

In the shutdown function, iommu unmap and detach should be done before
halting AXI and AXI OCMEM VBIF access. Otherwise, the iommu TLB flush can't
go through.  In addition, to avoid iommu page faults due to ARM9 accessing
unmapped memory, reset to ARM9 must be asserted before unmapping and
detaching iommu.

Change-Id: I6df152fd63b5d0583b9660370310e7a9b80ab6a8
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
1 file changed