clock.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* arch/arm/mach-msm/clock.h
  2. *
  3. * Copyright (C) 2007 Google, Inc.
  4. * Copyright (c) 2007-2012, The Linux Foundation. All rights reserved.
  5. *
  6. * This software is licensed under the terms of the GNU General Public
  7. * License version 2, as published by the Free Software Foundation, and
  8. * may be copied, distributed, and modified under those terms.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. */
  16. #ifndef __ARCH_ARM_MACH_MSM_CLOCK_H
  17. #define __ARCH_ARM_MACH_MSM_CLOCK_H
  18. #include <linux/clk-provider.h>
  19. #include <mach/clk.h>
  20. #define CLK_FIRST_AVAILABLE_FLAG 0x00000100
  21. #define CLKFLAG_AUTO_OFF 0x00000200
  22. #define CLKFLAG_MIN 0x00000400
  23. #define CLKFLAG_MAX 0x00000800
  24. #define OFF CLKFLAG_AUTO_OFF
  25. #define CLK_MIN CLKFLAG_MIN
  26. #define CLK_MAX CLKFLAG_MAX
  27. #define CLK_MINMAX (CLK_MIN | CLK_MAX)
  28. struct msm_clk {
  29. int (*reset)(struct clk_hw *hw, enum clk_reset_action action);
  30. struct clk_hw hw;
  31. };
  32. static inline struct msm_clk *to_msm_clk(struct clk_hw *hw)
  33. {
  34. return container_of(hw, struct msm_clk, hw);
  35. }
  36. #endif