Skip to content

Commit

Permalink
iommu/mediatek: Use the common mtk-memory-port.h
Browse files Browse the repository at this point in the history
Use the common memory header(larb-port) in the source code.

Signed-off-by: Yong Wu <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Tomasz Figa <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
  • Loading branch information
YongWu-HF authored and willdeacon committed Feb 1, 2021
1 parent fc37346 commit 66a2891
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
7 changes: 0 additions & 7 deletions drivers/iommu/mtk_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,6 @@

#define MTK_PROTECT_PA_ALIGN 256

/*
* Get the local arbiter ID and the portid within the larb arbiter
* from mtk_m4u_id which is defined by MTK_M4U_ID.
*/
#define MTK_M4U_TO_LARB(id) (((id) >> 5) & 0xf)
#define MTK_M4U_TO_PORT(id) ((id) & 0x1f)

#define HAS_4GB_MODE BIT(0)
/* HW will use the EMI clock if there isn't the "bclk". */
#define HAS_BCLK BIT(1)
Expand Down
1 change: 1 addition & 0 deletions drivers/iommu/mtk_iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/spinlock.h>
#include <linux/dma-mapping.h>
#include <soc/mediatek/smi.h>
#include <dt-bindings/memory/mtk-memory-port.h>

#define MTK_LARB_COM_MAX 8
#define MTK_LARB_SUBCOM_MAX 4
Expand Down
1 change: 1 addition & 0 deletions drivers/memory/mtk-smi.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/pm_runtime.h>
#include <soc/mediatek/smi.h>
#include <dt-bindings/memory/mt2701-larb-port.h>
#include <dt-bindings/memory/mtk-memory-port.h>

/* mt8173 */
#define SMI_LARB_MMU_EN 0xf00
Expand Down
2 changes: 0 additions & 2 deletions include/soc/mediatek/smi.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

#ifdef CONFIG_MTK_SMI

#define MTK_LARB_NR_MAX 16

#define MTK_SMI_MMU_EN(port) BIT(port)

struct mtk_smi_larb_iommu {
Expand Down

0 comments on commit 66a2891

Please sign in to comment.