linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu/mediatek: Add PGTABLE_PA_35_EN to mt8186 platform data
@ 2024-10-17 11:20 Konrad Adamczyk
  2024-10-21  8:06 ` Yong Wu (吴勇)
  2024-10-29  8:49 ` Joerg Roedel
  0 siblings, 2 replies; 3+ messages in thread
From: Konrad Adamczyk @ 2024-10-17 11:20 UTC (permalink / raw)
  To: Yong Wu, Joerg Roedel, Will Deacon, Robin Murphy,
	Matthias Brugger, AngeloGioacchino Del Regno, iommu,
	linux-mediatek, linux-kernel, linux-arm-kernel
  Cc: Wojciech Macek, Konrad Adamczyk

The MT8186 chip supports 35-bit physical addresses in page table [1].
Set this platform flag.

[1] MT8186G_Application Processor Functional Specification_v1.0

Signed-off-by: Konrad Adamczyk <konrada@google.com>
---
 drivers/iommu/mtk_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index 6a2707fe7a78..c45313c43b9e 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -1599,7 +1599,7 @@ static const unsigned int mt8186_larb_region_msk[MT8192_MULTI_REGION_NR_MAX][MTK
 static const struct mtk_iommu_plat_data mt8186_data_mm = {
 	.m4u_plat       = M4U_MT8186,
 	.flags          = HAS_BCLK | HAS_SUB_COMM_2BITS | OUT_ORDER_WR_EN |
-			  WR_THROT_EN | IOVA_34_EN | MTK_IOMMU_TYPE_MM,
+			  WR_THROT_EN | IOVA_34_EN | MTK_IOMMU_TYPE_MM | PGTABLE_PA_35_EN,
 	.larbid_remap   = {{0}, {1, MTK_INVALID_LARBID, 8}, {4}, {7}, {2}, {9, 11, 19, 20},
 			   {MTK_INVALID_LARBID, 14, 16},
 			   {MTK_INVALID_LARBID, 13, MTK_INVALID_LARBID, 17}},
-- 
2.47.0.105.g07ac214952-goog



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iommu/mediatek: Add PGTABLE_PA_35_EN to mt8186 platform data
  2024-10-17 11:20 [PATCH] iommu/mediatek: Add PGTABLE_PA_35_EN to mt8186 platform data Konrad Adamczyk
@ 2024-10-21  8:06 ` Yong Wu (吴勇)
  2024-10-29  8:49 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Yong Wu (吴勇) @ 2024-10-21  8:06 UTC (permalink / raw)
  To: konrada@google.com
  Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	wmacek@google.com, robin.murphy@arm.com, joro@8bytes.org,
	linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
	matthias.bgg@gmail.com, AngeloGioacchino Del Regno,
	will@kernel.org

On Thu, 2024-10-17 at 11:20 +0000, Konrad Adamczyk wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  The MT8186 chip supports 35-bit physical addresses in page table
> [1].
> Set this platform flag.
> 
> [1] MT8186G_Application Processor Functional Specification_v1.0
> 
> Signed-off-by: Konrad Adamczyk <konrada@google.com>

Reviewed-by: Yong Wu <yong.wu@mediatek.com>

> ---
>  drivers/iommu/mtk_iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
> index 6a2707fe7a78..c45313c43b9e 100644
> --- a/drivers/iommu/mtk_iommu.c
> +++ b/drivers/iommu/mtk_iommu.c
> @@ -1599,7 +1599,7 @@ static const unsigned int
> mt8186_larb_region_msk[MT8192_MULTI_REGION_NR_MAX][MTK
>  static const struct mtk_iommu_plat_data mt8186_data_mm = {
>  .m4u_plat       = M4U_MT8186,
>  .flags          = HAS_BCLK | HAS_SUB_COMM_2BITS | OUT_ORDER_WR_EN |
> -  WR_THROT_EN | IOVA_34_EN | MTK_IOMMU_TYPE_MM,
> +  WR_THROT_EN | IOVA_34_EN | MTK_IOMMU_TYPE_MM | PGTABLE_PA_35_EN,
>  .larbid_remap   = {{0}, {1, MTK_INVALID_LARBID, 8}, {4}, {7}, {2},
> {9, 11, 19, 20},
>     {MTK_INVALID_LARBID, 14, 16},
>     {MTK_INVALID_LARBID, 13, MTK_INVALID_LARBID, 17}},
> -- 
> 2.47.0.105.g07ac214952-goog
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iommu/mediatek: Add PGTABLE_PA_35_EN to mt8186 platform data
  2024-10-17 11:20 [PATCH] iommu/mediatek: Add PGTABLE_PA_35_EN to mt8186 platform data Konrad Adamczyk
  2024-10-21  8:06 ` Yong Wu (吴勇)
@ 2024-10-29  8:49 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2024-10-29  8:49 UTC (permalink / raw)
  To: Konrad Adamczyk
  Cc: Yong Wu, Will Deacon, Robin Murphy, Matthias Brugger,
	AngeloGioacchino Del Regno, iommu, linux-mediatek, linux-kernel,
	linux-arm-kernel, Wojciech Macek

On Thu, Oct 17, 2024 at 11:20:36AM +0000, Konrad Adamczyk wrote:
>  drivers/iommu/mtk_iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-29  9:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-17 11:20 [PATCH] iommu/mediatek: Add PGTABLE_PA_35_EN to mt8186 platform data Konrad Adamczyk
2024-10-21  8:06 ` Yong Wu (吴勇)
2024-10-29  8:49 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).