as larb12.
APU_IOMMU provides mapping for APU engine, we can take them larb13.
Larb12 and Larb13 are fake larbs.
Signed-off-by: Chao Hao
---
.../bindings/iommu/mediatek,iommu.txt | 2 +
include/dt-bindings/memory/mt6779-larb-port.h | 217 ++
2 files changed, 219 insertions
et depends on "Improve tlb range flush"[1] and based on v5.4-rc1.
[1]http://lists.infradead.org/pipermail/linux-mediatek/2019-October/024207.html
Chao Hao (13):
dt-bindings: mediatek: Add bindings for MT6779
iommu/mediatek: Add mt6779 IOMMU basic support
iommu/mediatek: Add mtk_iom
We already have global mtk_iommu_pgtable structure to describe
page table and create it in group_device, "mtk_iommu_domain_finalise"
is as the same as that, so so we will remove mtk_iommu_domain_finalise.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_io
This patch will use mtk_iommu_pgtable to replace the part
of pgtable in mtk_iommu_domain, so we can remove the information
of pgtable in mtk_iommu_domain.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 37 +
1 file changed, 17 insertions(+), 20
This patch will remove the usage of the m4u_dom variable.
We have already redefined mtk_iommu_domain structure and it
includes iommu_domain, so m4u_dom variable will not be used.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 27 ---
1 file changed, 20
of pgtable needs to be created in device_group.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 84 +++
drivers/iommu/mtk_iommu.h | 1 +
2 files changed, 85 insertions(+)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index f2847e661137
.
Larb_id and port_id define can refer to "mt-larb-port.h(ex:
mt6779-larb-port.h)" file
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 50 ---
drivers/iommu/mtk_iommu.h | 1 +
2 files changed, 43 insertions(+), 8 deletions(-)
diff --git
mtk_iommu_domain 0x7da0_~0x7fbf_.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 45 +--
1 file changed, 43 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index c33ea55a1841..882fe01ff770 100644
this patch will
get iommu_group by checking device. All the devices belong to the same
m4u_group currently, so they also use the same mtk_iommu_domain(id=0).
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 46 +++
1 file changed, 46 insertions(+)
diff --git
.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 17 +++--
drivers/iommu/mtk_iommu.h | 17 +
2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index 0eacbc473374..8d68a1af8ed5 100644
;
any more.
Besides, there is a small SW adjustment, we will move alloc iommu_group
into "create_iommu_group"
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 74 +++
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/drivers/iommu/m
For multiple iommu_domains, we need to reserve some iova
regions, so we will add mtk_iommu_resv_iova_region structure.
It includes the start address and size of iova and iommu_resv_type.
Based on the function, we will realize multiple mtk_iommu_domains
Signed-off-by: Anan Sun
Signed-off-by: Chao
mtk_domain_data
|
-
| | |
mtk_iommu_domain1 mtk_iommu_domain2 mtk_iommu_domain3
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 48 +--
drivers/iommu/mtk_iommu.h | 11 -
2 files ch
specially.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 91 +--
drivers/iommu/mtk_iommu.h | 10 -
2 files changed, 87 insertions(+), 14 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index 8ca2e99964fe..f2
hem as larb12.
APU_IOMMU provides mapping for APU engine, we can take them larb13.
Larb12 and Larb13 are fake larbs.
Signed-off-by: Chao Hao
---
.../bindings/iommu/mediatek,iommu.txt | 2 +
include/dt-bindings/memory/mt6779-larb-port.h | 217 ++
2 files changed, 219 inserti
mu_domain2iommu_domain3
|| |
iova region1(normal) iova region2(CCU) iova region3(VPU)
This patchset depends on "Improve tlb range flush"[1] and based on v5.4-rc1.
[1]http://lists.infradead.org/pipermail/linux-mediatek/2019-Octob
specially.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 91 +--
drivers/iommu/mtk_iommu.h | 10 -
2 files changed, 87 insertions(+), 14 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index 8ca2e99964fe..f2
of pgtable needs to be created in device_group.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 84 +++
drivers/iommu/mtk_iommu.h | 1 +
2 files changed, 85 insertions(+)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index
.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 17 +++--
drivers/iommu/mtk_iommu.h | 17 +
2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index 0eacbc473374..8d68a1af8ed5 100644
This patch will use mtk_iommu_pgtable to replace the part
of pgtable in mtk_iommu_domain, so we can remove the information
of pgtable in mtk_iommu_domain.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 37 +
1 file changed, 17 insertions(+), 20
This patch will remove the usage of the m4u_dom variable.
We have already redefined mtk_iommu_domain structure and it
includes iommu_domain, so m4u_dom variable will not be used.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 27 ---
1 file changed, 20
We already have global mtk_iommu_pgtable structure to describe
page table and create it in group_device, "mtk_iommu_domain_finalise"
is as the same as that, so so we will remove mtk_iommu_domain_finalise.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_io
this patch will
get iommu_group by checking device. All the devices belong to the same
m4u_group currently, so they also use the same mtk_iommu_domain(id=0).
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 46 +++
1 file changed, 46 insertions(+)
diff --git
For multiple iommu_domains, we need to reserve some iova
regions, so we will add mtk_iommu_resv_iova_region structure.
It includes the start address and size of iova and iommu_resv_type.
Based on the function, we will realize multiple mtk_iommu_domains
Signed-off-by: Anan Sun
Signed-off-by: Chao
;
any more.
Besides, there is a small SW adjustment, we will move alloc iommu_group
into "create_iommu_group"
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 74 +++
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/drivers/iommu/m
mtk_iommu_domain 0x7da0_~0x7fbf_.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 45 +--
1 file changed, 43 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index c33ea55a1841..882fe01ff770 100644
mtk_domain_data
|
-
| | |
mtk_iommu_domain1 mtk_iommu_domain2 mtk_iommu_domain3
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 48 +--
drivers/iommu/mtk_iommu.h | 11 -
2 files ch
of mtk_iommu_domain.
Larb_id and port_id define can refer to "mt-larb-port.h(ex:
mt6779-larb-port.h)" file
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 50 ---
drivers/iommu/mtk_iommu.h | 1 +
2 files changed, 43 insertions(+), 8 deletions(-)
On Mon, 2019-12-16 at 20:05 +0800, Yong Wu wrote:
> On Mon, 2019-11-04 at 19:52 +0800, Chao Hao wrote:
> > This patch adds description for MT6779 IOMMU.
> >
> > MT6779 has two iommus, they are MM_IOMMU and APU_IOMMU which
> > use ARM Short-Descriptor translation format
On Sat, 2020-02-15 at 20:17 +0800, Yong Wu wrote:
> On Tue, 2019-12-31 at 17:39 +0800, chao hao wrote:
> > On Mon, 2019-12-16 at 20:13 +0800, Yong Wu wrote:
> > > On Mon, 2019-11-04 at 19:52 +0800, Chao Hao wrote:
> > > > Start with this patch, we will change the SW a
On Sat, 2020-02-15 at 20:17 +0800, Yong Wu wrote:
> On Tue, 2019-12-31 at 17:39 +0800, chao hao wrote:
> > On Mon, 2019-12-16 at 20:13 +0800, Yong Wu wrote:
> > > On Mon, 2019-11-04 at 19:52 +0800, Chao Hao wrote:
> > > > Start with this patch, we will change the SW a
On Mon, 2019-12-16 at 20:13 +0800, Yong Wu wrote:
> On Mon, 2019-11-04 at 19:52 +0800, Chao Hao wrote:
> > Start with this patch, we will change the SW architecture
> > to support multiple domains. SW architecture will has a big change,
> > so we need to modify a little bit b
On Mon, 2019-12-16 at 20:07 +0800, Yong Wu wrote:
> On Mon, 2019-11-04 at 19:52 +0800, Chao Hao wrote:
> > 1. Add mt6779 registers define for iommu.
> > 2. Add mt6779_data define to support mt6779 iommu HW init.
> > 3. There are two iommus, one is mm_iommu, the other is vp
by has_sub_comm variable.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 16
drivers/iommu/mtk_iommu.h | 1 +
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index b61785a87764..5de13ab1094e 100644
mtk_iommu_domain 0x7da0_~0x7fbf_.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 45 +--
1 file changed, 43 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index ab09f435d437..d56254883541 100644
hem as larb12.
APU_IOMMU provides mapping for APU engine, we can take them larb13.
Larb12 and Larb13 are fake larbs.
Signed-off-by: Chao Hao
---
.../bindings/iommu/mediatek,iommu.txt | 2 +
include/dt-bindings/memory/mt6779-larb-port.h | 215 ++
2 files changed, 217 inserti
This patch will remove the usage of the m4u_dom variable.
We have already redefined mtk_iommu_domain structure and it
includes iommu_domain, so m4u_dom variable will not be used.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 27 ---
1 file changed, 20
For mt6779, MMU_INVLDT_SEL register's offset is changed from 0x38 to 0x2c,
so we can put inv_sel_reg in the plat_data to use it.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 8 ++--
drivers/iommu/mtk_iommu.h | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git
When some platforms(ex:later mt6779) define has_wr_len variable,
we need to set REG_MMU_WR_LEN to improve performance. So we add
REG_MMU_WR_LEN register define in this patch.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 11 +++
drivers/iommu/mtk_iommu.h | 2 ++
2 files
mtk_domain_data
|
-
| | |
mtk_iommu_domain1 mtk_iommu_domain2 mtk_iommu_domain3
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 48 +--
drivers/iommu/mtk_iommu.h | 11 -
2 files ch
We already have global mtk_iommu_pgtable structure to describe
page table and create it in group_device, "mtk_iommu_domain_finalise"
is as the same as that, so so we will remove mtk_iommu_domain_finalise.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_io
For different platforms(ex:later mt6779), offset=0x48 register will
extend more feature by different bits, so we can rename REG_MMU_MISC_CTRL.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu
2019-November/024567.html
Chao Hao (19):
dt-bindings: mediatek: Add bindings for MT6779
iommu/mediatek: Add m4u1_mask to distinguish m4u_id
iommu/mediatek: Extend larb_remap to larb_remap[2]
iommu/mediatek: Rename offset=0x48 register
iommu/mediatek: Put inv_sel_reg in the plat_da
This patch will use mtk_iommu_pgtable to replace the part
of pgtable in mtk_iommu_domain, so we can remove the information
of pgtable in mtk_iommu_domain.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 37 +
1 file changed, 17 insertions(+), 20
.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 17 +++--
drivers/iommu/mtk_iommu.h | 17 +
2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index f2137033ec59..b1ce0a2df583 100644
of pgtable needs to be created in device_group.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 84 +++
drivers/iommu/mtk_iommu.h | 1 +
2 files changed, 85 insertions(+)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index
For multiple iommu_domains, we need to reserve some iova
regions, so we will add mtk_iommu_resv_iova_region structure.
It includes the start address and size of iova and iommu_resv_type.
Based on the function, we will realize multiple mtk_iommu_domains
Signed-off-by: Anan Sun
Signed-off-by: Chao
For more than one IOMMUs, they are corresponding to different
smi_larb id, so we need to extend larb_remap to larb_remap[2]
to distinguish it by index.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 8
drivers/iommu/mtk_iommu.h | 2 +-
2 files changed, 5 insertions(+), 5
this patch will
get iommu_group by checking device. All the devices belong to the same
m4u_group currently, so they also use the same mtk_iommu_domain(id=0).
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 46 +++
1 file changed, 46 insertions(+)
diff --git
of mtk_iommu_domain.
Larb_id and port_id define can refer to "mt-larb-port.h(ex:
mt6779-larb-port.h)" file
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 50 ---
drivers/iommu/mtk_iommu.h | 1 +
2 files changed, 43 insertions(+), 8 deletions(-)
;
any more.
Besides, there is a small SW adjustment, we will move alloc iommu_group
into "create_iommu_group"
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 74 +++
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/drivers/iommu/m
. MM_IOMMU and
VPU_IOMMU use the same page table to simplify design by
"mtk_iommu_get_m4u_data".
3. For smi_larb6, it doesn't use MM_IOMMU, so we can distinguish
VPU_IOMMU by it when excutes iommu_probe.
4. For mt6779 APU_IOMMU fault id is irregular, so it was treated specially.
Signed-off-by
For some platforms(ex: later mt6779), it maybe have two IOMMUs,
so we can add m4u_mask variable to distinguish it by different
smi_larb id
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 3 +++
drivers/iommu/mtk_iommu.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/drivers
On Mon, 2020-01-06 at 15:57 -0600, Rob Herring wrote:
> On Sun, 5 Jan 2020 18:45:05 +0800, Chao Hao wrote:
> > This patch adds description for MT6779 IOMMU.
> >
> > MT6779 has two iommus, they are MM_IOMMU and APU_IOMMU which
> > use ARM Short-Descriptor translation
the register name, no functional change.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 14 +++---
drivers/iommu/mtk_iommu.h | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index 5f4d6df59cf6
.org/pipermail/linux-mediatek/2020-January/026131.html
v1:
http://lists.infradead.org/pipermail/linux-mediatek/2019-November/024567.html
Chao Hao (7):
dt-bindings: mediatek: Add bindings for MT6779
iommu/mediatek: Rename the register STANDARD_AXI_MODE(0x48) to
MISC_CTRL
iom
Some platforms(ex: mt6779) have a new register called by REG_MMU_WR_LEN
to improve performance.
This patch add this register definition.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 10 ++
drivers/iommu/mtk_iommu.h | 2 ++
2 files changed, 12 insertions(+)
diff --git
.
4. Add mt6779_data to support mm_iommu HW init.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 18 +++---
drivers/iommu/mtk_iommu.h | 1 +
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index dc9ae944e712
we extern larb_remap[] to larb_remap[8][4] for this.
larb_remap[x][y]: x mean common-id above, y means subcommon_id above.
We can also distinguish if the M4U HW has sub_common by has_sub_comm
property.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 20 +---
drivers/iommu/mtk_iom
, ex: M4U_LARB12_ID, M4U_LARB13_ID, CCU, VPU, MDLA,
EDMA
Change since v1:
1. Delete M4U_PORT_UNKNOWN define because of not use it.
2. Correct coding format: ex: /*larb3-VENC*/ --> /* larb3-VENC */
Signed-off-by: Chao Hao
Reviewed-by: Rob Herring
---
.../bindings/iommu/mediatek,iommu.
For mt6779, MMU_INVLDT_SEL register's offset is changed from
0x38 to 0x2c, so we can put inv_sel_reg in the plat_data to
use it.
In addition, we renamed it to REG_MMU_INV_SEL_GEN1 and use it
before mt6779.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 9 ++---
drivers/iommu
In order to improve performance, we always disable STANDARD_AXI_MODE in
MISC_CTRL.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 8 +++-
drivers/iommu/mtk_iommu.h | 1 +
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu
, iotlb_sync() and
tlb_flush_walk/leaf() can be skipped. So iotlb_sync_range() will enhance
performance by reducing the time of tlb sync.
Signed-off-by: Chao Hao
---
drivers/iommu/dma-iommu.c | 9 +
drivers/iommu/iommu.c | 7 +++
include/linux/iommu.h | 2 ++
3 files changed, 18
% performance or more(depending on size of every page size) in
comparison to flushing after each page entry update. So we prefer to
use iotlb_sync_range() to replace iotlb_sync(), tlb_add_range() and
tlb_flush_walk/leaf() for MTK platforms.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c
iotlb_sync(), tlb_add_range() and tlb_flush_walk/leaf().
So this patchset will replace iotlb_sync(), tlb_add_range() and
tlb_flush_walk/leaf() with
iotlb_sync_range() callback.
Chao Hao (4):
iommu: Introduce iotlb_sync_range callback
iommu/mediatek: Add iotlb_sync_range() support
iommu
As is title, the patch only adjusts the architecture of
iotlb_sync_range().
No functional change.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
As is "[PATCH 2/4]" described, we will use iotlb_sync_range() to replace
iotlb_sync(), tlb_add_range() and tlb_flush_walk/leaf() to enhance
performance. So we will remove the implementation of iotlb_sync(),
tlb_add_range() and tlb_flush_walk/leaf().
Signed-off-by: Chao Hao
---
dri
On Fri, 2020-10-23 at 13:57 +0800, chao hao wrote:
> On Wed, 2020-10-21 at 17:55 +0100, Robin Murphy wrote:
> > On 2020-10-19 12:30, Chao Hao wrote:
> > > MTK_IOMMU driver writes one page entry and does tlb flush at a time
> > > currently. More optimal would be to agg
On Wed, 2020-10-21 at 17:55 +0100, Robin Murphy wrote:
> On 2020-10-19 12:30, Chao Hao wrote:
> > MTK_IOMMU driver writes one page entry and does tlb flush at a time
> > currently. More optimal would be to aggregate the writes and flush
> > BUS buffer in the end.
>
On Mon, 2020-06-29 at 12:28 +0200, Matthias Brugger wrote:
>
> On 29/06/2020 09:13, Chao Hao wrote:
> > MT8173 is different from other SoCs for MMU_CTRL register.
> > For mt8173, its bit9 is in_order_write_en and doesn't use its
> > default 1'b1.> For other SoCs, bit[1
On Tue, 2020-06-30 at 18:56 +0800, Yong Wu wrote:
> Hi Chao,
>
> This is also ok for me. Only two format nitpick.
>
> On Mon, 2020-06-29 at 15:13 +0800, Chao Hao wrote:
> > Given the fact that we are adding more and more plat_data bool values,
> > it would make sense
On Mon, 2020-06-29 at 11:28 +0200, Matthias Brugger wrote:
>
> On 29/06/2020 09:13, Chao Hao wrote:
> > Add F_MMU_IN_ORDER_WR_EN and F_MMU_STANDARD_AXI_MODE_BIT definition
> > in MISC_CTRL register.
> > F_MMU_STANDARD_AXI_MODE_BIT:
> > If we set F_MMU_STANDA
On Tue, 2020-06-30 at 18:55 +0800, Yong Wu wrote:
> On Mon, 2020-06-29 at 15:13 +0800, Chao Hao wrote:
> > The max larb number that a iommu HW support is 8(larb0~larb7 in the below
> > diagram).
> > If the larb's number is over 8, we use a sub_common for merging
> >
On Mon, 2020-06-29 at 12:16 +0200, Matthias Brugger wrote:
>
> On 29/06/2020 09:13, Chao Hao wrote:
> > Some platforms(ex: mt6779) need to improve performance by setting
> > REG_MMU_WR_LEN register. And we can use WR_THROT_EN macro to control
> > whether we
Hi Matthias and Yingjoe,
Thanks for your comments!
On Mon, 2020-07-06 at 17:17 +0200, Matthias Brugger wrote:
>
> On 04/07/2020 03:16, Yingjoe Chen wrote:
> > On Fri, 2020-07-03 at 12:41 +0800, Chao Hao wrote:
> >> Given the fact that we are adding more and more
On Wed, 2020-07-01 at 10:17 +0800, Yong Wu wrote:
> On Mon, 2020-06-29 at 15:13 +0800, Chao Hao wrote:
> > For iommu offset=0x48 register, only the previous mt8173/mt8183 use the
> > name STANDARD_AXI_MODE, all the latest SoC extend the register more
> > feature by differ
the register name, no functional change.
Signed-off-by: Chao Hao
Reviewed-by: Yong Wu
Reviewed-by: Matthias Brugger
---
drivers/iommu/mtk_iommu.c | 14 +++---
drivers/iommu/mtk_iommu.h | 5 -
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c
) ||
|||
|| --
|| | | |
Multimedia engine CCU VPU MDLA EMDA
All the connections are hardware fixed, software can not adjust it.
Signed-off-by: Chao Hao
Reviewed-by: Rob
For mt6779, MMU_INV_SEL register's offset is changed from
0x38 to 0x2c, so we can put inv_sel_reg in the plat_data to
use it.
In addition, we renamed it to REG_MMU_INV_SEL_GEN1 and use it
before mt6779.
Cc: Yong Wu
Signed-off-by: Chao Hao
Reviewed-by: Matthias Brugger
---
drivers/iommu
. The feature is controlled by OUT_ORDER_WR_EN platform data flag.
Cc: Matthias Brugger
Suggested-by: Yong Wu
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 11 +++
drivers/iommu/mtk_iommu.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index 0d96dcd8612b..5c8e141668fc 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu
Given the fact that we are adding more and more plat_data bool values,
it would make sense to use a u32 flags register and add the appropriate
macro definitions to set and check for a flag present.
No functional change.
Cc: Yong Wu
Suggested-by: Matthias Brugger
Signed-off-by: Chao Hao
tek/2020-January/026131.html
v1:
http://lists.infradead.org/pipermail/linux-mediatek/2019-November/024567.html
Chao Hao (10):
dt-bindings: mediatek: Add bindings for MT6779
iommu/mediatek: Rename the register STANDARD_AXI_MODE(0x48) to MISC_CTRL
iommu/mediatek: Use a u32 flags to describ
we extend larb_remap[] to larb_remap[8][4] for this.
larb_remap[x][y]: x means common-id above, y means subcommon_id above.
We can also distinguish if the M4U HW has sub_common by HAS_SUB_COMM
macro.
Cc: Matthias Brugger
Signed-off-by: Chao Hao
Reviewed-by: Yong Wu
---
drivers/iommu/mtk_iom
1. Start from mt6779, INVLDT_SEL move to offset=0x2c, so we add
REG_MMU_INV_SEL_GEN2 definition and mt6779 uses it.
2. Add mt6779_data to support mm_iommu HW init.
Cc: Yong Wu
Signed-off-by: Chao Hao
Reviewed-by: Matthias Brugger
---
drivers/iommu/mtk_iommu.c | 9 +
drivers/iommu
On Wed, 2020-07-01 at 16:58 +0200, Matthias Brugger wrote:
>
> On 30/06/2020 12:53, chao hao wrote:
> > On Mon, 2020-06-29 at 11:28 +0200, Matthias Brugger wrote:
> >>
> >> On 29/06/2020 09:13, Chao Hao wrote:
> >>> Add F_MMU_IN_ORDER_WR_EN
the
bit will be cleared and IOMMU performance will drop.
Cc: Matthias Brugger
Cc: Yong Wu
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index e71003037ffa
Starting with mt6779, iommu needs to extend to 256 bytes from 128
bytes which can send the max number of data for memory protection
pa alignment. So we can use a separate patch to modify it.
Signed-off-by: Chao Hao
Reviewed-by: Matthias Brugger
---
drivers/iommu/mtk_iommu.c | 2 +-
1 file
the register name, no functional change.
Signed-off-by: Chao Hao
Reviewed-by: Yong Wu
---
drivers/iommu/mtk_iommu.c | 14 +++---
drivers/iommu/mtk_iommu.h | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index
, ex: M4U_LARB12_ID, M4U_LARB13_ID, CCU, VPU, MDLA,
EDMA
Change since v1:
1. Delete M4U_PORT_UNKNOWN define because of not use it.
2. Correct coding format: ex: /*larb3-VENC*/ --> /* larb3-VENC */
Signed-off-by: Chao Hao
Reviewed-by: Rob Herring
---
.../bindings/iommu/mediatek,iommu.
For mt6779, MMU_INV_SEL register's offset is changed from
0x38 to 0x2c, so we can put inv_sel_reg in the plat_data to
use it.
In addition, we renamed it to REG_MMU_INV_SEL_GEN1 and use it
before mt6779.
Change since v3:
1. Fix coding style
Cc: Yong Wu
Signed-off-by: Chao Hao
---
drivers/iommu
we extern larb_remap[] to larb_remap[8][4] for this.
larb_remap[x][y]: x mean common-id above, y means subcommon_id above.
We can also distinguish if the M4U HW has sub_common by has_sub_comm
property.
Signed-off-by: Chao Hao
Reviewed-by: Yong Wu
---
drivers/iommu/mtk_iommu.c | 20 +---
We need to disable in_order_write to improve performance
Cc: Yong Wu
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 11 +++
drivers/iommu/mtk_iommu.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index
8 register.
5. Split "iommu/mediatek: Add mt6779 IOMMU basic support(patch v1)" to
several patches(patch v2).
http://lists.infradead.org/pipermail/linux-mediatek/2020-January/026131.html
v1:
http://lists.infradead.org/pipermail/linux-mediatek/2019-November/024567.html
Chao Ha
.
4. Add mt6779_data to support mm_iommu HW init.
Change since v3:
1. When setting MMU_CTRL_REG, we don't need to include mt8173.
Cc: Yong Wu
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 20 ++--
drivers/iommu/mtk_iommu.h | 1 +
2 files changed, 19 insertions(+), 2
Some platforms(ex: mt6779) have a new register called by REG_MMU_WR_LEN
to improve performance.
This patch add this register definition.
Signed-off-by: Chao Hao
---
drivers/iommu/mtk_iommu.c | 10 ++
drivers/iommu/mtk_iommu.h | 2 ++
2 files changed, 12 insertions(+)
diff --git
On Mon, 2020-05-25 at 14:14 +0800, Yong Wu wrote:
> On Sat, 2020-05-09 at 16:36 +0800, Chao Hao wrote:
> > In order to improve performance, we always disable STANDARD_AXI_MODE in
> > MISC_CTRL.
> >
> > Signed-off-by: Chao Hao
> > ---
> > drivers/iommu/mtk_
On Wed, 2020-06-17 at 11:34 +0200, Matthias Brugger wrote:
>
> On 17/06/2020 05:00, Chao Hao wrote:
> > Add F_MMU_IN_ORDER_WR_EN definition in MISC_CTRL.
> > In order to improve performance, we always disable STANDARD_AXI_MODE
> > and IN_ORDER_WR_EN in MISC_CTRL.
On Wed, 2020-06-17 at 19:11 +0800, Yong Wu wrote:
> Hi Matthias,
>
> Thanks very much for your review.
>
> On Wed, 2020-06-17 at 11:17 +0200, Matthias Brugger wrote:
> >
> > On 17/06/2020 05:00, Chao Hao wrote:
> > > The max larb number that a iommu HW s
On Wed, 2020-06-17 at 11:33 +0200, Matthias Brugger wrote:
>
> On 17/06/2020 05:00, Chao Hao wrote:
> > 1. Start from mt6779, INVLDT_SEL move to offset=0x2c, so we add
> >REG_MMU_INV_SEL_GEN2 definition and mt6779 uses it.
> > 2. Change PROTECT_PA_ALIGN from 128
1 - 100 of 116 matches
Mail list logo