The topckgen and infracfg U_BOOT_DRIVER entries only differ by their of_match table: they share the same probe, ops, private data and flags. Merge them into a single mt8365-clk driver, the way clk-mt8366.c already does, so that a new clock block only needs a new of_match entry.
No functional change. Signed-off-by: Julien Stephan <[email protected]> --- drivers/clk/mediatek/clk-mt8365.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt8365.c b/drivers/clk/mediatek/clk-mt8365.c index 872de82d6f3..0d74561ace0 100644 --- a/drivers/clk/mediatek/clk-mt8365.c +++ b/drivers/clk/mediatek/clk-mt8365.c @@ -764,15 +764,11 @@ static const struct udevice_id mt8365_apmixed_compat[] = { { } }; -static const struct udevice_id mt8365_topckgen_compat[] = { +static const struct udevice_id mt8365_clk_compat[] = { { .compatible = "mediatek,mt8365-topckgen", .data = (ulong)&mt8365_topckgen_tree, }, - { } -}; - -static const struct udevice_id mt8365_infracfg_compat[] = { { .compatible = "mediatek,mt8365-infracfg", .data = (ulong)&mt8365_infracfg_tree, @@ -790,20 +786,10 @@ U_BOOT_DRIVER(mt8365_clk_apmixedsys) = { .flags = DM_FLAG_PRE_RELOC, }; -U_BOOT_DRIVER(mt8365_clk_topckgen) = { - .name = "mt8365-topckgen", - .id = UCLASS_CLK, - .of_match = mt8365_topckgen_compat, - .probe = mtk_clk_probe, - .priv_auto = sizeof(struct mtk_clk_priv), - .ops = &mtk_clk_topckgen_ops, - .flags = DM_FLAG_PRE_RELOC, -}; - -U_BOOT_DRIVER(mt8365_clk_infracfg) = { - .name = "mt8365-infracfg", +U_BOOT_DRIVER(mt8365_clk) = { + .name = "mt8365-clk", .id = UCLASS_CLK, - .of_match = mt8365_infracfg_compat, + .of_match = mt8365_clk_compat, .probe = mtk_clk_probe, .priv_auto = sizeof(struct mtk_clk_priv), .ops = &mtk_clk_topckgen_ops, -- 2.55.0
