Skip to content

Commit 6a513de

Browse files
YongWu-HFjoergroedel
authored andcommitted
iommu/mediatek: Remove mtk_iommu.h
Currently there is a suspend structure in the header file. It's no need to keep a header file only for this. Move these into the c file and rm this header file. Signed-off-by: Yong Wu <yong.wu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Link: https://lore.kernel.org/r/20220503071427.2285-28-yong.wu@mediatek.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 9485a04 commit 6a513de

3 files changed

Lines changed: 21 additions & 36 deletions

File tree

drivers/iommu/mtk_iommu.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/io.h>
1515
#include <linux/iommu.h>
1616
#include <linux/iopoll.h>
17+
#include <linux/io-pgtable.h>
1718
#include <linux/list.h>
1819
#include <linux/mfd/syscon.h>
1920
#include <linux/module.h>
@@ -30,7 +31,7 @@
3031
#include <asm/barrier.h>
3132
#include <soc/mediatek/smi.h>
3233

33-
#include "mtk_iommu.h"
34+
#include <dt-bindings/memory/mtk-memory-port.h>
3435

3536
#define REG_MMU_PT_BASE_ADDR 0x000
3637
#define MMU_PT_ADDR_MASK GENMASK(31, 7)
@@ -166,6 +167,17 @@ struct mtk_iommu_iova_region {
166167
unsigned long long size;
167168
};
168169

170+
struct mtk_iommu_suspend_reg {
171+
u32 misc_ctrl;
172+
u32 dcm_dis;
173+
u32 ctrl_reg;
174+
u32 int_control0;
175+
u32 int_main_control;
176+
u32 ivrp_paddr;
177+
u32 vld_pa_rng;
178+
u32 wr_len_ctrl;
179+
};
180+
169181
struct mtk_iommu_plat_data {
170182
enum mtk_iommu_plat m4u_plat;
171183
u32 flags;

drivers/iommu/mtk_iommu.h

Lines changed: 0 additions & 32 deletions
This file was deleted.

drivers/iommu/mtk_iommu_v1.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*
88
* Based on driver/iommu/mtk_iommu.c
99
*/
10-
#include <linux/memblock.h>
1110
#include <linux/bug.h>
1211
#include <linux/clk.h>
1312
#include <linux/component.h>
@@ -28,10 +27,9 @@
2827
#include <linux/spinlock.h>
2928
#include <asm/barrier.h>
3029
#include <asm/dma-iommu.h>
31-
#include <linux/init.h>
30+
#include <dt-bindings/memory/mtk-memory-port.h>
3231
#include <dt-bindings/memory/mt2701-larb-port.h>
3332
#include <soc/mediatek/smi.h>
34-
#include "mtk_iommu.h"
3533

3634
#define REG_MMU_PT_BASE_ADDR 0x000
3735

@@ -87,6 +85,13 @@
8785
*/
8886
#define M2701_IOMMU_PGT_SIZE SZ_4M
8987

88+
struct mtk_iommu_suspend_reg {
89+
u32 standard_axi_mode;
90+
u32 dcm_dis;
91+
u32 ctrl_reg;
92+
u32 int_control0;
93+
};
94+
9095
struct mtk_iommu_data {
9196
void __iomem *base;
9297
int irq;

0 commit comments

Comments
 (0)