clock2xxx.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #include <linux/clk-provider.h>
  10. #include "clock.h"
  11. unsigned long omap2_table_mpu_recalc(struct clk_hw *clk,
  12. unsigned long parent_rate);
  13. int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate,
  14. unsigned long parent_rate);
  15. long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate,
  16. unsigned long *parent_rate);
  17. unsigned long omap2xxx_sys_clk_recalc(struct clk_hw *clk,
  18. unsigned long parent_rate);
  19. unsigned long omap2_osc_clk_recalc(struct clk_hw *clk,
  20. unsigned long parent_rate);
  21. unsigned long omap2_dpllcore_recalc(struct clk_hw *hw,
  22. unsigned long parent_rate);
  23. int omap2_reprogram_dpllcore(struct clk_hw *clk, unsigned long rate,
  24. unsigned long parent_rate);
  25. void omap2xxx_clkt_dpllcore_init(struct clk_hw *hw);
  26. unsigned long omap2_clk_apll54_recalc(struct clk_hw *hw,
  27. unsigned long parent_rate);
  28. unsigned long omap2_clk_apll96_recalc(struct clk_hw *hw,
  29. unsigned long parent_rate);
  30. unsigned long omap2xxx_clk_get_core_rate(void);
  31. u32 omap2xxx_get_apll_clkin(void);
  32. u32 omap2xxx_get_sysclkdiv(void);
  33. void omap2xxx_clk_prepare_for_reboot(void);
  34. void omap2xxx_clkt_vps_check_bootloader_rates(void);
  35. void omap2xxx_clkt_vps_late_init(void);
  36. #ifdef CONFIG_SOC_OMAP2420
  37. int omap2420_clk_init(void);
  38. #else
  39. #define omap2420_clk_init() do { } while(0)
  40. #endif
  41. #ifdef CONFIG_SOC_OMAP2430
  42. int omap2430_clk_init(void);
  43. #else
  44. #define omap2430_clk_init() do { } while(0)
  45. #endif
  46. extern void __iomem *prcm_clksrc_ctrl;
  47. extern struct clk_hw *dclk_hw;
  48. int omap2_enable_osc_ck(struct clk_hw *hw);
  49. void omap2_disable_osc_ck(struct clk_hw *hw);
  50. int omap2_clk_apll96_enable(struct clk_hw *hw);
  51. int omap2_clk_apll54_enable(struct clk_hw *hw);
  52. void omap2_clk_apll96_disable(struct clk_hw *hw);
  53. void omap2_clk_apll54_disable(struct clk_hw *hw);
  54. #endif