diff options
author | Yong Wu <yong.wu@mediatek.com> | 2019-08-24 11:01:57 +0800 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2019-08-30 15:57:26 +0200 |
commit | b3e5eee76548f621bb1c3e9dab4a4ff98bebf0de (patch) | |
tree | 6d7142e8d4c0e34ace64964ac38ac049ef2184bb /drivers/iommu/mtk_iommu.h | |
parent | 2aa4c2597cd67139697eb3095d5b6d61074c7ffc (diff) | |
download | linux-stable-b3e5eee76548f621bb1c3e9dab4a4ff98bebf0de.tar.gz linux-stable-b3e5eee76548f621bb1c3e9dab4a4ff98bebf0de.tar.bz2 linux-stable-b3e5eee76548f621bb1c3e9dab4a4ff98bebf0de.zip |
iommu/mediatek: Add larb-id remapped support
The larb-id may be remapped in the smi-common, this means the
larb-id reported in the mtk_iommu_isr isn't the real larb-id,
Take mt8183 as a example:
M4U
|
---------------------------------------------
| SMI common |
-0-----7-----5-----6-----1-----2------3-----4- <- Id remapped
| | | | | | | |
larb0 larb1 IPU0 IPU1 larb4 larb5 larb6 CCU
disp vdec img cam venc img cam
As above, larb0 connects with the id 0 in smi-common.
larb1 connects with the id 7 in smi-common.
...
If the larb-id reported in the isr is 7, actually it's larb1(vdec).
In order to output the right larb-id in the isr, we add a larb-id
remapping relationship in this patch.
If there is no this larb-id remapping in some SoCs, use the linear
mapping array instead.
This also is a preparing patch for mt8183.
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Evan Green <evgreen@chromium.org>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/mtk_iommu.h')
-rw-r--r-- | drivers/iommu/mtk_iommu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iommu/mtk_iommu.h b/drivers/iommu/mtk_iommu.h index 821172bd6c52..d1a1d8887a0e 100644 --- a/drivers/iommu/mtk_iommu.h +++ b/drivers/iommu/mtk_iommu.h @@ -38,6 +38,8 @@ struct mtk_iommu_plat_data { /* HW will use the EMI clock if there isn't the "bclk". */ bool has_bclk; + + unsigned char larbid_remap[MTK_LARB_NR_MAX]; }; struct mtk_iommu_domain; |