realizationOfDataCalculation.c 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /*
  2. * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
  3. *
  4. * Copyright (C) 2009-2011 Nokia Corporation
  5. * Copyright (C) 2012 Texas Instruments, Inc.
  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. * XXX handle crossbar/shared link difference for L3?
  13. * XXX these should be marked initdata for multi-OMAP kernels
  14. */
  15. #include <linux/i2c-omap.h>
  16. #include <linux/platform_data/asoc-ti-mcbsp.h>
  17. #include <linux/platform_data/spi-omap2-mcspi.h>
  18. #include <linux/omap-dma.h>
  19. #include <plat/dmtimer.h>
  20. #include "omap_hwmod.h"
  21. #include "mmc.h"
  22. #include "l3_2xxx.h"
  23. #include "soc.h"
  24. #include "omap_hwmod_common_data.h"
  25. #include "prm-regbits-24xx.h"
  26. #include "cm-regbits-24xx.h"
  27. #include "i2c.h"
  28. #include "wd_timer.h"
  29. /*
  30. * OMAP2430 hardware module integration data
  31. *
  32. * All of the data in this section should be autogeneratable from the
  33. * TI hardware database or other technical documentation. Data that
  34. * is driver-specific or driver-kernel integration-specific belongs
  35. * elsewhere.
  36. */
  37. /*
  38. * IP blocks
  39. */
  40. /* IVA2 (IVA2) */
  41. static struct omap_hwmod_rst_info omap2430_iva_resets[] = {
  42. { .name = "logic", .rst_shift = 0 },
  43. { .name = "mmu", .rst_shift = 1 },
  44. };
  45. static struct omap_hwmod omap2430_iva_hwmod = {
  46. .name = "iva",
  47. .class = &iva_hwmod_class,
  48. .clkdm_name = "dsp_clkdm",
  49. .rst_lines = omap2430_iva_resets,
  50. .rst_lines_cnt = ARRAY_SIZE(omap2430_iva_resets),
  51. .main_clk = "dsp_fck",
  52. };
  53. /* I2C common */
  54. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  55. .rev_offs = 0x00,
  56. .sysc_offs = 0x20,
  57. .syss_offs = 0x10,
  58. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  59. SYSS_HAS_RESET_STATUS),
  60. .sysc_fields = &omap_hwmod_sysc_type1,
  61. };
  62. static struct omap_hwmod_class i2c_class = {
  63. .name = "i2c",
  64. .sysc = &i2c_sysc,
  65. .rev = OMAP_I2C_IP_VERSION_1,
  66. .reset = &omap_i2c_reset,
  67. };
  68. static struct omap_i2c_dev_attr i2c_dev_attr = {
  69. .fifo_depth = 8, /* bytes */
  70. .flags = OMAP_I2C_FLAG_BUS_SHIFT_2 |
  71. OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
  72. };
  73. /* I2C1 */
  74. static struct omap_hwmod omap2430_i2c1_hwmod = {
  75. .name = "i2c1",
  76. .flags = HWMOD_16BIT_REG,
  77. .mpu_irqs = omap2_i2c1_mpu_irqs,
  78. .sdma_reqs = omap2_i2c1_sdma_reqs,
  79. .main_clk = "i2chs1_fck",
  80. .prcm = {
  81. .omap2 = {
  82. /*
  83. * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
  84. * I2CHS IP's do not follow the usual pattern.
  85. * prcm_reg_id alone cannot be used to program
  86. * the iclk and fclk. Needs to be handled using
  87. * additional flags when clk handling is moved
  88. * to hwmod framework.
  89. */
  90. .module_offs = CORE_MOD,
  91. .prcm_reg_id = 1,
  92. .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
  93. .idlest_reg_id = 1,
  94. .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
  95. },
  96. },
  97. .class = &i2c_class,
  98. .dev_attr = &i2c_dev_attr,
  99. };
  100. /* I2C2 */
  101. static struct omap_hwmod omap2430_i2c2_hwmod = {
  102. .name = "i2c2",
  103. .flags = HWMOD_16BIT_REG,
  104. .mpu_irqs = omap2_i2c2_mpu_irqs,
  105. .sdma_reqs = omap2_i2c2_sdma_reqs,
  106. .main_clk = "i2chs2_fck",
  107. .prcm = {
  108. .omap2 = {
  109. .module_offs = CORE_MOD,
  110. .prcm_reg_id = 1,
  111. .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
  112. .idlest_reg_id = 1,
  113. .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
  114. },
  115. },
  116. .class = &i2c_class,
  117. .dev_attr = &i2c_dev_attr,
  118. };
  119. /* gpio5 */
  120. static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
  121. { .irq = 33 + OMAP_INTC_START, }, /* INT_24XX_GPIO_BANK5 */
  122. { .irq = -1 },
  123. };
  124. static struct omap_hwmod omap2430_gpio5_hwmod = {
  125. .name = "gpio5",
  126. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  127. .mpu_irqs = omap243x_gpio5_irqs,
  128. .main_clk = "gpio5_fck",
  129. .prcm = {
  130. .omap2 = {
  131. .prcm_reg_id = 2,
  132. .module_bit = OMAP2430_EN_GPIO5_SHIFT,
  133. .module_offs = CORE_MOD,
  134. .idlest_reg_id = 2,
  135. .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
  136. },
  137. },
  138. .class = &omap2xxx_gpio_hwmod_class,
  139. .dev_attr = &omap2xxx_gpio_dev_attr,
  140. };
  141. /* dma attributes */
  142. static struct omap_dma_dev_attr dma_dev_attr = {
  143. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |