Skip to content

Commit cad4e37

Browse files
committed
clk/soc: mediatek: mt6797: Bind clock driver from platform device
The mmsys driver is now the top level entry point for the multimedia system (mmsys), we bind the clock driver by creating a platform device. We also bind the MediaTek DRM driver which is not yet implement and therefor will errror out for now. Signed-off-by: Matthias Brugger <[email protected]> Reviewed-by: Chun-Kuang Hu <[email protected]> Acked-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
1 parent 1f9adbc commit cad4e37

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

drivers/clk/mediatek/clk-mt6797-mm.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,12 @@ static const struct mtk_gate mm_clks[] = {
9292
"clk26m", 3),
9393
};
9494

95-
static const struct of_device_id of_match_clk_mt6797_mm[] = {
96-
{ .compatible = "mediatek,mt6797-mmsys", },
97-
{}
98-
};
99-
10095
static int clk_mt6797_mm_probe(struct platform_device *pdev)
10196
{
97+
struct device *dev = &pdev->dev;
98+
struct device_node *node = dev->parent->of_node;
10299
struct clk_onecell_data *clk_data;
103100
int r;
104-
struct device_node *node = pdev->dev.of_node;
105101

106102
clk_data = mtk_alloc_clk_data(CLK_MM_NR);
107103

@@ -121,7 +117,6 @@ static struct platform_driver clk_mt6797_mm_drv = {
121117
.probe = clk_mt6797_mm_probe,
122118
.driver = {
123119
.name = "clk-mt6797-mm",
124-
.of_match_table = of_match_clk_mt6797_mm,
125120
},
126121
};
127122

drivers/soc/mediatek/mtk-mmsys.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ static const struct mtk_mmsys_driver_data mt2712_mmsys_driver_data = {
8787
.clk_driver = "clk-mt2712-mm",
8888
};
8989

90+
static const struct mtk_mmsys_driver_data mt6797_mmsys_driver_data = {
91+
.clk_driver = "clk-mt6797-mm",
92+
};
93+
9094
static const struct mtk_mmsys_driver_data mt8173_mmsys_driver_data = {
9195
.clk_driver = "clk-mt8173-mm",
9296
};
@@ -340,6 +344,10 @@ static const struct of_device_id of_match_mtk_mmsys[] = {
340344
.compatible = "mediatek,mt2712-mmsys",
341345
.data = &mt2712_mmsys_driver_data,
342346
},
347+
{
348+
.compatible = "mediatek,mt6797-mmsys",
349+
.data = &mt6797_mmsys_driver_data,
350+
},
343351
{
344352
.compatible = "mediatek,mt8173-mmsys",
345353
.data = &mt8173_mmsys_driver_data,

0 commit comments

Comments
 (0)