cm2xxx.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * OMAP2xxx Clock Management (CM) register definitions
  3. *
  4. * Copyright (C) 2007-2009, 2012 Texas Instruments, Inc.
  5. * Copyright (C) 2007-2010 Nokia Corporation
  6. * Paul Walmsley
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. * The CM hardware modules on the OMAP2/3 are quite similar to each
  13. * other. The CM modules/instances on OMAP4 are quite different, so
  14. * they are handled in a separate file.
  15. */
  16. #ifndef __ARCH_ASM_MACH_OMAP2_CM2XXX_H
  17. #define __ARCH_ASM_MACH_OMAP2_CM2XXX_H
  18. #include "prcm-common.h"
  19. #include "cm2xxx_3xxx.h"
  20. #define OMAP2420_CM_REGADDR(module, reg) \
  21. OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg))
  22. #define OMAP2430_CM_REGADDR(module, reg) \
  23. OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg))
  24. /*
  25. * Module specific CM register offsets from CM_BASE + domain offset
  26. * Use cm_{read,write}_mod_reg() with these registers.
  27. * These register offsets generally appear in more than one PRCM submodule.
  28. */
  29. /* OMAP2-specific register offsets */
  30. #define OMAP24XX_CM_FCLKEN2 0x0004
  31. #define OMAP24XX_CM_ICLKEN4 0x001c
  32. #define OMAP24XX_CM_AUTOIDLE4 0x003c
  33. #define OMAP24XX_CM_IDLEST4 0x002c
  34. /* CM_IDLEST bit field values to indicate deasserted IdleReq */
  35. #define OMAP24XX_CM_IDLEST_VAL 0
  36. /* Clock management domain register get/set */
  37. #ifndef __ASSEMBLER__
  38. extern void omap2xxx_cm_set_dpll_disable_autoidle(void);
  39. extern void omap2xxx_cm_set_dpll_auto_low_power_stop(void);
  40. extern void omap2xxx_cm_set_apll54_disable_autoidle(void);
  41. extern void omap2xxx_cm_set_apll54_auto_low_power_stop(void);
  42. extern void omap2xxx_cm_set_apll96_disable_autoidle(void);
  43. extern void omap2xxx_cm_set_apll96_auto_low_power_stop(void);
  44. int omap2xxx_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_id,
  45. u8 idlest_shift);
  46. extern int omap2xxx_cm_fclks_active(void);
  47. extern int omap2xxx_cm_mpu_retention_allowed(void);
  48. extern u32 omap2xxx_cm_get_core_clk_src(void);
  49. extern u32 omap2xxx_cm_get_core_pll_config(void);
  50. extern void omap2xxx_cm_set_mod_dividers(u32 mpu, u32 dsp, u32 gfx, u32 core,
  51. u32 mdm);
  52. int __init omap2xxx_cm_init(const struct omap_prcm_init_data *data);
  53. #endif
  54. #endif