Move the apmixedsys and vlpckgen compatibles into the mt8189-clk
of_match table and drop their separate U_BOOT_DRIVER entries.

They were only kept apart because they used different clk_ops. Now
that all MediaTek clock drivers share mtk_clk_ops, their entries are
identical to mt8189-clk apart from the of_match table.

No functional change.

Signed-off-by: David Lechner <[email protected]>
---
 drivers/clk/mediatek/clk-mt8189.c | 38 +++++---------------------------------
 1 file changed, 5 insertions(+), 33 deletions(-)

diff --git a/drivers/clk/mediatek/clk-mt8189.c 
b/drivers/clk/mediatek/clk-mt8189.c
index a4880b98906..89589daae8b 100644
--- a/drivers/clk/mediatek/clk-mt8189.c
+++ b/drivers/clk/mediatek/clk-mt8189.c
@@ -1978,19 +1978,19 @@ MTK_GATE_CLK_TREE(ufs_config_ao_clks_tree, 
ufs_config_ao_clks, ext_clock_rates);
 MTK_GATE_CLK_TREE(ufs_config_pdn_clks_tree, ufs_config_pdn_clks, 
ext_clock_rates);
 MTK_GATE_CLK_TREE(vlpcfg_ao_clks_tree, vlpcfg_ao_clks, ext_clock_rates);
 
-static const struct udevice_id mt8189_apmixed[] = {
+static const struct udevice_id mt8189_clk_compat[] = {
        {
                .compatible = "mediatek,mt8189-apmixedsys",
                .data = (ulong)&mt8189_apmixedsys_clk_tree,
        },
-       { }
-};
-
-static const struct udevice_id mt8189_clk_compat[] = {
        {
                .compatible = "mediatek,mt8189-topckgen",
                .data = (ulong)&mt8189_topckgen_clk_tree,
        },
+       {
+               .compatible = "mediatek,mt8189-vlpckgen",
+               .data = (ulong)&mt8189_vlpckgen_clk_tree,
+       },
        {
                .compatible = "mediatek,mt8189-peri-ao",
                .data = (ulong)&perao_clks_tree,
@@ -2022,24 +2022,6 @@ static const struct udevice_id mt8189_clk_compat[] = {
        { }
 };
 
-static const struct udevice_id mt8189_vlpckgen[] = {
-       {
-               .compatible = "mediatek,mt8189-vlpckgen",
-               .data = (ulong)&mt8189_vlpckgen_clk_tree,
-       },
-       { }
-};
-
-U_BOOT_DRIVER(mt8189_clk_apmixedsys) = {
-       .name = "mt8189-apmixedsys",
-       .id = UCLASS_CLK,
-       .of_match = mt8189_apmixed,
-       .probe = mtk_clk_probe,
-       .priv_auto = sizeof(struct mtk_clk_priv),
-       .ops = &mtk_clk_ops,
-       .flags = DM_FLAG_PRE_RELOC,
-};
-
 U_BOOT_DRIVER(mt8189_clk) = {
        .name = "mt8189-clk",
        .id = UCLASS_CLK,
@@ -2049,13 +2031,3 @@ U_BOOT_DRIVER(mt8189_clk) = {
        .ops = &mtk_clk_ops,
        .flags = DM_FLAG_PRE_RELOC,
 };
-
-U_BOOT_DRIVER(mt8189_clk_vlpckgen) = {
-       .name = "mt8189-vlpckgen",
-       .id = UCLASS_CLK,
-       .of_match = mt8189_vlpckgen,
-       .probe = mtk_clk_probe,
-       .priv_auto = sizeof(struct mtk_clk_priv),
-       .ops = &mtk_clk_ops,
-       .flags = DM_FLAG_PRE_RELOC,
-};

-- 
2.43.0

Reply via email to