forked from luck/tmp_suning_uos_patched
ac6bbf0cdf
Now that we use the driver core to stop deferred probe for missing drivers, IOMMU_OF_DECLARE can be removed. This is slightly less optimal than having a list of built-in drivers in that we'll now defer probe twice before giving up. This shouldn't have a significant impact on boot times as past discussions about deferred probe have given no evidence of deferred probe having a substantial impact. Cc: Robin Murphy <robin.murphy@arm.com> Cc: Kukjin Kim <kgene@kernel.org> Cc: Krzysztof Kozlowski <krzk@kernel.org> Cc: Rob Clark <robdclark@gmail.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Frank Rowand <frowand.list@gmail.com> Cc: linux-arm-kernel@lists.infradead.org Cc: iommu@lists.linux-foundation.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Cc: devicetree@vger.kernel.org Acked-by: Will Deacon <will.deacon@arm.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
36 lines
821 B
C
36 lines
821 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __OF_IOMMU_H
|
|
#define __OF_IOMMU_H
|
|
|
|
#include <linux/device.h>
|
|
#include <linux/iommu.h>
|
|
#include <linux/of.h>
|
|
|
|
#ifdef CONFIG_OF_IOMMU
|
|
|
|
extern int of_get_dma_window(struct device_node *dn, const char *prefix,
|
|
int index, unsigned long *busno, dma_addr_t *addr,
|
|
size_t *size);
|
|
|
|
extern const struct iommu_ops *of_iommu_configure(struct device *dev,
|
|
struct device_node *master_np);
|
|
|
|
#else
|
|
|
|
static inline int of_get_dma_window(struct device_node *dn, const char *prefix,
|
|
int index, unsigned long *busno, dma_addr_t *addr,
|
|
size_t *size)
|
|
{
|
|
return -EINVAL;
|
|
}
|
|
|
|
static inline const struct iommu_ops *of_iommu_configure(struct device *dev,
|
|
struct device_node *master_np)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
#endif /* CONFIG_OF_IOMMU */
|
|
|
|
#endif /* __OF_IOMMU_H */
|