analysisSpray.c 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * R8A7740 processor support
  3. *
  4. * Copyright (C) 2011 Renesas Solutions Corp.
  5. * Copyright (C) 2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; version 2 of the
  10. * License.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #include <linux/init.h>
  22. #include <linux/kernel.h>
  23. #include <linux/sh_pfc.h>
  24. #include <mach/r8a7740.h>
  25. #include <mach/irqs.h>
  26. #define CPU_ALL_PORT(fn, pfx, sfx) \
  27. PORT_10(fn, pfx, sfx), PORT_90(fn, pfx, sfx), \
  28. PORT_10(fn, pfx##10, sfx), PORT_90(fn, pfx##1, sfx), \
  29. PORT_10(fn, pfx##20, sfx), \
  30. PORT_1(fn, pfx##210, sfx), PORT_1(fn, pfx##211, sfx)
  31. enum {
  32. PINMUX_RESERVED = 0,
  33. /* PORT0_DATA -> PORT211_DATA */
  34. PINMUX_DATA_BEGIN,
  35. PORT_ALL(DATA),
  36. PINMUX_DATA_END,
  37. /* PORT0_IN -> PORT211_IN */
  38. PINMUX_INPUT_BEGIN,
  39. PORT_ALL(IN),
  40. PINMUX_INPUT_END,
  41. /* PORT0_IN_PU -> PORT211_IN_PU */
  42. PINMUX_INPUT_PULLUP_BEGIN,
  43. PORT_ALL(IN_PU),
  44. PINMUX_INPUT_PULLUP_END,
  45. /* PORT0_IN_PD -> PORT211_IN_PD */
  46. PINMUX_INPUT_PULLDOWN_BEGIN,
  47. PORT_ALL(IN_PD),
  48. PINMUX_INPUT_PULLDOWN_END,
  49. /* PORT0_OUT -> PORT211_OUT */
  50. PINMUX_OUTPUT_BEGIN,
  51. PORT_ALL(OUT),
  52. PINMUX_OUTPUT_END,
  53. PINMUX_FUNCTION_BEGIN,
  54. PORT_ALL(FN_IN), /* PORT0_FN_IN -> PORT211_FN_IN */
  55. PORT_ALL(FN_OUT), /* PORT0_FN_OUT -> PORT211_FN_OUT */
  56. PORT_ALL(FN0), /* PORT0_FN0 -> PORT211_FN0 */
  57. PORT_ALL(FN1), /* PORT0_FN1 -> PORT211_FN1 */
  58. PORT_ALL(FN2), /* PORT0_FN2 -> PORT211_FN2 */
  59. PORT_ALL(FN3), /* PORT0_FN3 -> PORT211_FN3 */
  60. PORT_ALL(FN4), /* PORT0_FN4 -> PORT211_FN4 */
  61. PORT_ALL(FN5), /* PORT0_FN5 -> PORT211_FN5 */
  62. PORT_ALL(FN6), /* PORT0_FN6 -> PORT211_FN6 */
  63. PORT_ALL(FN7), /* PORT0_FN7 -> PORT211_FN7 */
  64. MSEL1CR_31_0, MSEL1CR_31_1,
  65. MSEL1CR_30_0, MSEL1CR_30_1,
  66. MSEL1CR_29_0, MSEL1CR_29_1,
  67. MSEL1CR_28_0, MSEL1CR_28_1,
  68. MSEL1CR_27_0, MSEL1CR_27_1,
  69. MSEL1CR_26_0, MSEL1CR_26_1,
  70. MSEL1CR_16_0, MSEL1CR_16_1,
  71. MSEL1CR_15_0, MSEL1CR_15_1,
  72. MSEL1CR_14_0, MSEL1CR_14_1,
  73. MSEL1CR_13_0, MSEL1CR_13_1,
  74. MSEL1CR_12_0, MSEL1CR_12_1,
  75. MSEL1CR_9_0, MSEL1CR_9_1,
  76. MSEL1CR_7_0, MSEL1CR_7_1,
  77. MSEL1CR_6_0, MSEL1CR_6_1,
  78. MSEL1CR_5_0, MSEL1CR_5_1,
  79. MSEL1CR_4_0, MSEL1CR_4_1,
  80. MSEL1CR_3_0, MSEL1CR_3_1,
  81. MSEL1CR_2_0, MSEL1CR_2_1,
  82. MSEL1CR_0_0, MSEL1CR_0_1,
  83. MSEL3CR_15_0, MSEL3CR_15_1, /* Trace / Debug ? */
  84. MSEL3CR_6_0, MSEL3CR_6_1,
  85. MSEL4CR_19_0, MSEL4CR_19_1,
  86. MSEL4CR_18_0, MSEL4CR_18_1,
  87. MSEL4CR_15_0, MSEL4CR_15_1,
  88. MSEL4CR_10_0, MSEL4CR_10_1,
  89. MSEL4CR_6_0, MSEL4CR_6_1,
  90. MSEL4CR_4_0, MSEL4CR_4_1,
  91. MSEL4CR_1_0, MSEL4CR_1_1,
  92. MSEL5CR_31_0, MSEL5CR_31_1, /* irq/fiq output */
  93. MSEL5CR_30_0, MSEL5CR_30_1,
  94. MSEL5CR_29_0, MSEL5CR_29_1,
  95. MSEL5CR_27_0, MSEL5CR_27_1,
  96. MSEL5CR_25_0, MSEL5CR_25_1,
  97. MSEL5CR_23_0, MSEL5CR_23_1,
  98. MSEL5CR_21_0, MSEL5CR_21_1,
  99. MSEL5CR_19_0, MSEL5CR_19_1,
  100. MSEL5CR_17_0, MSEL5CR_17_1,
  101. MSEL5CR_15_0, MSEL5CR_15_1,
  102. MSEL5CR_14_0, MSEL5CR_14_1,
  103. MSEL5CR_13_0, MSEL5CR_13_1,
  104. MSEL5CR_12_0, MSEL5CR_12_1,
  105. MSEL5CR_11_0, MSEL5CR_11_1,
  106. MSEL5CR_10_0, MSEL5CR_10_1,
  107. MSEL5CR_8_0, MSEL5CR_8_1,
  108. MSEL5CR_7_0, MSEL5CR_7_1,
  109. MSEL5CR_6_0, MSEL5CR_6_1,
  110. MSEL5CR_5_0, MSEL5CR_5_1,
  111. MSEL5CR_4_0, MSEL5CR_4_1,
  112. MSEL5CR_3_0, MSEL5CR_3_1,
  113. MSEL5CR_2_0, MSEL5CR_2_1,
  114. MSEL5CR_0_0, MSEL5CR_0_1,