Skip to content

Commit c292b13

Browse files
Enric Balletbo i Serrambgg
authored andcommitted
clk / soc: mediatek: Bind clock and gpu driver for mt2701
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. 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 9c5a0a3 commit c292b13

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,12 @@ static const struct mtk_gate mm_clks[] = {
7979
GATE_DISP1(CLK_MM_TVE_FMM, "mm_tve_fmm", "mm_sel", 14),
8080
};
8181

82-
static const struct of_device_id of_match_clk_mt2701_mm[] = {
83-
{ .compatible = "mediatek,mt2701-mmsys", },
84-
{}
85-
};
86-
8782
static int clk_mt2701_mm_probe(struct platform_device *pdev)
8883
{
84+
struct device *dev = &pdev->dev;
85+
struct device_node *node = dev->parent->of_node;
8986
struct clk_onecell_data *clk_data;
9087
int r;
91-
struct device_node *node = pdev->dev.of_node;
9288

9389
clk_data = mtk_alloc_clk_data(CLK_MM_NR);
9490

@@ -108,7 +104,6 @@ static struct platform_driver clk_mt2701_mm_drv = {
108104
.probe = clk_mt2701_mm_probe,
109105
.driver = {
110106
.name = "clk-mt2701-mm",
111-
.of_match_table = of_match_clk_mt2701_mm,
112107
},
113108
};
114109

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 mt2701_mmsys_driver_data = {
83+
.clk_driver = "clk-mt2701-mm",
84+
};
85+
8286
static const struct mtk_mmsys_driver_data mt2712_mmsys_driver_data = {
8387
.clk_driver = "clk-mt2712-mm",
8488
};
@@ -324,6 +328,10 @@ static int mtk_mmsys_probe(struct platform_device *pdev)
324328
}
325329

326330
static const struct of_device_id of_match_mtk_mmsys[] = {
331+
{
332+
.compatible = "mediatek,mt2701-mmsys",
333+
.data = &mt2701_mmsys_driver_data,
334+
},
327335
{
328336
.compatible = "mediatek,mt2712-mmsys",
329337
.data = &mt2712_mmsys_driver_data,

0 commit comments

Comments
 (0)