Yong Wu 8d2c749e52 iommu/mediatek: Support master use iova over 32bit
After extending v7s, our pagetable already support iova reach
16GB(34bit). the master got the iova via dma_alloc_attrs may reach
34bits, but its HW register still is 32bit. then how to set the
bit32/bit33 iova? this depend on a SMI larb setting(bank_sel).

we separate whole 16GB iova to four banks:
bank: 0: 0~4G; 1: 4~8G; 2: 8-12G; 3: 12-16G;
The bank number is (iova >> 32).

We will preassign which bank the larbs belong to. currently we don't
have a interface for master to adjust its bank number.

Each a bank is a iova_region which is a independent iommu-domain.
the iova range for each iommu-domain can't cross 4G.

Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org> #for memory part
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Link: https://lore.kernel.org/r/20210111111914.22211-31-yong.wu@mediatek.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-02-01 11:31:19 +00:00
..
2020-12-24 12:18:11 -08:00
2020-12-24 12:28:35 -08:00
2020-12-16 16:38:41 -08:00
2020-12-18 12:38:28 -08:00
2020-12-22 17:59:11 +01:00
2020-12-16 16:38:41 -08:00
2020-12-24 12:18:11 -08:00
2020-12-17 12:52:23 -08:00
2020-12-24 12:14:29 -08:00
2020-12-07 10:08:14 +01:00
2020-12-15 16:06:14 -08:00
2020-12-02 22:35:44 +01:00
2020-12-16 11:49:46 -08:00
2020-12-15 16:30:31 -08:00
2020-12-16 12:57:51 -08:00
2020-12-03 10:00:23 +01:00
2020-12-20 10:44:05 -08:00
2020-12-09 19:26:02 -06:00
2020-12-24 12:28:35 -08:00
2020-12-16 16:38:41 -08:00
2020-12-16 13:34:31 -08:00
2020-12-17 13:34:25 -08:00
2020-12-15 15:57:25 -08:00
2020-12-16 13:42:26 -08:00
2020-12-15 14:02:26 -08:00
2020-12-15 15:24:52 +01:00
2020-12-25 20:17:40 -08:00
2020-12-23 15:06:22 -08:00
2020-12-15 22:50:12 +11:00
2020-12-19 11:51:32 -08:00
2020-12-16 16:38:41 -08:00
2020-12-16 16:38:41 -08:00
2020-12-20 10:12:06 -08:00
2020-12-24 12:28:35 -08:00
2020-12-17 13:34:25 -08:00
2020-12-17 13:41:27 -08:00
2020-12-10 10:45:36 +01:00
2020-12-18 12:38:28 -08:00
2020-12-16 13:34:31 -08:00
2020-12-16 16:38:41 -08:00
2020-12-17 13:41:27 -08:00
2020-12-17 13:34:25 -08:00
2020-12-20 10:44:05 -08:00
2020-12-18 12:38:28 -08:00
2020-12-09 19:44:34 +01:00
2020-12-23 15:01:49 -08:00