Commit 57fb481
iommu/mediatek: Get the proper bankid for multi banks
We preassign some ports in a special bank via the new defined
banks_portmsk. Put it in the plat_data means it is not expected to be
adjusted dynamically.
If the iommu id in the iommu consumer's dtsi node is inside this
banks_portmsk, then we switch it to this special iommu bank, and
initialise the IOMMU bank HW.
Each bank has the independent pgtable(4GB iova range). Each bank
is a independent iommu domain/group. Currently we don't separate different
iova ranges inside a bank.
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/20220503071427.2285-33-yong.wu@mediatek.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>1 parent d72e0ff commit 57fb481
1 file changed
Lines changed: 48 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| |||
467 | 468 | | |
468 | 469 | | |
469 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
470 | 495 | | |
471 | 496 | | |
472 | 497 | | |
| |||
619 | 644 | | |
620 | 645 | | |
621 | 646 | | |
622 | | - | |
| 647 | + | |
623 | 648 | | |
624 | 649 | | |
625 | 650 | | |
626 | 651 | | |
627 | 652 | | |
628 | 653 | | |
| 654 | + | |
629 | 655 | | |
630 | 656 | | |
631 | 657 | | |
| |||
797 | 823 | | |
798 | 824 | | |
799 | 825 | | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
800 | 841 | | |
801 | 842 | | |
802 | 843 | | |
803 | 844 | | |
804 | 845 | | |
805 | | - | |
| 846 | + | |
806 | 847 | | |
807 | 848 | | |
808 | 849 | | |
809 | 850 | | |
810 | 851 | | |
811 | | - | |
812 | | - | |
813 | | - | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
814 | 855 | | |
815 | 856 | | |
816 | | - | |
| 857 | + | |
817 | 858 | | |
818 | 859 | | |
819 | 860 | | |
820 | | - | |
| 861 | + | |
821 | 862 | | |
822 | 863 | | |
823 | 864 | | |
| |||
0 commit comments