[PATCH v2 0/9] clk: mediatek: clean up flags
Julien Stephan
jstephan at baylibre.com
Fri Mar 13 15:29:52 CET 2026
Le ven. 6 mars 2026 à 23:07, David Lechner <dlechner at baylibre.com> a écrit :
>
> The main point of this series it to get rid of the CLK_BYPASS_XTAL flag.
> It was a bit of a hack to allow mux clock parent arrays to contain both
> CLK_XTAL and CLK_TOP_* clocks. It's usage doesn't work in all cases and
> is easy to get wrong.
>
> In the meantime, we have added CLK_PARENT_MIXED and struct mtk_parent to
> handle mux clock parents properly. There just a few drivers that were
> not making use of this yet, so those are converted. Then we can remove
> the problematic flag.
>
> There are also a couple of other patches to give better names to some
> of the existing flags while we are cleaning things up.
>
> Signed-off-by: David Lechner <dlechner at baylibre.com>
> ---
> Changes in v2:
> - Fix definition of MUX_GATE_MIXED_FLAGS to avoid compile error.
> - New patch to explicitly set CLK_PARENT_XTAL on fixed factor clocks.
> - New patch to consolidate duplicate *_PARENT() macros.
> - Link to v1: https://lore.kernel.org/r/20260223-clk-mtk-remove-clk-bypass-xtal-flag-v1-0-a7dc97bc2660@baylibre.com
>
> ---
> David Lechner (9):
> clk: mediatek: rename HAVE_RST_BAR
> clk: mediatek: rename CLK_DOMAIN_SCPSYS
> clk: mediatek: add MUX_GATE_MIXED macros
> clk: mediatek: move common PARENT macros to header
> clk: mediatek: mt7622: change to struct mtk_parent
> clk: mediatek: mt7623: change to struct mtk_parent
> clk: mediatek: mt7629: change to struct mtk_parent
> clk: mediatek: set CLK_PARENT_XTAL on fixed factor clocks
> clk: mediatek: remove use of CLK_BYPASS_XTAL flag
>
> drivers/clk/mediatek/clk-mt7622.c | 334 ++++++++--------
> drivers/clk/mediatek/clk-mt7623.c | 779 +++++++++++++++++++-------------------
> drivers/clk/mediatek/clk-mt7629.c | 442 ++++++++++-----------
> drivers/clk/mediatek/clk-mt7981.c | 5 +-
> drivers/clk/mediatek/clk-mt7986.c | 7 +-
> drivers/clk/mediatek/clk-mt7987.c | 5 +-
> drivers/clk/mediatek/clk-mt7988.c | 5 +-
> drivers/clk/mediatek/clk-mt8183.c | 12 +-
> drivers/clk/mediatek/clk-mt8188.c | 6 +-
> drivers/clk/mediatek/clk-mt8189.c | 4 -
> drivers/clk/mediatek/clk-mt8195.c | 6 +-
> drivers/clk/mediatek/clk-mt8365.c | 4 +-
> drivers/clk/mediatek/clk-mt8512.c | 6 +-
> drivers/clk/mediatek/clk-mt8516.c | 6 +-
> drivers/clk/mediatek/clk-mt8518.c | 6 +-
> drivers/clk/mediatek/clk-mtk.c | 14 +-
> drivers/clk/mediatek/clk-mtk.h | 33 +-
> 17 files changed, 830 insertions(+), 844 deletions(-)
> ---
> base-commit: c0ca147ac6228949a6d6497531c9f2f4a0dc6c67
> change-id: 20260223-clk-mtk-remove-clk-bypass-xtal-flag-c2e2c82aabb4
> prerequisite-message-id: <20260303-mtk-mt8189-clocks-v4-0-ee85f8dd2f0d at baylibre.com>
> prerequisite-patch-id: 81f2dd4fd7c1632736c08180d6b9f6aef5fe1e7f
> prerequisite-patch-id: 60f0509a5f36c2828316fa3e27dfd8f4d218eb27
> prerequisite-patch-id: 237c548edf19f9cf734b1ac3b9252a4f06d8cf29
> prerequisite-patch-id: 22de64f70e8d1ba5e17f8b31f461118b35e54f30
> prerequisite-patch-id: 3d5661f9e55292a30f57617848a7b10e67844402
> prerequisite-patch-id: ccbc73b2bc1dc41beb295604088d63773cea15ef
> prerequisite-patch-id: aa76b6b028374f20551955eafe56a1e0c1daa75d
>
> Best regards,
> --
> David Lechner <dlechner at baylibre.com>
>
Hi David,
LGTM, tested on genio-510-evk and clk dump looks correct on the platform.
Reviewed-by: Julien Stephan <jstephan at baylibre.com>
Thanks
Julien
More information about the U-Boot
mailing list