<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/iommu/mtk_iommu.h, branch v5.15.202</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.202</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.202'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-06-09T08:23:14+00:00</updated>
<entry>
<title>iommu/mediatek: Add mutex for m4u_group and m4u_dom in data</title>
<updated>2022-06-09T08:23:14+00:00</updated>
<author>
<name>Yong Wu</name>
<email>yong.wu@mediatek.com</email>
</author>
<published>2022-05-03T07:13:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=596f59d3369175142f967ae8bf76ed768b202888'/>
<id>urn:sha1:596f59d3369175142f967ae8bf76ed768b202888</id>
<content type='text'>
[ Upstream commit 0e5a3f2e630b28e88e018655548212ef8eb4dfcb ]

Add a mutex to protect the data in the structure mtk_iommu_data,
like -&gt;"m4u_group" -&gt;"m4u_dom". For the internal data, we should
protect it in ourselves driver. Add a mutex for this.
This could be a fix for the multi-groups support.

Fixes: c3045f39244e ("iommu/mediatek: Support for multi domains")
Signed-off-by: Yunfei Wang &lt;yf.wang@mediatek.com&gt;
Signed-off-by: Yong Wu &lt;yong.wu@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Link: https://lore.kernel.org/r/20220503071427.2285-8-yong.wu@mediatek.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iommu/mediatek: Add mt8192 support</title>
<updated>2021-02-01T11:31:19+00:00</updated>
<author>
<name>Yong Wu</name>
<email>yong.wu@mediatek.com</email>
</author>
<published>2021-01-11T11:19:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9e3489e06fb94a7908c3c8f098c191ff711a8182'/>
<id>urn:sha1:9e3489e06fb94a7908c3c8f098c191ff711a8182</id>
<content type='text'>
Add mt8192 iommu support.

Signed-off-by: Yong Wu &lt;yong.wu@mediatek.com&gt;
Reviewed-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Link: https://lore.kernel.org/r/20210111111914.22211-33-yong.wu@mediatek.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>iommu/mediatek: Support for multi domains</title>
<updated>2021-02-01T11:31:19+00:00</updated>
<author>
<name>Yong Wu</name>
<email>yong.wu@mediatek.com</email>
</author>
<published>2021-01-11T11:19:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c3045f39244e90c4c45a404e35aa66403ca68815'/>
<id>urn:sha1:c3045f39244e90c4c45a404e35aa66403ca68815</id>
<content type='text'>
Some HW IP(ex: CCU) require the special iova range. That means the iova
got from dma_alloc_attrs for that devices must locate in his special range.
In this patch, we prepare a iommu group(domain) for each a iova range
requirement.

Meanwhile we still use one pagetable which support 16GB iova.

After this patch, If the iova range of a master is over 4G, the master
should:
a) Declare its special dma-ranges in its dtsi node. For example, If we
   preassign the iova 4G-8G for vcodec, then the vcodec dtsi node should
   add this:
   /*
    * iova start at 0x1_0000_0000, pa still start at 0x4000_0000
    * size is 0x1_0000_0000.
    */
   dma-ranges = &lt;0x1 0x0 0x0 0x40000000 0x1 0x0&gt;;  /* 4G ~ 8G */
 Note: we don't have a actual bus concept here. the master doesn't have its
 special parent node, thus this dma-ranges can only be put in the master's
 node.

b) Update the dma_mask:
  dma_set_mask_and_coherent(dev, DMA_BIT_MASK(33));

Signed-off-by: Yong Wu &lt;yong.wu@mediatek.com&gt;
Reviewed-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Link: https://lore.kernel.org/r/20210111111914.22211-29-yong.wu@mediatek.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>iommu/mediatek: Add iova_region structure</title>
<updated>2021-02-01T11:31:19+00:00</updated>
<author>
<name>Yong Wu</name>
<email>yong.wu@mediatek.com</email>
</author>
<published>2021-01-11T11:19:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=585e58f498a2855dc7a8d351df34dd645447f337'/>
<id>urn:sha1:585e58f498a2855dc7a8d351df34dd645447f337</id>
<content type='text'>
Add a new structure for the iova_region. Each a region will be a
independent iommu domain.

For the previous SoC, there is single iova region(0~4G). For the SoC
that need support multi-domains, there will be several regions.

Signed-off-by: Yong Wu &lt;yong.wu@mediatek.com&gt;
Reviewed-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Link: https://lore.kernel.org/r/20210111111914.22211-27-yong.wu@mediatek.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>iommu/mediatek: Add device link for smi-common and m4u</title>
<updated>2021-02-01T11:31:18+00:00</updated>
<author>
<name>Yong Wu</name>
<email>yong.wu@mediatek.com</email>
</author>
<published>2021-01-11T11:18:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=baf94e6ebff9622f60c4a87ff59c85bf756b7e20'/>
<id>urn:sha1:baf94e6ebff9622f60c4a87ff59c85bf756b7e20</id>
<content type='text'>
In the lastest SoC, M4U has its special power domain. thus, If the engine
begin to work, it should help enable the power for M4U firstly.
Currently if the engine work, it always enable the power/clocks for
smi-larbs/smi-common. This patch adds device_link for smi-common and M4U.
then, if smi-common power is enabled, the M4U power also is powered on
automatically.

Normally M4U connect with several smi-larbs and their smi-common always
are the same, In this patch it get smi-common dev from the last smi-larb
device, then add the device_link.

Signed-off-by: Yong Wu &lt;yong.wu@mediatek.com&gt;
Reviewed-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Link: https://lore.kernel.org/r/20210111111914.22211-19-yong.wu@mediatek.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>iommu/mediatek: Use the common mtk-memory-port.h</title>
<updated>2021-02-01T11:31:16+00:00</updated>
<author>
<name>Yong Wu</name>
<email>yong.wu@mediatek.com</email>
</author>
<published>2021-01-11T11:18:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=66a28915541549f0fe0f4c705dab77443f22b5d6'/>
<id>urn:sha1:66a28915541549f0fe0f4c705dab77443f22b5d6</id>
<content type='text'>
Use the common memory header(larb-port) in the source code.

Signed-off-by: Yong Wu &lt;yong.wu@mediatek.com&gt;
Acked-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Reviewed-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Link: https://lore.kernel.org/r/20210111111914.22211-9-yong.wu@mediatek.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>iommu/mediatek: Add support for MT8167</title>
<updated>2020-09-18T08:29:12+00:00</updated>
<author>
<name>Fabien Parent</name>
<email>fparent@baylibre.com</email>
</author>
<published>2020-09-07T10:16:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c213562fb3eba5c27032da219346e73cd240f9b'/>
<id>urn:sha1:3c213562fb3eba5c27032da219346e73cd240f9b</id>
<content type='text'>
Add support for the IOMMU on MT8167

Signed-off-by: Fabien Parent &lt;fparent@baylibre.com&gt;
Reviewed-by: Yong Wu &lt;yong.wu@mediatek.com&gt;
Link: https://lore.kernel.org/r/20200907101649.1573134-3-fparent@baylibre.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branches 'arm/renesas', 'arm/qcom', 'arm/mediatek', 'arm/omap', 'arm/exynos', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd' and 'core' into next</title>
<updated>2020-07-29T12:42:00+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>jroedel@suse.de</email>
</author>
<published>2020-07-29T12:42:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=56fbacc9bf23d372d78eef3809c1ac93d88e11f4'/>
<id>urn:sha1:56fbacc9bf23d372d78eef3809c1ac93d88e11f4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>iommu/mediatek: Include liunx/dma-mapping.h</title>
<updated>2020-07-13T10:18:44+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>jroedel@suse.de</email>
</author>
<published>2020-07-13T10:16:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=397e18b4bb2d27389361ceaf154a7acced648a72'/>
<id>urn:sha1:397e18b4bb2d27389361ceaf154a7acced648a72</id>
<content type='text'>
This fixes a compile error when cross-compiling the driver
on x86-32.

Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
Link: https://lore.kernel.org/r/20200713101648.32056-1-joro@8bytes.org
</content>
</entry>
<entry>
<title>iommu/mediatek: Add mt6779 basic support</title>
<updated>2020-07-10T14:13:11+00:00</updated>
<author>
<name>Chao Hao</name>
<email>chao.hao@mediatek.com</email>
</author>
<published>2020-07-03T04:41:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=068c86e92f3fc9df7d95a39710b40be811d861aa'/>
<id>urn:sha1:068c86e92f3fc9df7d95a39710b40be811d861aa</id>
<content type='text'>
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.

Signed-off-by: Chao Hao &lt;chao.hao@mediatek.com&gt;
Reviewed-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Yong Wu &lt;yong.wu@mediatek.com&gt;
Link: https://lore.kernel.org/r/20200703044127.27438-11-chao.hao@mediatek.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
</feed>
