If device has no max_seg_size set, we assume that there is no limit and
force it to DMA_BIT_MASK(32) to always use contiguous mappings in DMA
address space.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
arch/arm/mm/dma-mapping.c | 16
1 file changed, 16
Hello Everyone,
A lot of things has happened in the area of improving Exynos IOMMU
driver and discussion about generic IOMMU bindings, which finally
motivated me to get back to IOMMU related tasks. Just to remind, here
are those 2 important threads:
1. [PATCH v13 00/19] iommu/exynos: Fixes and
This patch adds 2 helpers: arm_iommu_create_default_mapping and
arm_iommu_release_default_mapping for managing default iommu-based
dma-mapping address space, created for exlusive use only by the given
device. Those helpers are convenient for setting up iommu-based
dma-mapping for most typical
This patches change initialization time of power domain driver from client
device driver bind to device creation. This lets other core drivers to
register power domain notifiers before client driver is bound.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
Exynos DRM drivers do their own management of IO address space of all
controlled devices, so set DRIVER_HAS_OWN_IOMMU_MANAGER flag to instruct
IOMMU subsystem not to create any defaults for them.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
This patch provides stubs returing errors for all iommu related arm
dma-mapping functions, which are used when CONFIG_ARM_DMA_USE_IOMMU is
not set. This let drivers to use common code for iommu and non-iommu
cases without additional ifdefs.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
This patch removes two unneeded functions, which are not a part of
generic IOMMU API and were never used by any other driver.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
drivers/iommu/exynos-iommu.c | 31 ---
1 file changed, 31 deletions(-)
diff
This patch describes how generic iommu bindings are implemented by
Exynos SYSMMU driver.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
.../devicetree/bindings/iommu/samsung,sysmmu.txt | 93 +++---
1 file changed, 84 insertions(+), 9 deletions(-)
diff --git
This patch extends struct device_driver with a flags member and converts
existing suppress_bind_attrs bool field to a flag. This way new flags
can be easily added in the future without changing the structure itself.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
This patch simplifies the code by:
- refactoring function parameters from struct device pointer to direct pointer
to struct sysmmu drvdata
- moving list_head enteries from struct exynos_iommu_owner directly to struct
sysmmu_drvdata
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
This patch removes custom initialization of reserved memory regions from
s5p-mfc driver. Driver will use main device pointer for all memory allocations.
This patch is temporary, do not merge it yet.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
To correctly disable hardware window during driver init, both enable bits
(WINCONx_ENWIN in WINCON and SHADOWCON_CHx_ENABLE in SHADOWCON) must be
cleared, otherwise hardware fails to re-enable such window later.
While touching this function, also temporarily disable ctx-suspended flag
to let
This patch adds support for getting a notify for failed device driver
bind, so all the items done in BUS_NOTIFY_BIND_DRIVER event can be
cleaned if the driver fails to bind.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
drivers/base/dd.c | 10 +++---
This patch adds a new flags for device drivers. This flag instructs
kernel that the device driver does it own management of IOMMU assisted
IO address space translations, so no default dma-mapping structures
should be initialized.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
This patch adds missing smmu_g2d clock implementation and updates
comment about Exynos4 clocks from 278-282 range. Those clocks are
available on all Exynos4 SoC series, so the misleading comment has been
removed.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
This patch removes reading of REG_MMU_VERSION register on every tlb
operation and caches SYSMMU version in driver's internal data.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
drivers/iommu/exynos-iommu.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff
This patch enables support for runtime pm for SYSMMU controllers. State
of each controller is saved before master's device power domain is
turned off and restored after it has been turned on.
exynos_iommu_attach_device() function might be called anytime, even when
power domain for master's device
Initialize all structures and register to iommu subsystem only on Exynos
compatible platforms.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
drivers/iommu/exynos-iommu.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/iommu/exynos-iommu.c
This patch removes useless spinlocks and other unused members from
struct exynos_iommu_owner. There is no point is protecting this
structure by spinlock because content of this structure doesn't change
and other structures have their own spinlocks.
Signed-off-by: Marek Szyprowski
This patch adds System MMU nodes that are specific to Exynos4210/4x12 series.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
arch/arm/boot/dts/exynos4.dtsi| 118 ++
arch/arm/boot/dts/exynos4210.dtsi | 23
This patch adds code to initialize and assign SYSMMU controllers to
their master devices defined in device tree.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
drivers/iommu/exynos-iommu.c | 152 +--
1 file changed, 145 insertions(+), 7
Add a few words of comment to all internal structures used by the driver.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
drivers/iommu/exynos-iommu.c | 59
1 file changed, 38 insertions(+), 21 deletions(-)
diff --git
After refactoring functions to use pointer to struct sysmmu_drvdata
directly, some functions became useless and thus never used, so remove
them completely.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
drivers/iommu/exynos-iommu.c | 43 ---
This patch renames some variables to make the code easier to understand.
'domain' is replaced by 'iommu_domain' (more generic entity) and really
meaning less 'priv' by 'domain' to reflect its purpose.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
drivers/iommu/exynos-iommu.c | 191
This patch adds code to create default per-device iommu-based
dma-mapping instance for all master devices, whose driver didn't set
DRIVER_HAS_OWN_IOMMU_MANAGER flag.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
drivers/iommu/exynos-iommu.c | 49
Removed following unused includes: linux/mm.h, linux/errno.h,
linux/memblock.h and linux/export.h.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
drivers/iommu/exynos-iommu.c | 18 +++---
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git
This patch adds support for assigning more than one SYSMMU controller to
the master device. This has been achieved simply by chaning the struct
device pointer in struct exynos_iommu_owner into the list of struct
sysmmu_drvdata of all controllers assigned to the given master device.
Signed-off-by:
This patch is an example how to use more than one IOMMU controller in a
device driver for hardware blocks, which have more then one dma master
(memory interface with iommu controller).
This patch is temporary, do not merge it yet.
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
Hi,
On Mon, Aug 04, 2014 at 01:42:05PM +0200, Borislav Petkov wrote:
It is always questionable when people remove BUG_ONs because relaxing
assertions sound like a temporary fix more often than not. Sounds to me
that the original commit which deals with BUS_NOTIFY_DEL_DEVICE needs to
try again
On Thu, Jul 31, 2014 at 05:54:44PM -0700, Olav Haugan wrote:
Mapping and unmapping are more often than not in the critical path.
map_sg and unmap_sg allows IOMMU driver implementations to optimize
the process of mapping and unmapping buffers into the IOMMU page tables.
Instead of mapping a
30 matches
Mail list logo