omap_hwmod_2xxx_ipblock_data.c 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. /*
  2. * omap_hwmod_2xxx_ipblock_data.c - common IP block data for OMAP2xxx
  3. *
  4. * Copyright (C) 2011 Nokia Corporation
  5. * Paul Walmsley
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #include <plat/omap_hwmod.h>
  12. #include <plat/serial.h>
  13. #include <plat/dma.h>
  14. #include <plat/dmtimer.h>
  15. #include <plat/mcspi.h>
  16. #include <mach/irqs.h>
  17. #include "omap_hwmod_common_data.h"
  18. #include "wd_timer.h"
  19. struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = {
  20. { .irq = 48, },
  21. { .irq = -1 }
  22. };
  23. struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = {
  24. { .name = "dispc", .dma_req = 5 },
  25. { .dma_req = -1 }
  26. };
  27. /* OMAP2xxx Timer Common */
  28. static struct omap_hwmod_class_sysconfig omap2xxx_timer_sysc = {
  29. .rev_offs = 0x0000,
  30. .sysc_offs = 0x0010,
  31. .syss_offs = 0x0014,
  32. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  33. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  34. SYSC_HAS_AUTOIDLE),
  35. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  36. .sysc_fields = &omap_hwmod_sysc_type1,
  37. };
  38. struct omap_hwmod_class omap2xxx_timer_hwmod_class = {
  39. .name = "timer",
  40. .sysc = &omap2xxx_timer_sysc,
  41. .rev = OMAP_TIMER_IP_VERSION_1,
  42. };
  43. /*
  44. * 'wd_timer' class
  45. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  46. * overflow condition
  47. */
  48. static struct omap_hwmod_class_sysconfig omap2xxx_wd_timer_sysc = {
  49. .rev_offs = 0x0000,
  50. .sysc_offs = 0x0010,
  51. .syss_offs = 0x0014,
  52. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  53. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  54. .sysc_fields = &omap_hwmod_sysc_type1,
  55. };
  56. struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = {
  57. .name = "wd_timer",
  58. .sysc = &omap2xxx_wd_timer_sysc,
  59. .pre_shutdown = &omap2_wd_timer_disable
  60. };
  61. /*
  62. * 'gpio' class
  63. * general purpose io module
  64. */
  65. static struct omap_hwmod_class_sysconfig omap2xxx_gpio_sysc = {
  66. .rev_offs = 0x0000,
  67. .sysc_offs = 0x0010,
  68. .syss_offs = 0x0014,
  69. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  70. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  71. SYSS_HAS_RESET_STATUS),
  72. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  73. .sysc_fields = &omap_hwmod_sysc_type1,
  74. };
  75. struct omap_hwmod_class omap2xxx_gpio_hwmod_class = {
  76. .name = "gpio",
  77. .sysc = &omap2xxx_gpio_sysc,
  78. .rev = 0,
  79. };
  80. /* system dma */
  81. static struct omap_hwmod_class_sysconfig omap2xxx_dma_sysc = {
  82. .rev_offs = 0x0000,
  83. .sysc_offs = 0x002c,
  84. .syss_offs = 0x0028,
  85. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
  86. SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
  87. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  88. .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  89. .sysc_fields = &omap_hwmod_sysc_type1,
  90. };
  91. struct omap_hwmod_class omap2xxx_dma_hwmod_class = {
  92. .name = "dma",
  93. .sysc = &omap2xxx_dma_sysc,
  94. };
  95. /*
  96. * 'mailbox' class
  97. * mailbox module allowing communication between the on-chip processors
  98. * using a queued mailbox-interrupt mechanism.
  99. */
  100. static struct omap_hwmod_class_sysconfig omap2xxx_mailbox_sysc = {
  101. .rev_offs = 0x000,
  102. .sysc_offs = 0x010,
  103. .syss_offs = 0x014,
  104. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  105. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  106. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  107. .sysc_fields = &omap_hwmod_sysc_type1,
  108. };
  109. struct omap_hwmod_class omap2xxx_mailbox_hwmod_class = {
  110. .name = "mailbox",
  111. .sysc = &omap2xxx_mailbox_sysc,
  112. };
  113. /*
  114. * 'mcspi' class
  115. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  116. * bus
  117. */
  118. static struct omap_hwmod_class_sysconfig omap2xxx_mcspi_sysc = {
  119. .rev_offs = 0x0000,
  120. .sysc_offs = 0x0010,
  121. .syss_offs = 0x0014,
  122. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  123. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  124. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  125. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  126. .sysc_fields = &omap_hwmod_sysc_type1,
  127. };
  128. struct omap_hwmod_class omap2xxx_mcspi_class = {
  129. .name = "mcspi",
  130. .sysc = &omap2xxx_mcspi_sysc,
  131. .rev = OMAP2_MCSPI_REV,
  132. };