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 mt8183-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-mt8183.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt8183.c b/drivers/clk/mediatek/clk-mt8183.c index 13fee7a75a0..08e06c60f68 100644 --- a/drivers/clk/mediatek/clk-mt8183.c +++ b/drivers/clk/mediatek/clk-mt8183.c @@ -797,15 +797,11 @@ static const struct udevice_id mt8183_apmixed_compat[] = { { } }; -static const struct udevice_id mt8183_topckgen_compat[] = { +static const struct udevice_id mt8183_clk_compat[] = { { .compatible = "mediatek,mt8183-topckgen", .data = (ulong)&mt8183_topckgen_clk_tree, }, - { } -}; - -static const struct udevice_id mt8183_infracfg_compat[] = { { .compatible = "mediatek,mt8183-infracfg", .data = (ulong)&mt8183_infracfg_tree, @@ -823,20 +819,10 @@ U_BOOT_DRIVER(mt8183_clk_apmixedsys) = { .flags = DM_FLAG_PRE_RELOC, }; -U_BOOT_DRIVER(mt8183_clk_topckgen) = { - .name = "mt8183-topckgen", - .id = UCLASS_CLK, - .of_match = mt8183_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(mt8183_clk_infracfg) = { - .name = "mt8183-infracfg", +U_BOOT_DRIVER(mt8183_clk) = { + .name = "mt8183-clk", .id = UCLASS_CLK, - .of_match = mt8183_infracfg_compat, + .of_match = mt8183_clk_compat, .probe = mtk_clk_probe, .priv_auto = sizeof(struct mtk_clk_priv), .ops = &mtk_clk_topckgen_ops, -- 2.55.0
