From: Jason-jh Lin <[email protected]>
Since mt8188 has 32 GCE HW thread, we nedd a new platform data to
support it.
So we sort the platform data in numerical order of compatible names and
add a new mt8188 platform data.
Change in v2:
Add a ptach to rename gce_plat variable postfix from 'v1~v7' to SoC names.
Jason-JH.Lin (3):
mailbox: mtk-cmdq: Rename gce_plat variable with SoC name postfix
mailbox: mtk-cmdq: Sort cmdq platform data by compatible name
mailbox: mtk-cmdq: Add CMDQ driver support for mt8188
drivers/mailbox/mtk-cmdq-mailbox.c | 44 ++++++++++++++++++------------
1 file changed, 26 insertions(+), 18 deletions(-)
--
2.18.0
Add CMDQ driver support for mt8188 by adding its compatible and
driver data in CMDQ driver.
Signed-off-by: Jason-JH.Lin <[email protected]>
---
drivers/mailbox/mtk-cmdq-mailbox.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index 39bf066d376e..27ff3a3ccf2f 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -735,6 +735,13 @@ static const struct gce_plat gce_plat_mt8186 = {
.gce_num = 1
};
+static const struct gce_plat gce_plat_mt8188 = {
+ .thread_nr = 32,
+ .shift = 3,
+ .control_by_sw = true,
+ .gce_num = 2
+};
+
static const struct gce_plat gce_plat_mt8192 = {
.thread_nr = 24,
.shift = 3,
@@ -754,6 +761,7 @@ static const struct of_device_id cmdq_of_ids[] = {
{.compatible = "mediatek,mt8173-gce", .data = (void *)&gce_plat_mt8173},
{.compatible = "mediatek,mt8183-gce", .data = (void *)&gce_plat_mt8183},
{.compatible = "mediatek,mt8186-gce", .data = (void *)&gce_plat_mt8186},
+ {.compatible = "mediatek,mt8188-gce", .data = (void *)&gce_plat_mt8188},
{.compatible = "mediatek,mt8192-gce", .data = (void *)&gce_plat_mt8192},
{.compatible = "mediatek,mt8195-gce", .data = (void *)&gce_plat_mt8195},
{}
--
2.18.0
Sort cmdq platform data according to the number sequence of
compatible names.
Signed-off-by: Jason-JH.Lin <[email protected]>
---
drivers/mailbox/mtk-cmdq-mailbox.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index 16c504f8d9d5..39bf066d376e 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -706,6 +706,13 @@ static const struct dev_pm_ops cmdq_pm_ops = {
cmdq_runtime_resume, NULL)
};
+static const struct gce_plat gce_plat_mt6779 = {
+ .thread_nr = 24,
+ .shift = 3,
+ .control_by_sw = false,
+ .gce_num = 1
+};
+
static const struct gce_plat gce_plat_mt8173 = {
.thread_nr = 16,
.shift = 0,
@@ -720,10 +727,11 @@ static const struct gce_plat gce_plat_mt8183 = {
.gce_num = 1
};
-static const struct gce_plat gce_plat_mt6779 = {
+static const struct gce_plat gce_plat_mt8186 = {
.thread_nr = 24,
.shift = 3,
- .control_by_sw = false,
+ .control_by_sw = true,
+ .sw_ddr_en = true,
.gce_num = 1
};
@@ -741,19 +749,11 @@ static const struct gce_plat gce_plat_mt8195 = {
.gce_num = 2
};
-static const struct gce_plat gce_plat_mt8186 = {
- .thread_nr = 24,
- .shift = 3,
- .control_by_sw = true,
- .sw_ddr_en = true,
- .gce_num = 1
-};
-
static const struct of_device_id cmdq_of_ids[] = {
+ {.compatible = "mediatek,mt6779-gce", .data = (void *)&gce_plat_mt6779},
{.compatible = "mediatek,mt8173-gce", .data = (void *)&gce_plat_mt8173},
{.compatible = "mediatek,mt8183-gce", .data = (void *)&gce_plat_mt8183},
{.compatible = "mediatek,mt8186-gce", .data = (void *)&gce_plat_mt8186},
- {.compatible = "mediatek,mt6779-gce", .data = (void *)&gce_plat_mt6779},
{.compatible = "mediatek,mt8192-gce", .data = (void *)&gce_plat_mt8192},
{.compatible = "mediatek,mt8195-gce", .data = (void *)&gce_plat_mt8195},
{}
--
2.18.0
Rename gce_plat variable postfix from 'v1~v7' to SoC names.
Signed-off-by: Jason-JH.Lin <[email protected]>
---
drivers/mailbox/mtk-cmdq-mailbox.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index de862e9137d5..16c504f8d9d5 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -706,42 +706,42 @@ static const struct dev_pm_ops cmdq_pm_ops = {
cmdq_runtime_resume, NULL)
};
-static const struct gce_plat gce_plat_v2 = {
+static const struct gce_plat gce_plat_mt8173 = {
.thread_nr = 16,
.shift = 0,
.control_by_sw = false,
.gce_num = 1
};
-static const struct gce_plat gce_plat_v3 = {
+static const struct gce_plat gce_plat_mt8183 = {
.thread_nr = 24,
.shift = 0,
.control_by_sw = false,
.gce_num = 1
};
-static const struct gce_plat gce_plat_v4 = {
+static const struct gce_plat gce_plat_mt6779 = {
.thread_nr = 24,
.shift = 3,
.control_by_sw = false,
.gce_num = 1
};
-static const struct gce_plat gce_plat_v5 = {
+static const struct gce_plat gce_plat_mt8192 = {
.thread_nr = 24,
.shift = 3,
.control_by_sw = true,
.gce_num = 1
};
-static const struct gce_plat gce_plat_v6 = {
+static const struct gce_plat gce_plat_mt8195 = {
.thread_nr = 24,
.shift = 3,
.control_by_sw = true,
.gce_num = 2
};
-static const struct gce_plat gce_plat_v7 = {
+static const struct gce_plat gce_plat_mt8186 = {
.thread_nr = 24,
.shift = 3,
.control_by_sw = true,
@@ -750,12 +750,12 @@ static const struct gce_plat gce_plat_v7 = {
};
static const struct of_device_id cmdq_of_ids[] = {
- {.compatible = "mediatek,mt8173-gce", .data = (void *)&gce_plat_v2},
- {.compatible = "mediatek,mt8183-gce", .data = (void *)&gce_plat_v3},
- {.compatible = "mediatek,mt8186-gce", .data = (void *)&gce_plat_v7},
- {.compatible = "mediatek,mt6779-gce", .data = (void *)&gce_plat_v4},
- {.compatible = "mediatek,mt8192-gce", .data = (void *)&gce_plat_v5},
- {.compatible = "mediatek,mt8195-gce", .data = (void *)&gce_plat_v6},
+ {.compatible = "mediatek,mt8173-gce", .data = (void *)&gce_plat_mt8173},
+ {.compatible = "mediatek,mt8183-gce", .data = (void *)&gce_plat_mt8183},
+ {.compatible = "mediatek,mt8186-gce", .data = (void *)&gce_plat_mt8186},
+ {.compatible = "mediatek,mt6779-gce", .data = (void *)&gce_plat_mt6779},
+ {.compatible = "mediatek,mt8192-gce", .data = (void *)&gce_plat_mt8192},
+ {.compatible = "mediatek,mt8195-gce", .data = (void *)&gce_plat_mt8195},
{}
};
--
2.18.0
On Fri, 2023-12-15 at 15:00 +0800, Jason-JH.Lin wrote:
> Rename gce_plat variable postfix from 'v1~v7' to SoC names.
Reviewed-by: CK Hu <[email protected]>
>
> Signed-off-by: Jason-JH.Lin <[email protected]>
> ---
> drivers/mailbox/mtk-cmdq-mailbox.c | 24 ++++++++++++------------
> 1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
> b/drivers/mailbox/mtk-cmdq-mailbox.c
> index de862e9137d5..16c504f8d9d5 100644
> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> @@ -706,42 +706,42 @@ static const struct dev_pm_ops cmdq_pm_ops = {
> cmdq_runtime_resume, NULL)
> };
>
> -static const struct gce_plat gce_plat_v2 = {
> +static const struct gce_plat gce_plat_mt8173 = {
> .thread_nr = 16,
> .shift = 0,
> .control_by_sw = false,
> .gce_num = 1
> };
>
> -static const struct gce_plat gce_plat_v3 = {
> +static const struct gce_plat gce_plat_mt8183 = {
> .thread_nr = 24,
> .shift = 0,
> .control_by_sw = false,
> .gce_num = 1
> };
>
> -static const struct gce_plat gce_plat_v4 = {
> +static const struct gce_plat gce_plat_mt6779 = {
> .thread_nr = 24,
> .shift = 3,
> .control_by_sw = false,
> .gce_num = 1
> };
>
> -static const struct gce_plat gce_plat_v5 = {
> +static const struct gce_plat gce_plat_mt8192 = {
> .thread_nr = 24,
> .shift = 3,
> .control_by_sw = true,
> .gce_num = 1
> };
>
> -static const struct gce_plat gce_plat_v6 = {
> +static const struct gce_plat gce_plat_mt8195 = {
> .thread_nr = 24,
> .shift = 3,
> .control_by_sw = true,
> .gce_num = 2
> };
>
> -static const struct gce_plat gce_plat_v7 = {
> +static const struct gce_plat gce_plat_mt8186 = {
> .thread_nr = 24,
> .shift = 3,
> .control_by_sw = true,
> @@ -750,12 +750,12 @@ static const struct gce_plat gce_plat_v7 = {
> };
>
> static const struct of_device_id cmdq_of_ids[] = {
> - {.compatible = "mediatek,mt8173-gce", .data = (void
> *)&gce_plat_v2},
> - {.compatible = "mediatek,mt8183-gce", .data = (void
> *)&gce_plat_v3},
> - {.compatible = "mediatek,mt8186-gce", .data = (void
> *)&gce_plat_v7},
> - {.compatible = "mediatek,mt6779-gce", .data = (void
> *)&gce_plat_v4},
> - {.compatible = "mediatek,mt8192-gce", .data = (void
> *)&gce_plat_v5},
> - {.compatible = "mediatek,mt8195-gce", .data = (void
> *)&gce_plat_v6},
> + {.compatible = "mediatek,mt8173-gce", .data = (void
> *)&gce_plat_mt8173},
> + {.compatible = "mediatek,mt8183-gce", .data = (void
> *)&gce_plat_mt8183},
> + {.compatible = "mediatek,mt8186-gce", .data = (void
> *)&gce_plat_mt8186},
> + {.compatible = "mediatek,mt6779-gce", .data = (void
> *)&gce_plat_mt6779},
> + {.compatible = "mediatek,mt8192-gce", .data = (void
> *)&gce_plat_mt8192},
> + {.compatible = "mediatek,mt8195-gce", .data = (void
> *)&gce_plat_mt8195},
> {}
> };
>
On Fri, 2023-12-15 at 15:00 +0800, Jason-JH.Lin wrote:
> Sort cmdq platform data according to the number sequence of
> compatible names.
Reviewed-by: CK Hu <[email protected]>
>
> Signed-off-by: Jason-JH.Lin <[email protected]>
> ---
> drivers/mailbox/mtk-cmdq-mailbox.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
> b/drivers/mailbox/mtk-cmdq-mailbox.c
> index 16c504f8d9d5..39bf066d376e 100644
> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> @@ -706,6 +706,13 @@ static const struct dev_pm_ops cmdq_pm_ops = {
> cmdq_runtime_resume, NULL)
> };
>
> +static const struct gce_plat gce_plat_mt6779 = {
> + .thread_nr = 24,
> + .shift = 3,
> + .control_by_sw = false,
> + .gce_num = 1
> +};
> +
> static const struct gce_plat gce_plat_mt8173 = {
> .thread_nr = 16,
> .shift = 0,
> @@ -720,10 +727,11 @@ static const struct gce_plat gce_plat_mt8183 =
> {
> .gce_num = 1
> };
>
> -static const struct gce_plat gce_plat_mt6779 = {
> +static const struct gce_plat gce_plat_mt8186 = {
> .thread_nr = 24,
> .shift = 3,
> - .control_by_sw = false,
> + .control_by_sw = true,
> + .sw_ddr_en = true,
> .gce_num = 1
> };
>
> @@ -741,19 +749,11 @@ static const struct gce_plat gce_plat_mt8195 =
> {
> .gce_num = 2
> };
>
> -static const struct gce_plat gce_plat_mt8186 = {
> - .thread_nr = 24,
> - .shift = 3,
> - .control_by_sw = true,
> - .sw_ddr_en = true,
> - .gce_num = 1
> -};
> -
> static const struct of_device_id cmdq_of_ids[] = {
> + {.compatible = "mediatek,mt6779-gce", .data = (void
> *)&gce_plat_mt6779},
> {.compatible = "mediatek,mt8173-gce", .data = (void
> *)&gce_plat_mt8173},
> {.compatible = "mediatek,mt8183-gce", .data = (void
> *)&gce_plat_mt8183},
> {.compatible = "mediatek,mt8186-gce", .data = (void
> *)&gce_plat_mt8186},
> - {.compatible = "mediatek,mt6779-gce", .data = (void
> *)&gce_plat_mt6779},
> {.compatible = "mediatek,mt8192-gce", .data = (void
> *)&gce_plat_mt8192},
> {.compatible = "mediatek,mt8195-gce", .data = (void
> *)&gce_plat_mt8195},
> {}
On Fri, 2023-12-15 at 15:00 +0800, Jason-JH.Lin wrote:
> Add CMDQ driver support for mt8188 by adding its compatible and
> driver data in CMDQ driver.
Reviewed-by: CK Hu <[email protected]>
>
> Signed-off-by: Jason-JH.Lin <[email protected]>
> ---
> drivers/mailbox/mtk-cmdq-mailbox.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
> b/drivers/mailbox/mtk-cmdq-mailbox.c
> index 39bf066d376e..27ff3a3ccf2f 100644
> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> @@ -735,6 +735,13 @@ static const struct gce_plat gce_plat_mt8186 = {
> .gce_num = 1
> };
>
> +static const struct gce_plat gce_plat_mt8188 = {
> + .thread_nr = 32,
> + .shift = 3,
> + .control_by_sw = true,
> + .gce_num = 2
> +};
> +
> static const struct gce_plat gce_plat_mt8192 = {
> .thread_nr = 24,
> .shift = 3,
> @@ -754,6 +761,7 @@ static const struct of_device_id cmdq_of_ids[] =
> {
> {.compatible = "mediatek,mt8173-gce", .data = (void
> *)&gce_plat_mt8173},
> {.compatible = "mediatek,mt8183-gce", .data = (void
> *)&gce_plat_mt8183},
> {.compatible = "mediatek,mt8186-gce", .data = (void
> *)&gce_plat_mt8186},
> + {.compatible = "mediatek,mt8188-gce", .data = (void
> *)&gce_plat_mt8188},
> {.compatible = "mediatek,mt8192-gce", .data = (void
> *)&gce_plat_mt8192},
> {.compatible = "mediatek,mt8195-gce", .data = (void
> *)&gce_plat_mt8195},
> {}
Il 15/12/23 08:00, Jason-JH.Lin ha scritto:
> Sort cmdq platform data according to the number sequence of
> compatible names.
>
> Signed-off-by: Jason-JH.Lin <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Il 15/12/23 08:00, Jason-JH.Lin ha scritto:
> Add CMDQ driver support for mt8188 by adding its compatible and
> driver data in CMDQ driver.
>
> Signed-off-by: Jason-JH.Lin <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Il 15/12/23 08:00, Jason-JH.Lin ha scritto:
> Rename gce_plat variable postfix from 'v1~v7' to SoC names.
>
> Signed-off-by: Jason-JH.Lin <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>