This is the start of another wave of Mediatek clock driver improvements with the aim to simplify things.
This series replaces complex rules about clock tree ancestor relations used to look up parent clocks with a simple table to register clock trees that provide a certain parent type. Now, clock trees that contain parent clocks just need to populate the type field with the appropriate type and they will be registered during driver init. Then we can just look up the clock tree that contains a parent clock from this table at runtime without having to walk ancestors in the clock tree. This is done in phases to break things down into logical components: * First patch is something that was missed in earlier cleanups where all clocks now have a parent flag set rather than relying on implicit parent relationships from the clock tree structure itself. * The next patch adds the infrastructure to register clock trees with a specific parent type. * Then there is a group of patches to add the required info to each chip-specific clock trees so that they actually get registered. * The next patch then replaces all of the lookups for parent clocks to use the new table-based mechanism. * Then the rest of the patches are removing code that is no longer used after the previous changes. Signed-off-by: David Lechner <[email protected]> --- David Lechner (24): clk: mediatek: mt7622: set parent flag for GATE_APMIXED() clk: mediatek: add registration function for clock tree types clk: mediaTek: mt7622: add clock tree type flags clk: mediaTek: mt7623: add clock tree type flags clk: mediaTek: mt7629: add clock tree type flags clk: mediaTek: mt7981: add clock tree type flags clk: mediaTek: mt7986: add clock tree type flags clk: mediaTek: mt7987: add clock tree type flags clk: mediaTek: mt7988: add clock tree type flags clk: mediaTek: mt8183: add clock tree type flags clk: mediaTek: mt8188: add clock tree type flags clk: mediaTek: mt8189: add clock tree type flags clk: mediaTek: mt8195: add clock tree type flags clk: mediaTek: mt8365: add clock tree type flags clk: mediaTek: mt8512: add clock tree type flags clk: mediaTek: mt8516: add clock tree type flags clk: mediaTek: mt8518: add clock tree type flags clk: mediatek: use registered provider for parent lookup clk: mediatek: drop parent udevice field clk: mediatek: remove mtk_common_clk_infrasys_init() arm: dts: mt7981: remove clock-parent properties arm: dts: mt7986: remove clock-parent properties arm: dts: mt7988: remove clock-parent properties clk: mediatek: mt7629: remove mt7629_peri_clk_tree arch/arm/dts/mt7981.dtsi | 3 - arch/arm/dts/mt7986.dtsi | 3 - arch/arm/dts/mt7988.dtsi | 12 --- drivers/clk/mediatek/clk-mt7622.c | 31 ++++--- drivers/clk/mediatek/clk-mt7623.c | 4 +- drivers/clk/mediatek/clk-mt7629.c | 28 +++--- drivers/clk/mediatek/clk-mt7981.c | 16 +++- drivers/clk/mediatek/clk-mt7986.c | 12 ++- drivers/clk/mediatek/clk-mt7987.c | 12 ++- drivers/clk/mediatek/clk-mt7988.c | 19 +++-- drivers/clk/mediatek/clk-mt8183.c | 22 +++-- drivers/clk/mediatek/clk-mt8188.c | 2 + drivers/clk/mediatek/clk-mt8189.c | 13 ++- drivers/clk/mediatek/clk-mt8195.c | 2 + drivers/clk/mediatek/clk-mt8365.c | 2 + drivers/clk/mediatek/clk-mt8512.c | 22 +++-- drivers/clk/mediatek/clk-mt8516.c | 22 +++-- drivers/clk/mediatek/clk-mt8518.c | 22 +++-- drivers/clk/mediatek/clk-mtk.c | 173 ++++++++++++++------------------------ drivers/clk/mediatek/clk-mtk.h | 15 +++- 20 files changed, 240 insertions(+), 195 deletions(-) --- base-commit: 6a320da6ed11817859c5fa5267094907653405b7 change-id: 20260706-mtk-clk-parent-lookup-improvements-811460a93ecf Best regards, -- David Lechner <[email protected]>

