From: Yong Wu <yong.wu@mediatek.com>
To: Rob Herring <robh+dt@kernel.org>, Joerg Roedel <joro@8bytes.org>,
Matthias Brugger <matthias.bgg@gmail.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
Will Deacon <will.deacon@arm.com>,
Daniel Kurtz <djkurtz@google.com>, Tomasz Figa <tfiga@google.com>,
Lucas Stach <l.stach@pengutronix.de>,
Mark Rutland <mark.rutland@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
linux-mediatek@lists.infradead.org,
Sasha Hauer <kernel@pengutronix.de>,
srv_heupstream@mediatek.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
iommu@lists.linux-foundation.org, pebolle@tiscali.nl,
arnd@arndb.de, mitchelh@codeaurora.org, k.zhang@mediatek.com,
youhua.li@mediatek.com
Subject: [RFC v2 PATCH 0/6] MT8173 IOMMU SUPPORT
Date: Fri, 15 May 2015 17:43:23 +0800 [thread overview]
Message-ID: <1431683009-18158-1-git-send-email-yong.wu@mediatek.com> (raw)
This patch adds support for m4u(Multimedia Memory Management Unit),
Currently it only support the m4u with 2 levels of page table on mt8173.
It is based on Robin Murphy's arm64: IOMMU-backed DMA mapping[1].
Please check the hardware block diagram of Mediatek IOMMU.
EMI (External Memory Interface)
|
m4u (Multimedia Memory Management Unit)
|
smi (Smart Multimedia Interface)
|
+---------------+-------
| |
| |
vdec larb disp larb ... SoCs have different local arbiter(larb).
| |
| |
+----+----+ +-----+-----+
| | | | | | ...
| | | | | | ...
| | | | | | ...
MC PP VLD OVL0 RDMA0 WDMA0 ... There are different ports in each larb.
Normally we specify a local arbiter(larb) for each multimedia hardware like
display, video decode, video encode and camera. And there are different ports in
each larb. Take a example, there are some ports like MC, PP, UFO, VLD, AVC_MV,
PRED_RD, PRED_WR in video larb, all the ports are according to the video hardware.
From the diagram, all the multimedia module connect with m4u via smi.
SMI is responsible to enable/disable iommu and control the clocks for each local
arbiter. If we should enable the iommu of video decode, it should config the
video's ports. And if the video hardware work wether enable/disable iommu,
it should enable the clock of its larb's clock. So we add a special driver for smi.
[1] http://lists.linuxfoundation.org/pipermail/iommu/2015-February/012236.html
v2:
-add arm short descriptor support.
-seperate smi common from smi and change the clock-names according
to smi HW.
-delete the hardcode of the port-names in mt8173.
replace this with larb-portes-nr in dtsi.
-fix some coding style issues.
v1:
http://lists.infradead.org/pipermail/linux-mediatek/2015-March/000058.html
Yong Wu (6):
dt-bindings: iommu: Add binding for mediatek IOMMU
dt-bindings: mediatek: Add smi dts binding
iommu: add ARM short descriptor page table allocator.
iommu/mediatek: Add mt8173 IOMMU driver
soc: mediatek: Add SMI driver
dts: mt8173: Add iommu/smi nodes for mt8173
.../devicetree/bindings/iommu/mediatek,iommu.txt | 51 ++
.../bindings/soc/mediatek/mediatek,smi-larb.txt | 24 +
.../bindings/soc/mediatek/mediatek,smi.txt | 22 +
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 79 +++
drivers/iommu/Kconfig | 18 +
drivers/iommu/Makefile | 2 +
drivers/iommu/io-pgtable-arm-short.c | 490 +++++++++++++++
drivers/iommu/io-pgtable.c | 4 +
drivers/iommu/io-pgtable.h | 6 +
drivers/iommu/mtk_iommu.c | 657 +++++++++++++++++++++
drivers/soc/mediatek/Kconfig | 6 +
drivers/soc/mediatek/Makefile | 1 +
drivers/soc/mediatek/mt8173-smi.c | 298 ++++++++++
include/dt-bindings/iommu/mt8173-iommu-port.h | 112 ++++
include/linux/mtk-smi.h | 39 ++
15 files changed, 1809 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iommu/mediatek,iommu.txt
create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,smi-larb.txt
create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,smi.txt
create mode 100644 drivers/iommu/io-pgtable-arm-short.c
create mode 100644 drivers/iommu/mtk_iommu.c
create mode 100644 drivers/soc/mediatek/mt8173-smi.c
create mode 100644 include/dt-bindings/iommu/mt8173-iommu-port.h
create mode 100644 include/linux/mtk-smi.h
--
1.8.1.1.dirty
next reply other threads:[~2015-05-15 9:43 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 9:43 Yong Wu [this message]
2015-05-15 9:43 ` [PATCH v2 1/6] dt-bindings: iommu: Add binding for mediatek IOMMU Yong Wu
2015-05-25 6:31 ` Tomasz Figa
[not found] ` <CAAFQd5AF5UVb35PEg+GjzLAqqr0q=Wg+XONRmK4XR=HLuJv2rA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-27 7:03 ` Yong Wu
2015-05-15 9:43 ` [PATCH v2 4/6] soc: mediatek: Add SMI driver Yong Wu
[not found] ` <1431683009-18158-5-git-send-email-yong.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-05-19 11:14 ` Matthias Brugger
[not found] ` <CABuKBeJvh2PGi3i6O0uu-7ggdBzKMb3tPE_XKhT1i-+tkKc5gg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-21 6:16 ` Yong Wu
2015-05-21 7:30 ` Matthias Brugger
2015-05-21 7:38 ` Yong Wu
2015-05-21 14:33 ` Daniel Kurtz
[not found] ` <CAGS+omARc60i+8vO6V1ccnSnXkjAGNjMjRB1+5kg_EHrrS1NOw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-21 14:49 ` Yong Wu
2015-05-21 15:20 ` Matthias Brugger
2015-05-15 9:43 ` [PATCH v2 5/6] iommu/mediatek: Add mt8173 IOMMU driver Yong Wu
2015-05-25 8:29 ` Tomasz Figa
[not found] ` <CAAFQd5BCZrfq++SDs+HK66oUNnj-8pHrwKEMQzb7JM=4UUOgBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-27 7:26 ` Yong Wu
[not found] ` <1431683009-18158-6-git-send-email-yong.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-06-05 13:30 ` Will Deacon
[not found] ` <1431683009-18158-1-git-send-email-yong.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-05-15 9:43 ` [PATCH v2 2/6] dt-bindings: mediatek: Add smi dts binding Yong Wu
[not found] ` <1431683009-18158-3-git-send-email-yong.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-05-15 10:02 ` Yong Wu
2015-05-25 6:48 ` Tomasz Figa
2015-05-27 7:36 ` Yong Wu
2015-05-15 9:43 ` [PATCH v2 3/6] iommu: add ARM short descriptor page table allocator Yong Wu
[not found] ` <1431683009-18158-4-git-send-email-yong.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-05-15 15:30 ` Robin Murphy
[not found] ` <55561124.2080909-5wv7dgnIgG8@public.gmane.org>
2015-05-22 3:14 ` Yong Wu
2015-06-05 13:12 ` Will Deacon
[not found] ` <20150605131201.GF1198-5wv7dgnIgG8@public.gmane.org>
2015-06-26 7:30 ` Yong Wu
2015-05-15 9:43 ` [PATCH v2 6/6] dts: mt8173: Add iommu/smi nodes for mt8173 Yong Wu
2015-05-16 7:08 ` [RFC v2 PATCH 0/6] MT8173 IOMMU SUPPORT Daniel Kurtz
[not found] ` <CAGS+omASN0GWiXYFg9kn7grWoKywqUiSwLZdW9BKc+S-Dnp+Cg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-18 10:23 ` Robin Murphy
2015-05-18 12:09 ` Matthias Brugger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431683009-18158-1-git-send-email-yong.wu@mediatek.com \
--to=yong.wu@mediatek.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=djkurtz@google.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=k.zhang@mediatek.com \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=mitchelh@codeaurora.org \
--cc=pebolle@tiscali.nl \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=srv_heupstream@mediatek.com \
--cc=tfiga@google.com \
--cc=will.deacon@arm.com \
--cc=youhua.li@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).