prm2xxx.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /*
  2. * OMAP2xxx Power/Reset Management (PRM) register definitions
  3. *
  4. * Copyright (C) 2007-2009, 2011-2012 Texas Instruments, Inc.
  5. * Copyright (C) 2008-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 PRM hardware modules on the OMAP2/3 are quite similar to each
  13. * other. The PRM on OMAP4 has a new register layout, and is handled
  14. * in a separate file.
  15. */
  16. #ifndef __ARCH_ARM_MACH_OMAP2_PRM2XXX_H
  17. #define __ARCH_ARM_MACH_OMAP2_PRM2XXX_H
  18. #include "prcm-common.h"
  19. #include "prm.h"
  20. #include "prm2xxx_3xxx.h"
  21. #define OMAP2420_PRM_REGADDR(module, reg) \
  22. OMAP2_L4_IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg))
  23. #define OMAP2430_PRM_REGADDR(module, reg) \
  24. OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg))
  25. /*
  26. * OMAP2-specific global PRM registers
  27. * Use {read,write}l_relaxed() with these registers.
  28. *
  29. * With a few exceptions, these are the register names beginning with
  30. * PRCM_* on 24xx. (The exceptions are the IRQSTATUS and IRQENABLE
  31. * bits.)
  32. *
  33. */
  34. #define OMAP2_PRCM_REVISION_OFFSET 0x0000
  35. #define OMAP2420_PRCM_REVISION OMAP2420_PRM_REGADDR(OCP_MOD, 0x0000)
  36. #define OMAP2_PRCM_SYSCONFIG_OFFSET 0x0010
  37. #define OMAP2420_PRCM_SYSCONFIG OMAP2420_PRM_REGADDR(OCP_MOD, 0x0010)
  38. #define OMAP2_PRCM_IRQSTATUS_MPU_OFFSET 0x0018
  39. #define OMAP2420_PRCM_IRQSTATUS_MPU OMAP2420_PRM_REGADDR(OCP_MOD, 0x0018)
  40. #define OMAP2_PRCM_IRQENABLE_MPU_OFFSET 0x001c
  41. #define OMAP2420_PRCM_IRQENABLE_MPU OMAP2420_PRM_REGADDR(OCP_MOD, 0x001c)
  42. #define OMAP2_PRCM_VOLTCTRL_OFFSET 0x0050
  43. #define OMAP2420_PRCM_VOLTCTRL OMAP2420_PRM_REGADDR(OCP_MOD, 0x0050)
  44. #define OMAP2_PRCM_VOLTST_OFFSET 0x0054
  45. #define OMAP2420_PRCM_VOLTST OMAP2420_PRM_REGADDR(OCP_MOD, 0x0054)
  46. #define OMAP2_PRCM_CLKSRC_CTRL_OFFSET 0x0060
  47. #define OMAP2420_PRCM_CLKSRC_CTRL OMAP2420_PRM_REGADDR(OCP_MOD, 0x0060)
  48. #define OMAP2_PRCM_CLKOUT_CTRL_OFFSET 0x0070
  49. #define OMAP2420_PRCM_CLKOUT_CTRL OMAP2420_PRM_REGADDR(OCP_MOD, 0x0070)
  50. #define OMAP2_PRCM_CLKEMUL_CTRL_OFFSET 0x0078
  51. #define OMAP2420_PRCM_CLKEMUL_CTRL OMAP2420_PRM_REGADDR(OCP_MOD, 0x0078)
  52. #define OMAP2_PRCM_CLKCFG_CTRL_OFFSET 0x0080
  53. #define OMAP2420_PRCM_CLKCFG_CTRL OMAP2420_PRM_REGADDR(OCP_MOD, 0x0080)
  54. #define OMAP2_PRCM_CLKCFG_STATUS_OFFSET 0x0084
  55. #define OMAP2420_PRCM_CLKCFG_STATUS OMAP2420_PRM_REGADDR(OCP_MOD, 0x0084)
  56. #define OMAP2_PRCM_VOLTSETUP_OFFSET 0x0090
  57. #define OMAP2420_PRCM_VOLTSETUP OMAP2420_PRM_REGADDR(OCP_MOD, 0x0090)
  58. #define OMAP2_PRCM_CLKSSETUP_OFFSET 0x0094
  59. #define OMAP2420_PRCM_CLKSSETUP OMAP2420_PRM_REGADDR(OCP_MOD, 0x0094)
  60. #define OMAP2_PRCM_POLCTRL_OFFSET 0x0098
  61. #define OMAP2420_PRCM_POLCTRL OMAP2420_PRM_REGADDR(OCP_MOD, 0x0098)
  62. #define OMAP2430_PRCM_REVISION OMAP2430_PRM_REGADDR(OCP_MOD, 0x0000)
  63. #define OMAP2430_PRCM_SYSCONFIG OMAP2430_PRM_REGADDR(OCP_MOD, 0x0010)
  64. #define OMAP2430_PRCM_IRQSTATUS_MPU OMAP2430_PRM_REGADDR(OCP_MOD, 0x0018)
  65. #define OMAP2430_PRCM_IRQENABLE_MPU OMAP2430_PRM_REGADDR(OCP_MOD, 0x001c)
  66. #define OMAP2430_PRCM_VOLTCTRL OMAP2430_PRM_REGADDR(OCP_MOD, 0x0050)
  67. #define OMAP2430_PRCM_VOLTST OMAP2430_PRM_REGADDR(OCP_MOD, 0x0054)
  68. #define OMAP2430_PRCM_CLKSRC_CTRL OMAP2430_PRM_REGADDR(OCP_MOD, 0x0060)
  69. #define OMAP2430_PRCM_CLKOUT_CTRL OMAP2430_PRM_REGADDR(OCP_MOD, 0x0070)
  70. #define OMAP2430_PRCM_CLKEMUL_CTRL OMAP2430_PRM_REGADDR(OCP_MOD, 0x0078)
  71. #define OMAP2430_PRCM_CLKCFG_CTRL OMAP2430_PRM_REGADDR(OCP_MOD, 0x0080)
  72. #define OMAP2430_PRCM_CLKCFG_STATUS OMAP2430_PRM_REGADDR(OCP_MOD, 0x0084)
  73. #define OMAP2430_PRCM_VOLTSETUP OMAP2430_PRM_REGADDR(OCP_MOD, 0x0090)
  74. #define OMAP2430_PRCM_CLKSSETUP OMAP2430_PRM_REGADDR(OCP_MOD, 0x0094)
  75. #define OMAP2430_PRCM_POLCTRL OMAP2430_PRM_REGADDR(OCP_MOD, 0x0098)
  76. /*
  77. * Module specific PRM register offsets from PRM_BASE + domain offset
  78. *
  79. * Use prm_{read,write}_mod_reg() with these registers.
  80. *
  81. * With a few exceptions, these are the register names beginning with
  82. * {PM,RM}_* on both OMAP2/3 SoC families.. (The exceptions are the
  83. * IRQSTATUS and IRQENABLE bits.)
  84. */
  85. /* Register offsets appearing on both OMAP2 and OMAP3 */
  86. #define OMAP2_RM_RSTCTRL 0x0050
  87. #define OMAP2_RM_RSTTIME 0x0054
  88. #define OMAP2_RM_RSTST 0x0058
  89. #define OMAP2_PM_PWSTCTRL 0x00e0
  90. #define OMAP2_PM_PWSTST 0x00e4
  91. #define PM_WKEN 0x00a0
  92. #define PM_WKEN1 PM_WKEN
  93. #define PM_WKST 0x00b0
  94. #define PM_WKST1 PM_WKST
  95. #define PM_WKDEP 0x00c8
  96. #define PM_EVGENCTRL 0x00d4
  97. #define PM_EVGENONTIM 0x00d8
  98. #define PM_EVGENOFFTIM 0x00dc
  99. /* OMAP2xxx specific register offsets */
  100. #define OMAP24XX_PM_WKEN2 0x00a4
  101. #define OMAP24XX_PM_WKST2 0x00b4
  102. #define OMAP24XX_PRCM_IRQSTATUS_DSP 0x00f0 /* IVA mod */
  103. #define OMAP24XX_PRCM_IRQENABLE_DSP 0x00f4 /* IVA mod */
  104. #define OMAP24XX_PRCM_IRQSTATUS_IVA 0x00f8
  105. #define OMAP24XX_PRCM_IRQENABLE_IVA 0x00fc
  106. #ifndef __ASSEMBLER__
  107. /* Function prototypes */
  108. extern int omap2xxx_clkdm_sleep(struct clockdomain *clkdm);
  109. extern int omap2xxx_clkdm_wakeup(struct clockdomain *clkdm);
  110. int __init omap2xxx_prm_init(const struct omap_prcm_init_data *data);
  111. #endif
  112. #endif