clockdomains2xxx_3xxx_data.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * OMAP2/3 clockdomain common data
  3. *
  4. * Copyright (C) 2008-2011 Texas Instruments, Inc.
  5. * Copyright (C) 2008-2010 Nokia Corporation
  6. *
  7. * Paul Walmsley, Jouni Högander
  8. *
  9. * This file contains clockdomains and clockdomain wakeup/sleep
  10. * dependencies for the OMAP2/3 chips. Some notes:
  11. *
  12. * A useful validation rule for struct clockdomain: Any clockdomain
  13. * referenced by a wkdep_srcs or sleepdep_srcs array must have a
  14. * dep_bit assigned. So wkdep_srcs/sleepdep_srcs are really just
  15. * software-controllable dependencies. Non-software-controllable
  16. * dependencies do exist, but they are not encoded below (yet).
  17. *
  18. * 24xx does not support programmable sleep dependencies (SLEEPDEP)
  19. *
  20. * The overly-specific dep_bit names are due to a bit name collision
  21. * with CM_FCLKEN_{DSP,IVA2}. The DSP/IVA2 PM_WKDEP and CM_SLEEPDEP shift
  22. * value are the same for all powerdomains: 2
  23. *
  24. * XXX should dep_bit be a mask, so we can test to see if it is 0 as a
  25. * sanity check?
  26. * XXX encode hardware fixed wakeup dependencies -- esp. for 3430 CORE
  27. */
  28. /*
  29. * To-Do List
  30. * -> Port the Sleep/Wakeup dependencies for the domains
  31. * from the Power domain framework
  32. */
  33. #include <linux/kernel.h>
  34. #include <linux/io.h>
  35. #include "clockdomain.h"
  36. #include "prm2xxx_3xxx.h"
  37. #include "cm2xxx_3xxx.h"
  38. #include "cm-regbits-24xx.h"
  39. #include "cm-regbits-34xx.h"
  40. #include "cm-regbits-44xx.h"
  41. #include "prm-regbits-24xx.h"
  42. #include "prm-regbits-34xx.h"
  43. /*
  44. * Clockdomain dependencies for wkdeps/sleepdeps
  45. *
  46. * XXX Hardware dependencies (e.g., dependencies that cannot be
  47. * changed in software) are not included here yet, but should be.
  48. */
  49. /* Wakeup dependency source arrays */
  50. /* 2xxx-specific possible dependencies */
  51. /* 2xxx PM_WKDEP_GFX: CORE, MPU, WKUP */
  52. struct clkdm_dep gfx_24xx_wkdeps[] = {
  53. { .clkdm_name = "core_l3_clkdm" },
  54. { .clkdm_name = "core_l4_clkdm" },
  55. { .clkdm_name = "mpu_clkdm" },
  56. { .clkdm_name = "wkup_clkdm" },
  57. { NULL },
  58. };
  59. /* 2xxx PM_WKDEP_DSP: CORE, MPU, WKUP */
  60. struct clkdm_dep dsp_24xx_wkdeps[] = {
  61. { .clkdm_name = "core_l3_clkdm" },
  62. { .clkdm_name = "core_l4_clkdm" },
  63. { .clkdm_name = "mpu_clkdm" },
  64. { .clkdm_name = "wkup_clkdm" },
  65. { NULL },
  66. };
  67. /*
  68. * OMAP2/3-common clockdomains
  69. *
  70. * Even though the 2420 has a single PRCM module from the
  71. * interconnect's perspective, internally it does appear to have
  72. * separate PRM and CM clockdomains. The usual test case is
  73. * sys_clkout/sys_clkout2.
  74. */
  75. /* This is an implicit clockdomain - it is never defined as such in TRM */
  76. struct clockdomain wkup_common_clkdm = {
  77. .name = "wkup_clkdm",
  78. .pwrdm = { .name = "wkup_pwrdm" },
  79. .dep_bit = OMAP_EN_WKUP_SHIFT,
  80. .flags = CLKDM_ACTIVE_WITH_MPU,
  81. };