Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mailbox: mtk-cmdq: Add driver data to support for MT8196

MT8196 has 2 new hardware configuration compared with the previous SoC,
which correspond to the 2 new driver data:

1. mminfra_offset: For GCE data path control
Since GCE has been moved into mminfra, GCE needs to append the
mminfra offset to the DRAM address when accessing the DRAM.

2. gce_vm: For GCE hardware virtualization control
Currently, the first version of the mt8196 mailbox controller only
requires setting the VM-related registers to enable the permissions
of a host VM.

Signed-off-by: Jason-JH Lin <jason-jh.lin@mediatek.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

authored by

Jason-JH Lin and committed by
AngeloGioacchino Del Regno
5ea617e8 1c187484

+12
+12
drivers/mailbox/mtk-cmdq-mailbox.c
··· 14 14 #include <linux/module.h> 15 15 #include <linux/platform_device.h> 16 16 #include <linux/pm_runtime.h> 17 + #include <linux/sizes.h> 17 18 #include <linux/mailbox_controller.h> 18 19 #include <linux/mailbox/mtk-cmdq-mailbox.h> 19 20 #include <linux/of.h> ··· 841 840 .gce_num = 2 842 841 }; 843 842 843 + static const struct gce_plat gce_plat_mt8196 = { 844 + .thread_nr = 32, 845 + .shift = 3, 846 + .mminfra_offset = SZ_2G, 847 + .control_by_sw = true, 848 + .sw_ddr_en = true, 849 + .gce_vm = true, 850 + .gce_num = 2 851 + }; 852 + 844 853 static const struct of_device_id cmdq_of_ids[] = { 845 854 {.compatible = "mediatek,mt6779-gce", .data = (void *)&gce_plat_mt6779}, 846 855 {.compatible = "mediatek,mt8173-gce", .data = (void *)&gce_plat_mt8173}, ··· 859 848 {.compatible = "mediatek,mt8188-gce", .data = (void *)&gce_plat_mt8188}, 860 849 {.compatible = "mediatek,mt8192-gce", .data = (void *)&gce_plat_mt8192}, 861 850 {.compatible = "mediatek,mt8195-gce", .data = (void *)&gce_plat_mt8195}, 851 + {.compatible = "mediatek,mt8196-gce", .data = (void *)&gce_plat_mt8196}, 862 852 {} 863 853 }; 864 854 MODULE_DEVICE_TABLE(of, cmdq_of_ids);