From: Yong Wu <yong.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
To: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Matthias Brugger
<matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
Cc: k.zhang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
arnd-r2nGTMty4D4@public.gmane.org,
srv_heupstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>,
Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Tomasz Figa <tfiga-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Daniel Kurtz <djkurtz-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
cloud.zhou-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org
Subject: [PATCH v2 0/8] MT2712 IOMMU SUPPORT
Date: Mon, 21 Aug 2017 19:00:13 +0800 [thread overview]
Message-ID: <1503313221-26453-1-git-send-email-yong.wu@mediatek.com> (raw)
This patchset mainly adds support for M4U of mt2712.
The M4U in mt2712 is MTK's generation2 M4U which use the ARM
Short-descriptor like mt8173. The main difference is that there are 2
M4Us and 2 smi-commons in mt2712, while there is only 1 M4U and 1
smi-common in mt8173. The purpose is for balance the bandwidth.
The mt2712 M4U-SMI HW diagram is as below:
EMI
|
------------------------------------
| |
M4U0 M4U1
| |
smi-common0 smi-common1
| |
------------------------- --------------------------------
| | | | | | | | | |
| | | | | | | | | |
larb0 larb1 larb2 larb3 larb6 larb4 larb5 larb7 larb8 larb9
disp0 vdec cam venc jpg mdp1/disp1 mdp2/disp2 mdp3 vdo/nr tvd
This patchset is based on v4.13-rc1, Also it base on Robin's[1],
Honghui[2],Arvind[3], all have been applied. Currently it don't contain
the dtsi part.
The patch 1 adds the binding for MT2712 IOMMU, the patch 2 is a
prepared patch for mt2712, the patch 3 adds the MT2712 IOMMU support.
the patch 4/5 improve the m4u flow for mt2712,
the last patch 6/7/8 mainly fix bug or improve code.
[1]:https://patchwork.kernel.org/patch/9828671/
[2]:https://patchwork.kernel.org/patch/9880223/
[3]:https://patchwork.kernel.org/patch/9892759/
change log:
v2:
1) Add larb8 and larb9 in the HW diagram. larb8 and larb9 are called
by the bdpsys larb, they are a little special, their mmu_en register
offset is different from the normal larb. Fortunately, their mmu_en
register is enabled defaultly, we don't need set again.
After adding larb8 and larb9, the larb number is over 8, therefore,
MTK_LARB_NR_MAX also is increased.
2) Add a prepared patch that moving the MTK_M4U_TO_LARB/PORT into the
c file.
3) Discard the original patch[7/8] which was only a cleanup for SMI,
It's unnecessary for this patch-set.
4) Use subsys_initcall instead of IOMMU_OF_DECLARE according to
Robin's suggestion. Also, Improve some coding format, like using
for_each_set_bit and changing the definition of
F_MMU_TF_PROTECT_SEL.
v1:
https://lists.linuxfoundation.org/pipermail/iommu/2017-August/023664.html
Yong Wu (8):
dt-bindings: mediatek: Add binding for mt2712 IOMMU and SMI
iommu/mediatek: Move MTK_M4U_TO_LARB/PORT into mtk_iommu.c
iommu/mediatek: Add mt2712 IOMMU support
iommu/mediatek: Merge 2 M4U HWs into one iommu domain
iommu/mediatek: Move pgtable allocation into domain_alloc
iommu/mediatek: Disable iommu clock when system suspend
iommu/mediatek: Enlarge the validate PA range for 4GB mode
memory: mtk-smi: Degrade SMI init to module_init
.../devicetree/bindings/iommu/mediatek,iommu.txt | 6 +-
.../memory-controllers/mediatek,smi-common.txt | 6 +-
.../memory-controllers/mediatek,smi-larb.txt | 5 +-
drivers/iommu/mtk_iommu.c | 214 +++++++++++++--------
drivers/iommu/mtk_iommu.h | 9 +
drivers/memory/mtk-smi.c | 65 ++++++-
include/dt-bindings/memory/mt2712-larb-port.h | 102 ++++++++++
include/dt-bindings/memory/mt8173-larb-port.h | 4 -
include/soc/mediatek/smi.h | 2 +-
9 files changed, 314 insertions(+), 99 deletions(-)
create mode 100644 include/dt-bindings/memory/mt2712-larb-port.h
--
1.9.1
next reply other threads:[~2017-08-21 11:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 11:00 Yong Wu [this message]
2017-08-21 11:00 ` [PATCH v2 3/8] iommu/mediatek: Add mt2712 IOMMU support Yong Wu
[not found] ` <1503313221-26453-1-git-send-email-yong.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-08-21 11:00 ` [PATCH v2 1/8] dt-bindings: mediatek: Add binding for mt2712 IOMMU and SMI Yong Wu
[not found] ` <1503313221-26453-2-git-send-email-yong.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-08-21 23:33 ` Rob Herring
2017-08-21 11:00 ` [PATCH v2 2/8] iommu/mediatek: Move MTK_M4U_TO_LARB/PORT into mtk_iommu.c Yong Wu
2017-08-21 11:00 ` [PATCH v2 4/8] iommu/mediatek: Merge 2 M4U HWs into one iommu domain Yong Wu
2017-08-21 11:00 ` [PATCH v2 5/8] iommu/mediatek: Move pgtable allocation into domain_alloc Yong Wu
2017-08-21 11:00 ` [PATCH v2 6/8] iommu/mediatek: Disable iommu clock when system suspend Yong Wu
2017-08-21 11:00 ` [PATCH v2 7/8] iommu/mediatek: Enlarge the validate PA range for 4GB mode Yong Wu
[not found] ` <1503313221-26453-8-git-send-email-yong.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-08-23 17:55 ` kbuild test robot
2017-08-24 6:15 ` kbuild test robot
2017-08-21 11:00 ` [PATCH v2 8/8] memory: mtk-smi: Degrade SMI init to module_init Yong Wu
2017-08-22 14:38 ` [PATCH v2 0/8] MT2712 IOMMU SUPPORT Joerg Roedel
[not found] ` <20170822143836.ac3faa7wcwfjtvjc-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2017-09-06 5:40 ` Yong Wu
2017-10-20 10:12 ` Yong Wu
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=1503313221-26453-1-git-send-email-yong.wu@mediatek.com \
--to=yong.wu-nus5lvnupcjwk0htik3j/w@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
--cc=cloud.zhou-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=djkurtz-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
--cc=k.zhang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=robin.murphy-5wv7dgnIgG8@public.gmane.org \
--cc=srv_heupstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=tfiga-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=will.deacon-5wv7dgnIgG8@public.gmane.org \
/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).