aboutsummaryrefslogtreecommitdiffstats
path: root/include/soc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-22 14:57:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-22 14:57:43 -0400
commitb4af7f773ef79c479cc25ee26063821220150a8a (patch)
treefc8ddddaf3071b00a33e2547acf0cd7a76929fa5 /include/soc
parent968f3e374faf41e5e6049399eb7302777a09a1e8 (diff)
parent70cf769c5ba283483a42c46f3734202b55dd3041 (diff)
Merge tag 'iommu-updates-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull IOMMU updates from Joerg Roedel: - updates for the Exynos IOMMU driver to make use of default domains and to add support for the SYSMMU v5 - new Mediatek IOMMU driver - support for the ARMv7 short descriptor format in the io-pgtable code - default domain support for the ARM SMMU - couple of other small fixes all over the place * tag 'iommu-updates-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (41 commits) iommu/ipmmu-vmsa: Add r8a7795 DT binding iommu/mediatek: Check for NULL instead of IS_ERR() iommu/io-pgtable-armv7s: Fix kmem_cache_alloc() flags iommu/mediatek: Fix handling of of_count_phandle_with_args result iommu/dma: Fix NEED_SG_DMA_LENGTH dependency iommu/mediatek: Mark PM functions as __maybe_unused iommu/mediatek: Select ARM_DMA_USE_IOMMU iommu/exynos: Use proper readl/writel register interface iommu/exynos: Pointers are nto physical addresses dts: mt8173: Add iommu/smi nodes for mt8173 iommu/mediatek: Add mt8173 IOMMU driver memory: mediatek: Add SMI driver dt-bindings: mediatek: Add smi dts binding dt-bindings: iommu: Add binding for mediatek IOMMU iommu/ipmmu-vmsa: Use ARCH_RENESAS iommu/exynos: Support multiple attach_device calls iommu/exynos: Add Maintainers entry for Exynos SYSMMU driver iommu/exynos: Add support for v5 SYSMMU iommu/exynos: Update device tree documentation iommu/exynos: Add support for SYSMMU controller with bogus version reg ...
Diffstat (limited to 'include/soc')
-rw-r--r--include/soc/mediatek/smi.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/include/soc/mediatek/smi.h b/include/soc/mediatek/smi.h
new file mode 100644
index 000000000000..8893c5eacd07
--- /dev/null
+++ b/include/soc/mediatek/smi.h
@@ -0,0 +1,58 @@
1/*
2 * Copyright (c) 2015-2016 MediaTek Inc.
3 * Author: Yong Wu <yong.wu@mediatek.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14#ifndef MTK_IOMMU_SMI_H
15#define MTK_IOMMU_SMI_H
16
17#include <linux/bitops.h>
18#include <linux/device.h>
19
20#ifdef CONFIG_MTK_SMI
21
22#define MTK_LARB_NR_MAX 8
23
24#define MTK_SMI_MMU_EN(port) BIT(port)
25
26struct mtk_smi_larb_iommu {
27 struct device *dev;
28 unsigned int mmu;
29};
30
31struct mtk_smi_iommu {
32 unsigned int larb_nr;
33 struct mtk_smi_larb_iommu larb_imu[MTK_LARB_NR_MAX];
34};
35
36/*
37 * mtk_smi_larb_get: Enable the power domain and clocks for this local arbiter.
38 * It also initialize some basic setting(like iommu).
39 * mtk_smi_larb_put: Disable the power domain and clocks for this local arbiter.
40 * Both should be called in non-atomic context.
41 *
42 * Returns 0 if successful, negative on failure.
43 */
44int mtk_smi_larb_get(struct device *larbdev);
45void mtk_smi_larb_put(struct device *larbdev);
46
47#else
48
49static inline int mtk_smi_larb_get(struct device *larbdev)
50{
51 return 0;
52}
53
54static inline void mtk_smi_larb_put(struct device *larbdev) { }
55
56#endif
57
58#endif