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
-iommu driver to comply with
this requirement.
Signed-off-by: Tomasz Figa <tf...@chromium.org>
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
---
drivers/iommu/rockchip-iommu.c | 122 +
1 file changed, 64 insertions(+), 58 deleti
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 --
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
With the probe-deferral mechanism, early initialisation hooks are no
longer needed.
Suggested-by: Robin Murphy <robin.mur...@arm.com>
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
---
drivers/iommu/arm-smmu-v3.c | 2 +-
drivers/iommu/arm-smmu.c | 12 ++--
d
z Figa <tf...@chromium.org>
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
---
drivers/iommu/rockchip-iommu.c | 26 +-
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
Add missing iommu_device_sysfs_remove in error path.
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
---
drivers/iommu/rockchip-iommu.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
This series fixes some issues in rockchip iommu driver, and add of_iommu
support in it.
Also drop of_iommu early initialisation hooks as Robin suggested.
Jeffy Chen (5):
iommu/of: Drop early initialisation hooks
iommu/rockchip: Fix error handling in probe
iommu/rockchip: Fix error
It's hard to undo bus_set_iommu() in the error path, so move it to the
end of init call.
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
---
drivers/iommu/rockchip-iommu.c | 18 +-
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/iommu/ro
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.
() 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
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
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
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
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
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>
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
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
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
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>
---
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
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
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
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
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(-)
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
The for_each_matching_node_and_match() would return every matching
nodes including unavailable ones.
It's pointless to init unavailable IOMMUs, so add a sanity check to
avoid that.
Signed-off-by: Jeffy Chen <jeffy.c...@rock-chips.com>
---
drivers/iommu/of_iommu.c | 3 +++
1 file chan
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
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
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
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
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 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
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
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
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
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.
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
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:
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
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-
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
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
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.
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
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
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
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 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:
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:
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
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
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
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:
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
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
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 v6: None
Changes in v5: None
Changes
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.
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
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
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
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
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
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
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
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:
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
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
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
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:
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.
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
1 - 100 of 109 matches
Mail list logo