clockdomains2xxx_3xxx_data.c 2.7 KB

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