This is the final chapter in the year-long quest to remove duplication and increase consistency across the MediaTek clock drivers. Most of the clock ops now are duplicated code that can be combined into a single functions. So we do that and then consolidate all of the mt8xxx clock drivers to use this single set of operations (mt7xxx have some extra hooks on certain clock trees, so they are not consolidated here).
This depends on [1] to apply cleanly. And if you happen to be working on a clock driver for a new MediaTek target, all of this will be available in the mediatek-staging branch shortly to base your changes on [2]. [1]: https://lore.kernel.org/u-boot/[email protected]/ [2]: https://git.u-boot-project.org/u-boot/custodians/u-boot-mediatek Signed-off-by: David Lechner <[email protected]> --- David Lechner (15): clk: mediatek: add fclks_offs to struct mtk_clk_tree clk: mediatek: merge the of_xlate callbacks clk: mediatek: merge the enable and disable callbacks clk: mediatek: merge the get_rate callbacks clk: mediatek: merge the dump callbacks clk: mediatek: use a single clk_ops for all drivers clk: mediatek: mt8183: merge the apmixedsys driver into mt8183-clk clk: mediatek: mt8188: merge the apmixedsys driver into mt8188-clk clk: mediatek: mt8189: merge the remaining drivers into mt8189-clk clk: mediatek: mt8195: merge the apmixedsys driver into mt8195-clk clk: mediatek: mt8365: merge the apmixedsys driver into mt8365-clk clk: mediatek: mt8366: merge the apmixedsys driver into mt8366-clk clk: mediatek: mt8512: merge the apmixedsys driver into mt8512-clk clk: mediatek: mt8516: merge the apmixedsys driver into mt8516-clk clk: mediatek: mt8518: merge the apmixedsys driver into mt8518-clk arch/arm/mach-mediatek/mt8516/init.c | 6 +- drivers/clk/mediatek/clk-mt7622.c | 10 +- drivers/clk/mediatek/clk-mt7623.c | 10 +- drivers/clk/mediatek/clk-mt7629.c | 10 +- drivers/clk/mediatek/clk-mt7981.c | 10 +- drivers/clk/mediatek/clk-mt7986.c | 8 +- drivers/clk/mediatek/clk-mt7987.c | 8 +- drivers/clk/mediatek/clk-mt7988.c | 12 +- drivers/clk/mediatek/clk-mt8183.c | 18 +- drivers/clk/mediatek/clk-mt8188.c | 18 +- drivers/clk/mediatek/clk-mt8189.c | 40 +--- drivers/clk/mediatek/clk-mt8195.c | 18 +- drivers/clk/mediatek/clk-mt8365.c | 18 +- drivers/clk/mediatek/clk-mt8366.c | 18 +- drivers/clk/mediatek/clk-mt8512.c | 18 +- drivers/clk/mediatek/clk-mt8516.c | 18 +- drivers/clk/mediatek/clk-mt8518.c | 18 +- drivers/clk/mediatek/clk-mtk.c | 379 +++++++---------------------------- drivers/clk/mediatek/clk-mtk.h | 10 +- 19 files changed, 144 insertions(+), 503 deletions(-) --- base-commit: 8189f1c305fa8af99780a84dbffc34d2f0f06743 change-id: 20260924-clk-mtk-single-ops-75410cf38279 Best regards, -- David Lechner <[email protected]>
