clk-regmap-phy-mux.h 999 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2022, Linaro Ltd.
  4. */
  5. #ifndef __QCOM_CLK_REGMAP_PHY_MUX_H__
  6. #define __QCOM_CLK_REGMAP_PHY_MUX_H__
  7. #include "clk-regmap.h"
  8. /*
  9. * A clock implementation for PHY pipe and symbols clock muxes.
  10. *
  11. * If the clock is running off the from-PHY source, report it as enabled.
  12. * Report it as disabled otherwise (if it uses reference source).
  13. *
  14. * This way the PHY will disable the pipe clock before turning off the GDSC,
  15. * which in turn would lead to disabling corresponding pipe_clk_src (and thus
  16. * it being parked to a safe, reference clock source). And vice versa, after
  17. * enabling the GDSC the PHY will enable the pipe clock, which would cause
  18. * pipe_clk_src to be switched from a safe source to the working one.
  19. *
  20. * For some platforms this should be used for the UFS symbol_clk_src clocks
  21. * too.
  22. */
  23. struct clk_regmap_phy_mux {
  24. u32 reg;
  25. struct clk_regmap clkr;
  26. };
  27. extern const struct clk_ops clk_regmap_phy_mux_ops;
  28. #endif