clock2xxx.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * OMAP2 clock function prototypes and macros
  3. *
  4. * Copyright (C) 2005-2010 Texas Instruments, Inc.
  5. * Copyright (C) 2004-2010 Nokia Corporation
  6. */
  7. #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK2XXX_H
  8. #define __ARCH_ARM_MACH_OMAP2_CLOCK2XXX_H
  9. #ifdef CONFIG_COMMON_CLK
  10. #include <linux/clk-provider.h>
  11. #include "clock.h"
  12. unsigned long omap2_table_mpu_recalc(struct clk_hw *clk,
  13. unsigned long parent_rate);
  14. int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate,
  15. unsigned long parent_rate);
  16. long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate,
  17. unsigned long *parent_rate);
  18. unsigned long omap2xxx_sys_clk_recalc(struct clk_hw *clk,
  19. unsigned long parent_rate);
  20. unsigned long omap2_osc_clk_recalc(struct clk_hw *clk,
  21. unsigned long parent_rate);
  22. unsigned long omap2_dpllcore_recalc(struct clk_hw *hw,
  23. unsigned long parent_rate);
  24. int omap2_reprogram_dpllcore(struct clk_hw *clk, unsigned long rate,
  25. unsigned long parent_rate);
  26. void omap2xxx_clkt_dpllcore_init(struct clk_hw *hw);
  27. #else
  28. unsigned long omap2_table_mpu_recalc(struct clk *clk);
  29. int omap2_select_table_rate(struct clk *clk, unsigned long rate);
  30. long omap2_round_to_table_rate(struct clk *clk, unsigned long rate);
  31. unsigned long omap2xxx_sys_clk_recalc(struct clk *clk);
  32. unsigned long omap2_osc_clk_recalc(struct clk *clk);
  33. unsigned long omap2_dpllcore_recalc(struct clk *clk);
  34. int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate);
  35. void omap2xxx_clkt_dpllcore_init(struct clk *clk);
  36. #endif
  37. unsigned long omap2xxx_clk_get_core_rate(void);
  38. u32 omap2xxx_get_apll_clkin(void);
  39. u32 omap2xxx_get_sysclkdiv(void);
  40. void omap2xxx_clk_prepare_for_reboot(void);
  41. void omap2xxx_clkt_vps_check_bootloader_rates(void);
  42. void omap2xxx_clkt_vps_late_init(void);
  43. #ifdef CONFIG_SOC_OMAP2420
  44. int omap2420_clk_init(void);
  45. #else
  46. #define omap2420_clk_init() do { } while(0)
  47. #endif
  48. #ifdef CONFIG_SOC_OMAP2430
  49. int omap2430_clk_init(void);
  50. #else
  51. #define omap2430_clk_init() do { } while(0)
  52. #endif
  53. extern void __iomem *prcm_clksrc_ctrl;
  54. #ifdef CONFIG_COMMON_CLK
  55. extern struct clk_hw *dclk_hw;
  56. int omap2_enable_osc_ck(struct clk_hw *hw);
  57. void omap2_disable_osc_ck(struct clk_hw *hw);
  58. int omap2_clk_apll96_enable(struct clk_hw *hw);
  59. int omap2_clk_apll54_enable(struct clk_hw *hw);
  60. void omap2_clk_apll96_disable(struct clk_hw *hw);
  61. void omap2_clk_apll54_disable(struct clk_hw *hw);
  62. #else
  63. extern const struct clkops clkops_omap2430_i2chs_wait;
  64. extern const struct clkops clkops_oscck;
  65. extern const struct clkops clkops_apll96;
  66. extern const struct clkops clkops_apll54;
  67. #endif
  68. #endif