Skip to content

Commit 9c5a0a3

Browse files
Enric Balletbo i Serrambgg
authored andcommitted
clk / soc: mediatek: Bind clock and gpu driver for mt2712
Now that the mmsys driver is the top-level entry point for the multimedia subsystem, we could bind the clock and the gpu driver on those devices that is expected to work, so the drm driver is intantiated by the mmsys driver and display, hopefully, working again on those devices. Signed-off-by: Enric Balletbo i Serra <[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 52660e5 commit 9c5a0a3

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

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

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

129129
static int clk_mt2712_mm_probe(struct platform_device *pdev)
130130
{
131+
struct device *dev = &pdev->dev;
132+
struct device_node *node = dev->parent->of_node;
131133
struct clk_onecell_data *clk_data;
132134
int r;
133-
struct device_node *node = pdev->dev.of_node;
134135

135136
clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK);
136137

@@ -146,16 +147,10 @@ static int clk_mt2712_mm_probe(struct platform_device *pdev)
146147
return r;
147148
}
148149

149-
static const struct of_device_id of_match_clk_mt2712_mm[] = {
150-
{ .compatible = "mediatek,mt2712-mmsys", },
151-
{}
152-
};
153-
154150
static struct platform_driver clk_mt2712_mm_drv = {
155151
.probe = clk_mt2712_mm_probe,
156152
.driver = {
157153
.name = "clk-mt2712-mm",
158-
.of_match_table = of_match_clk_mt2712_mm,
159154
},
160155
};
161156

drivers/soc/mediatek/mtk-mmsys.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ struct mtk_mmsys_driver_data {
7979
const char *clk_driver;
8080
};
8181

82+
static const struct mtk_mmsys_driver_data mt2712_mmsys_driver_data = {
83+
.clk_driver = "clk-mt2712-mm",
84+
};
85+
8286
static const struct mtk_mmsys_driver_data mt8173_mmsys_driver_data = {
8387
.clk_driver = "clk-mt8173-mm",
8488
};
@@ -320,6 +324,10 @@ static int mtk_mmsys_probe(struct platform_device *pdev)
320324
}
321325

322326
static const struct of_device_id of_match_mtk_mmsys[] = {
327+
{
328+
.compatible = "mediatek,mt2712-mmsys",
329+
.data = &mt2712_mmsys_driver_data,
330+
},
323331
{
324332
.compatible = "mediatek,mt8173-mmsys",
325333
.data = &mt8173_mmsys_driver_data,

0 commit comments

Comments
 (0)