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 enable and disable IOMMU.
Signed-off-by: Jeffy Chen <jeffy.c...@r
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
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 v8: None
Changes in v7:
Use iommu_g
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: Robin Murphy <robin.mur...@arm.com>
---
Changes in v8: None
Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes
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 v8: None
Changes i
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
From: Tomasz Figa <tf...@chromium.org>
This patch converts the rockchip-iommu driver to use the in-kernel
iopoll helpers to wait for certain status bits to change in registers
instead of an open-coded custom macro.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by
omium.org>
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
Acked-by: Robin Murphy <robin.mur...@arm.com>
---
Changes in v8: None
Changes in v7: None
Changes in v6:
Fix dt-binding as Robin suggested.
Use aclk and iface clk as Rob and Robin suggested, and split binding
patch.
Cha
From: Tomasz Figa <tf...@chromium.org>
Due to the bug in current code, only first IOMMU has the TLB lines
flushed in rk_iommu_zap_lines. This patch fixes the inner loop to
execute for all IOMMUs and properly flush the TLB.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by
z Figa <tf...@chromium.org>
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
Reviewed-by: Robin Murphy <robin.mur...@arm.com>
---
Changes in v8: None
Changes in v7: None
Changes in v6: None
Changes in v5:
Use out labels to save the duplication between the error and success pat
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>
Acked-by: Robin Murphy <robin.mur...@arm.com>
---
Changes in v8: None
Changes in v7: None
Changes in v6: None
Changes in v5:
Add missing iommu_device_sysfs_remove in error path.
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
Reviewed-by: Tomasz Figa <tf...@chromium.org>
Acked-by: Robin Murphy <robin.mur...@arm.com>
---
Changes in v8:
Don't introduce the additional return.
Changes in v7:
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>
Acked-by: Robin Murphy <robin.mur...@arm.com>
---
Changes in v8:
Rebase on newest for-next.
C
in rk_iommu_irq().
Remove rk_iommudata->domain.
Changes in v2:
Move 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 i
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
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
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
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
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
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
he VB2 framework using DMA
mapping API and doesn't engage the master driver at all.
This patch fixes the problem by letting clocks needed for IOMMU
operation to be listed in Device Tree and making the driver enable them
for the time of accessing the hardware.
Signed-off-by: Jeffy Chen <jeffy.
From: Tomasz Figa <tf...@chromium.org>
This patch converts the rockchip-iommu driver to use the in-kernel
iopoll helpers to wait for certain status bits to change in registers
instead of an open-coded custom macro.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by
From: Tomasz Figa <tf...@chromium.org>
Due to the bug in current code, only first IOMMU has the TLB lines
flushed in rk_iommu_zap_lines. This patch fixes the inner loop to
execute for all IOMMUs and properly flush the TLB.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by
z Figa <tf...@chromium.org>
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
Reviewed-by: Robin Murphy <robin.mur...@arm.com>
---
Changes in v7: None
Changes in v6: None
Changes in v5:
Use out labels to save the duplication between the error and success paths.
Changes in v4:
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:
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
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
Add missing iommu_device_sysfs_remove in error path.
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: None
Changes in v3: None
Changes in v2: None
d
Increase group refcounting in omap_iommu_device_group().
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
---
drivers/iommu/omap-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index e135ab
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 v6: None
Changes i
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 v6: None
Changes in v5: None
Changes
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
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
From: Tomasz Figa <tf...@chromium.org>
Due to the bug in current code, only first IOMMU has the TLB lines
flushed in rk_iommu_zap_lines. This patch fixes the inner loop to
execute for all IOMMUs and properly flush the TLB.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by
From: Tomasz Figa <tf...@chromium.org>
This patch converts the rockchip-iommu driver to use the in-kernel
iopoll helpers to wait for certain status bits to change in registers
instead of an open-coded custom macro.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by
he VB2 framework using DMA
mapping API and doesn't engage the master driver at all.
This patch fixes the problem by letting clocks needed for IOMMU
operation to be listed in Device Tree and making the driver enable them
for the time of accessing the hardware.
Signed-off-by: Jeffy Chen <jeffy.
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
Add missing iommu_device_sysfs_remove in error path.
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
Reviewed-by: Tomasz Figa <tf...@chromium.org>
---
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
drivers/iommu/rockchip
z Figa <tf...@chromium.org>
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
Reviewed-by: Robin Murphy <robin.mur...@arm.com>
---
Changes in v6: None
Changes in v5:
Use out labels to save the duplication between the error and success paths.
Changes in v4: None
Changes in v3:
in rk_iommu_irq().
Remove rk_iommudata->domain.
Changes in v2:
Move 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 i
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>
---
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3:
Loop platform_get_irq() as Robin suggested.
Changes
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 v6: None
Changes in v5: None
Changes in v4:
Rewrite commit message.
Changes in v3:
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>
---
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3:
Loop platform_get_irq() as Robin suggested.
Changes
From: Tomasz Figa <tf...@chromium.org>
Due to the bug in current code, only first IOMMU has the TLB lines
flushed in rk_iommu_zap_lines. This patch fixes the inner loop to
execute for all IOMMUs and properly flush the TLB.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by
z Figa <tf...@chromium.org>
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
Reviewed-by: Robin Murphy <robin.mur...@arm.com>
---
Changes in v6: None
Changes in v5:
Use out labels to save the duplication between the error and success paths.
Changes in v4: None
Changes in v3:
From: Tomasz Figa <tf...@chromium.org>
This patch converts the rockchip-iommu driver to use the in-kernel
iopoll helpers to wait for certain status bits to change in registers
instead of an open-coded custom macro.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by
Add missing iommu_device_sysfs_remove in error path.
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
Reviewed-by: Tomasz Figa <tf...@chromium.org>
---
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
drivers/iommu/rockchip
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 v6: None
Changes in v5: None
Changes in v4:
Rewrite commit message.
Changes in v3:
in rk_iommu_irq().
Remove rk_iommudata->domain.
Changes in v2:
Move 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 i
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
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
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 v5: None
Changes in v4: None
Changes i
he VB2 framework using DMA
mapping API and doesn't engage the master driver at all.
This patch fixes the problem by letting clocks needed for IOMMU
operation to be listed in Device Tree and making the driver enable them
for the time of accessing the hardware.
Signed-off-by: Jeffy Chen <jeffy.
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
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 v5: None
Changes i
From: Tomasz Figa <tf...@chromium.org>
Due to the bug in current code, only first IOMMU has the TLB lines
flushed in rk_iommu_zap_lines. This patch fixes the inner loop to
execute for all IOMMUs and properly flush the TLB.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by
From: Tomasz Figa <tf...@chromium.org>
This patch converts the rockchip-iommu driver to use the in-kernel
iopoll helpers to wait for certain status bits to change in registers
instead of an open-coded custom macro.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by
z Figa <tf...@chromium.org>
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
Reviewed-by: Robin Murphy <robin.mur...@arm.com>
---
Changes in v5:
Use out labels to save the duplication between the error and success paths.
Changes in v4: None
Changes in v3: None
Changes in v2:
M
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>
---
Changes in v5: None
Changes in v4: None
Changes in v3:
Loop platform_get_irq() as Robin suggested.
Changes in v2: None
d
Add missing iommu_device_sysfs_remove in error path.
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
Reviewed-by: Tomasz Figa <tf...@chromium.org>
---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 6 +-
1
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 v5: None
Changes in v4:
Rewrite commit message.
Changes in v3:
Also r
startup() and shutdown() when iommu attached.
Remove pm_mutex.
Check runtime PM disabled.
Check pm_runtime in rk_iommu_irq().
Remove rk_iommudata->domain.
Changes in v2:
Move irq request to probe(in patch[0])
Move bus_set_iommu() to rk_iommu_probe().
Jeffy Chen (9):
iommu/rockchip: Prohibit unb
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>
---
Changes in v4: None
Changes in v3: None
Changes in v2:
Move bus_set_iommu() to rk
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>
---
Changes in v4: None
Changes in v3:
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>
---
Changes in v4: None
Changes in v3:
Add struct rk_iommudata.
he VB2 framework using DMA
mapping API and doesn't engage the master driver at all.
This patch fixes the problem by letting clocks needed for IOMMU
operation to be listed in Device Tree and making the driver enable them
for the time of accessing the hardware.
Signed-off-by: Jeffy Chen <jeffy.
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
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>
---
Changes in v4: None
Changes in v3:
Remove rk_iommudata->domain.
Changes in v2: None
drivers/iommu
From: Tomasz Figa <tf...@chromium.org>
Due to the bug in current code, only first IOMMU has the TLB lines
flushed in rk_iommu_zap_lines. This patch fixes the inner loop to
execute for all IOMMUs and properly flush the TLB.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by
From: Tomasz Figa <tf...@chromium.org>
This patch converts the rockchip-iommu driver to use the in-kernel
iopoll helpers to wait for certain status bits to change in registers
instead of an open-coded custom macro.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by
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>
---
Changes in v4: None
Changes in v3:
Loop platform_get_irq() as Robin suggested.
Changes in v2: None
drivers/iommu/rockchip-
z Figa <tf...@chromium.org>
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
---
Changes in v4: None
Changes in v3: None
Changes in v2:
Move irq request to probe(in patch[0])
drivers/iommu/rockchip-iommu.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --g
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 v4:
Rewrite commit message.
Changes in v3:
Also remove remove() and module_exit
Add missing iommu_device_sysfs_remove in error path.
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
Reviewed-by: Tomasz Figa <tf...@chromium.org>
---
Changes in v4: None
Changes in v3: None
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 6 +-
1 file changed, 5 inse
mmu() to rk_iommu_probe().
Jeffy Chen (9):
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 vop iommu nodes
iommu/rockchip: Use IOMMU device for dma mapping operations
iommu/rockchip:
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>
---
Changes in v3:
Remove rk_iommudata->domain.
Changes in v2: None
drivers/iommu/rockchip-iom
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>
---
Changes in v3: None
Changes
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>
---
Changes in v3: None
Changes in v2:
Move bus_set_iommu() to rk_iommu_probe().
d
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
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>
---
Changes in v3:
Add struct rk_iommudata.
Squash iommu/rockchi
he VB2 framework using DMA
mapping API and doesn't engage the master driver at all.
This patch fixes the problem by letting clocks needed for IOMMU
operation to be listed in Device Tree and making the driver enable them
for the time of accessing the hardware.
Signed-off-by: Jeffy Chen <jeffy.
() for add_device
Only call startup() and shutdown() when iommu attached.
Remove pm_mutex.
Check runtime PM disabled.
Check pm_runtime in rk_iommu_irq().
Remove rk_iommudata->domain.
Changes in v2:
Move irq request to probe(in patch[0])
Move bus_set_iommu() to rk_iommu_probe().
Jeffy Chen (8):
iommu/rockc
From: Tomasz Figa <tf...@chromium.org>
Due to the bug in current code, only first IOMMU has the TLB lines
flushed in rk_iommu_zap_lines. This patch fixes the inner loop to
execute for all IOMMUs and properly flush the TLB.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by
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>
---
Changes in v3:
Loop platform_get_irq() as Robin suggested.
Changes in v2: None
drivers/iommu/rockchip-
Removal the IOMMUs cannot be done reliably.
This is similar to exynos iommu driver.
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
---
Changes in v3:
Also remove remove() and module_exit() as Tomasz suggested.
Changes in v2: None
drivers/iommu/rockchip-iommu.
Add missing iommu_device_sysfs_remove in error path.
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
Reviewed-by: Tomasz Figa <tf...@chromium.org>
---
Changes in v3: None
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 6 +-
1 file changed, 5 insertions(+), 1 delet
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
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>
---
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 39 +++
1 file c
he VB2 framework using DMA
mapping API and doesn't engage the master driver at all.
This patch fixes the problem by letting clocks needed for IOMMU
operation to be listed in Device Tree and making the driver enable them
for the time of accessing the hardware.
Signed-off-by: Jeffy Chen <jeffy.
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>
---
Changes in v2: None
drivers/iommu/rockchip-iommu.c
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>
---
Changes in v2: None
drivers/iommu/rockchip-iommu.
.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
---
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 120 +
1 file changed, 63 insertions(+), 57 deletions(-)
diff --git a/drivers/io
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>
---
Changes in v2:
Move bus_set_iommu() to rk_iommu_probe().
drivers/iommu/rockchip-iommu.c | 20 +++-
1 file chan
From: Tomasz Figa <tf...@chromium.org>
Due to the bug in current code, only first IOMMU has the TLB lines
flushed in rk_iommu_zap_lines. This patch fixes the inner loop to
execute for all IOMMUs and properly flush the TLB.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by
Suggested-by: Robin Murphy <robin.mur...@arm.com>
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
---
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 38 +++---
1 file changed, 11 insertions(+), 27 deletions(-)
diff --git a/drivers/io
Add missing iommu_device_sysfs_remove in error path.
Also adjust sequence of deinit functions in the remove.
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
---
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
It's not safe to unbind rockchip IOMMU driver.
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
---
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index 4a12d4
z Figa <tf...@chromium.org>
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
---
Changes in v2:
Move irq request to probe(in patch[0])
drivers/iommu/rockchip-iommu.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/rockchip-iommu.c b/driv
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>
---
drivers/iommu/rockchip-iommu.c | 13 +
1 file chang
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>
---
drivers/iommu/rockchip-iommu.c | 96 --
1 - 100 of 109 matches
Mail list logo