]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mmc: meson-mx-sdio: Refactor internal clock initialization
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sat, 8 Nov 2025 23:12:49 +0000 (00:12 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 18 Nov 2025 15:21:35 +0000 (16:21 +0100)
commitb63f8fc1d0891c5fa35963ba465a24eb71367c00
treef4f916c435cbb93072909da183f32c1dfa6a10c0
parentc0184b2f793b40bf1f6be17bab84c9abf3d368f9
mmc: meson-mx-sdio: Refactor internal clock initialization

Use modern common clock framework helpers for simplifying the clock
controller management:
- switch to struct clk_hw for internal clocks and only get the
  "cfg_div_clk" (which has to be managed at runtime) as struct clk
  using devm_clk_hw_get_clk() which is then the only clock used by
  struct meson_mx_mmc_host.
- use CLK_HW_INIT_FW_NAME and CLK_HW_INIT_HW helper macros for simpler
  init data initialization
- keep the clock controller memory allocation separate to prevent a
  potential use-after-free because struct meson_mx_mmc_host_clkc is
  free'd before controller_dev

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/meson-mx-sdio.c