forked from Minki/linux
8e409f1d06
The main reason for using special configuration of IOMMU domain was the problem with MFC firmware, which failed to operate properly when placed at 0 DMA address. Instead of adding custom code for configuring each variant of IOMMU domain and architecture specific glue code, simply use what arch code provides and if the DMA base address equals zero, skip first 128 KiB to keep required alignment. This patch also make the driver operational on ARM64 architecture, because it no longer depends on ARM specific DMA-mapping and IOMMU glue code functions. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Tested-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Andrzej Hajda <a.hajda@samsung.com> Tested-by: Smitha T Murthy <smitha.t@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
31 lines
696 B
C
31 lines
696 B
C
/*
|
|
* Copyright (C) 2015 Samsung Electronics Co.Ltd
|
|
* Authors: Marek Szyprowski <m.szyprowski@samsung.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the
|
|
* Free Software Foundation; either version 2 of the License, or (at your
|
|
* option) any later version.
|
|
*/
|
|
|
|
#ifndef S5P_MFC_IOMMU_H_
|
|
#define S5P_MFC_IOMMU_H_
|
|
|
|
#if defined(CONFIG_EXYNOS_IOMMU)
|
|
|
|
static inline bool exynos_is_iommu_available(struct device *dev)
|
|
{
|
|
return dev->archdata.iommu != NULL;
|
|
}
|
|
|
|
#else
|
|
|
|
static inline bool exynos_is_iommu_available(struct device *dev)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* S5P_MFC_IOMMU_H_ */
|