[PATCH v7 03/14] iommu/rockchip: Request irqs in rk_iommu_probe()

2018-03-05 Thread Jeffy Chen
Move request_irq to the end of rk_iommu_probe(). Suggested-by: Robin Murphy <robin.mur...@arm.com> Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> Reviewed-by: Tomasz Figa <tf...@chromium.org> --- Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4:

[PATCH v7 01/14] iommu/rockchip: Prohibit unbind and remove

2018-03-05 Thread Jeffy Chen
Removal of IOMMUs cannot be done reliably. This is similar to exynos iommu driver. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> Reviewed-by: Tomasz Figa <tf...@chromium.org> --- Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: Rewrite commit messa

[PATCH v7 00/14] iommu/rockchip: Use OF_IOMMU

2018-03-05 Thread Jeffy Chen
irq request to probe(in patch[0]) Move bus_set_iommu() to rk_iommu_probe(). Jeffy Chen (10): iommu/rockchip: Prohibit unbind and remove iommu/rockchip: Fix error handling in probe iommu/rockchip: Request irqs in rk_iommu_probe() ARM: dts: rockchip: add clocks in iommu nodes dt-bindi

[PATCH v7 14/14] iommu/rockchip: Support sharing IOMMU between masters

2018-03-05 Thread Jeffy Chen
There would be some masters sharing the same IOMMU device. Put them in the same iommu group and share the same iommu domain. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> Reviewed-by: Robin Murphy <robin.mur...@arm.com> --- Changes in v7: Use iommu_group_ref_get to av

[PATCH v7 11/14] iommu/rockchip: Use OF_IOMMU to attach devices automatically

2018-03-05 Thread Jeffy Chen
Converts the rockchip-iommu driver to use the OF_IOMMU infrastructure, which allows attaching master devices to their IOMMUs automatically according to DT properties. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> Reviewed-by: Robin Murphy <robin.mur...@arm.com> --- Changes

[PATCH v7 10/14] iommu/rockchip: Use IOMMU device for dma mapping operations

2018-03-05 Thread Jeffy Chen
Use the first registered IOMMU device for dma mapping operations, and drop the domain platform device. This is similar to exynos iommu driver. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> Reviewed-by: Tomasz Figa <tf...@chromium.org> Reviewed-by: Robin Murphy <robin

[PATCH v7 09/14] dt-bindings: iommu/rockchip: Add clock property

2018-03-05 Thread Jeffy Chen
Add clock property, since we are going to control clocks in rockchip iommu driver. Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> Reviewed-by: Rob Herring <r...@kernel.org> --- Changes in v7: None Changes in v6: Fix dt-binding as Robin suggested. Use aclk and iface clk as R

[PATCH v7 13/14] iommu/rockchip: Add runtime PM support

2018-03-05 Thread Jeffy Chen
When the power domain is powered off, the IOMMU cannot be accessed and register programming must be deferred until the power domain becomes enabled. Add runtime PM support, and use runtime PM device link from IOMMU to master to startup and shutdown IOMMU. Signed-off-by: Jeffy Chen <jeff

[PATCH v7 12/14] iommu/rockchip: Fix error handling in init

2018-03-05 Thread Jeffy Chen
It's hard to undo bus_set_iommu() in the error path, so move it to the end of rk_iommu_probe(). Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com> Reviewed-by: Tomasz Figa <tf...@chromium.org> Reviewed-by: Robin Murphy <robin.mur...@arm.com> --- Changes in v7: None Changes i

<    1   2