cm3xxx.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * OMAP2/3 Clock Management (CM) register definitions
  4. *
  5. * Copyright (C) 2007-2009 Texas Instruments, Inc.
  6. * Copyright (C) 2007-2010 Nokia Corporation
  7. * Paul Walmsley
  8. *
  9. * The CM hardware modules on the OMAP2/3 are quite similar to each
  10. * other. The CM modules/instances on OMAP4 are quite different, so
  11. * they are handled in a separate file.
  12. */
  13. #ifndef __ARCH_ASM_MACH_OMAP2_CM3XXX_H
  14. #define __ARCH_ASM_MACH_OMAP2_CM3XXX_H
  15. #include "prcm-common.h"
  16. #include "cm2xxx_3xxx.h"
  17. #define OMAP34XX_CM_REGADDR(module, reg) \
  18. OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg))
  19. /*
  20. * OMAP3-specific global CM registers
  21. * Use cm_{read,write}_reg() with these registers.
  22. * These registers appear once per CM module.
  23. */
  24. #define OMAP3430_CM_SYSCONFIG 0x0010
  25. #define OMAP3430_CM_POLCTRL 0x009c
  26. #define OMAP3_CM_CLKOUT_CTRL_OFFSET 0x0070
  27. #define OMAP3430_CM_CLKOUT_CTRL OMAP_CM_REGADDR(OMAP3430_CCR_MOD, 0x0070)
  28. /*
  29. * Module specific CM register offsets from CM_BASE + domain offset
  30. * Use cm_{read,write}_mod_reg() with these registers.
  31. * These register offsets generally appear in more than one PRCM submodule.
  32. */
  33. /* OMAP3-specific register offsets */
  34. #define OMAP3430_CM_CLKEN_PLL 0x0004
  35. #define OMAP3430ES2_CM_CLKEN2 0x0004
  36. #define OMAP3430ES2_CM_FCLKEN3 0x0008
  37. #define OMAP3430_CM_IDLEST_PLL CM_IDLEST2
  38. #define OMAP3430_CM_AUTOIDLE_PLL CM_AUTOIDLE2
  39. #define OMAP3430ES2_CM_AUTOIDLE2_PLL CM_AUTOIDLE2
  40. #define OMAP3430_CM_CLKSEL1 CM_CLKSEL
  41. #define OMAP3430_CM_CLKSEL1_PLL CM_CLKSEL
  42. #define OMAP3430_CM_CLKSEL2_PLL CM_CLKSEL2
  43. #define OMAP3430_CM_SLEEPDEP CM_CLKSEL2
  44. #define OMAP3430_CM_CLKSEL3 OMAP2_CM_CLKSTCTRL
  45. #define OMAP3430_CM_CLKSTST 0x004c
  46. #define OMAP3430ES2_CM_CLKSEL4 0x004c
  47. #define OMAP3430ES2_CM_CLKSEL5 0x0050
  48. #define OMAP3430_CM_CLKSEL2_EMU 0x0050
  49. #define OMAP3430_CM_CLKSEL3_EMU 0x0054
  50. /* CM_IDLEST bit field values to indicate deasserted IdleReq */
  51. #define OMAP34XX_CM_IDLEST_VAL 1
  52. #ifndef __ASSEMBLER__
  53. extern void omap3_cm_save_context(void);
  54. extern void omap3_cm_restore_context(void);
  55. extern void omap3_cm_save_scratchpad_contents(u32 *ptr);
  56. int __init omap3xxx_cm_init(const struct omap_prcm_init_data *data);
  57. #endif
  58. #endif