Skip to content

Commit 1f9adbc

Browse files
committed
clk/soc: mediatek: mt8183: 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 c292b13 commit 1f9adbc

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ static const struct mtk_gate mm_clks[] = {
8484

8585
static int clk_mt8183_mm_probe(struct platform_device *pdev)
8686
{
87+
struct device *dev = &pdev->dev;
88+
struct device_node *node = dev->parent->of_node;
8789
struct clk_onecell_data *clk_data;
88-
struct device_node *node = pdev->dev.of_node;
8990

9091
clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK);
9192

@@ -95,16 +96,10 @@ static int clk_mt8183_mm_probe(struct platform_device *pdev)
9596
return of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
9697
}
9798

98-
static const struct of_device_id of_match_clk_mt8183_mm[] = {
99-
{ .compatible = "mediatek,mt8183-mmsys", },
100-
{}
101-
};
102-
10399
static struct platform_driver clk_mt8183_mm_drv = {
104100
.probe = clk_mt8183_mm_probe,
105101
.driver = {
106102
.name = "clk-mt8183-mm",
107-
.of_match_table = of_match_clk_mt8183_mm,
108103
},
109104
};
110105

drivers/soc/mediatek/mtk-mmsys.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ static const struct mtk_mmsys_driver_data mt8173_mmsys_driver_data = {
9191
.clk_driver = "clk-mt8173-mm",
9292
};
9393

94+
static const struct mtk_mmsys_driver_data mt8183_mmsys_driver_data = {
95+
.clk_driver = "clk-mt8183-mm",
96+
};
97+
9498
static unsigned int mtk_mmsys_ddp_mout_en(enum mtk_ddp_comp_id cur,
9599
enum mtk_ddp_comp_id next,
96100
unsigned int *addr)
@@ -340,6 +344,10 @@ static const struct of_device_id of_match_mtk_mmsys[] = {
340344
.compatible = "mediatek,mt8173-mmsys",
341345
.data = &mt8173_mmsys_driver_data,
342346
},
347+
{
348+
.compatible = "mediatek,mt8183-mmsys",
349+
.data = &mt8183_mmsys_driver_data,
350+
},
343351
{ }
344352
};
345353

0 commit comments

Comments
 (0)