[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1583324972.4784.24.camel@mhfsdcap03>
Date: Wed, 4 Mar 2020 20:29:32 +0800
From: Yong Wu <yong.wu@...iatek.com>
To: Fabien Parent <fparent@...libre.com>
CC: <anan.sun@...iatek.com>, <devicetree@...r.kernel.org>,
<joro@...tes.org>, <youlin.pei@...iatek.com>,
<linux-kernel@...r.kernel.org>, <ck.hu@...iatek.com>,
<iommu@...ts.linux-foundation.org>,
<linux-mediatek@...ts.infradead.org>, <matthias.bgg@...il.com>,
<scott.wang@...iatek.com>, <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2 2/3] iommu/mediatek: add pdata member for legacy ivrp
paddr
On Wed, 2020-03-04 at 20:23 +0800, Yong Wu wrote:
> On Mon, 2020-03-02 at 12:21 +0100, Fabien Parent wrote:
> > Add a new platform data member in order to select which IVRP_PADDR
> > format is used by an SoC.
> >
> > Signed-off-by: Fabien Parent <fparent@...libre.com>
> > ---
> >
> > v2: new patch
> >
> > ---
> > drivers/iommu/mtk_iommu.c | 3 ++-
> > drivers/iommu/mtk_iommu.h | 1 +
> > 2 files changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
> > index 95945f467c03..78cb14ab7dd0 100644
> > --- a/drivers/iommu/mtk_iommu.c
> > +++ b/drivers/iommu/mtk_iommu.c
> > @@ -569,7 +569,7 @@ static int mtk_iommu_hw_init(const struct mtk_iommu_data *data)
> > F_INT_PRETETCH_TRANSATION_FIFO_FAULT;
> > writel_relaxed(regval, data->base + REG_MMU_INT_MAIN_CONTROL);
> >
> > - if (data->plat_data->m4u_plat == M4U_MT8173)
> > + if (data->plat_data->has_legacy_ivrp_paddr)
> > regval = (data->protect_base >> 1) | (data->enable_4GB << 31);
> > else
> > regval = lower_32_bits(data->protect_base) |
> > @@ -786,6 +786,7 @@ static const struct mtk_iommu_plat_data mt8173_data = {
> > .m4u_plat = M4U_MT8173,
> > .has_4gb_mode = true,
> > .has_bclk = true,
> > + .has_legacy_ivrp_paddr = true;
,
> > .reset_axi = true,
> > .larbid_remap = {0, 1, 2, 3, 4, 5}, /* Linear mapping. */
> > };
> > diff --git a/drivers/iommu/mtk_iommu.h b/drivers/iommu/mtk_iommu.h
> > index ea949a324e33..4696ba027a71 100644
> > --- a/drivers/iommu/mtk_iommu.h
> > +++ b/drivers/iommu/mtk_iommu.h
> > @@ -42,6 +42,7 @@ struct mtk_iommu_plat_data {
> > bool has_bclk;
> > bool has_vld_pa_rng;
> > bool reset_axi;
> > + bool has_legacy_ivrp_paddr;
>
> I'd like to put this before "has_vld_pa_rng" alphabetically.
>
> Other than this,
>
> Reviewed-by: Yong Wu <yong.wu@...iatek.com>
>
> > unsigned char larbid_remap[MTK_LARB_NR_MAX];
> > };
> >
>
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek
Powered by blists - more mailing lists