synchronousMemoryDatabase.c 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * sh7372 processor support - PFC hardware block
  3. *
  4. * Copyright (C) 2010 Kuninori Morimoto <morimoto.kuninori@renesas.com>
  5. *
  6. * Based on
  7. * sh7367 processor support - PFC hardware block
  8. * Copyright (C) 2010 Magnus Damm
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; version 2 of the License.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  22. */
  23. #include <linux/init.h>
  24. #include <linux/kernel.h>
  25. #include <linux/sh_pfc.h>
  26. #include <mach/irqs.h>
  27. #include <mach/sh7372.h>
  28. #define CPU_ALL_PORT(fn, pfx, sfx) \
  29. PORT_10(fn, pfx, sfx), PORT_90(fn, pfx, sfx), \
  30. PORT_10(fn, pfx##10, sfx), PORT_10(fn, pfx##11, sfx), \
  31. PORT_10(fn, pfx##12, sfx), PORT_10(fn, pfx##13, sfx), \
  32. PORT_10(fn, pfx##14, sfx), PORT_10(fn, pfx##15, sfx), \
  33. PORT_10(fn, pfx##16, sfx), PORT_10(fn, pfx##17, sfx), \
  34. PORT_10(fn, pfx##18, sfx), PORT_1(fn, pfx##190, sfx)
  35. enum {
  36. PINMUX_RESERVED = 0,
  37. /* PORT0_DATA -> PORT190_DATA */
  38. PINMUX_DATA_BEGIN,
  39. PORT_ALL(DATA),
  40. PINMUX_DATA_END,
  41. /* PORT0_IN -> PORT190_IN */
  42. PINMUX_INPUT_BEGIN,
  43. PORT_ALL(IN),
  44. PINMUX_INPUT_END,
  45. /* PORT0_IN_PU -> PORT190_IN_PU */
  46. PINMUX_INPUT_PULLUP_BEGIN,
  47. PORT_ALL(IN_PU),
  48. PINMUX_INPUT_PULLUP_END,
  49. /* PORT0_IN_PD -> PORT190_IN_PD */
  50. PINMUX_INPUT_PULLDOWN_BEGIN,
  51. PORT_ALL(IN_PD),
  52. PINMUX_INPUT_PULLDOWN_END,
  53. /* PORT0_OUT -> PORT190_OUT */
  54. PINMUX_OUTPUT_BEGIN,
  55. PORT_ALL(OUT),
  56. PINMUX_OUTPUT_END,
  57. PINMUX_FUNCTION_BEGIN,
  58. PORT_ALL(FN_IN), /* PORT0_FN_IN -> PORT190_FN_IN */
  59. PORT_ALL(FN_OUT), /* PORT0_FN_OUT -> PORT190_FN_OUT */
  60. PORT_ALL(FN0), /* PORT0_FN0 -> PORT190_FN0 */
  61. PORT_ALL(FN1), /* PORT0_FN1 -> PORT190_FN1 */
  62. PORT_ALL(FN2), /* PORT0_FN2 -> PORT190_FN2 */
  63. PORT_ALL(FN3), /* PORT0_FN3 -> PORT190_FN3 */
  64. PORT_ALL(FN4), /* PORT0_FN4 -> PORT190_FN4 */
  65. PORT_ALL(FN5), /* PORT0_FN5 -> PORT190_FN5 */
  66. PORT_ALL(FN6), /* PORT0_FN6 -> PORT190_FN6 */
  67. PORT_ALL(FN7), /* PORT0_FN7 -> PORT190_FN7 */
  68. MSEL1CR_31_0, MSEL1CR_31_1,
  69. MSEL1CR_30_0, MSEL1CR_30_1,
  70. MSEL1CR_29_0, MSEL1CR_29_1,
  71. MSEL1CR_28_0, MSEL1CR_28_1,
  72. MSEL1CR_27_0, MSEL1CR_27_1,
  73. MSEL1CR_26_0, MSEL1CR_26_1,
  74. MSEL1CR_16_0, MSEL1CR_16_1,
  75. MSEL1CR_15_0, MSEL1CR_15_1,
  76. MSEL1CR_14_0, MSEL1CR_14_1,
  77. MSEL1CR_13_0, MSEL1CR_13_1,
  78. MSEL1CR_12_0, MSEL1CR_12_1,
  79. MSEL1CR_9_0, MSEL1CR_9_1,
  80. MSEL1CR_8_0, MSEL1CR_8_1,
  81. MSEL1CR_7_0, MSEL1CR_7_1,
  82. MSEL1CR_6_0, MSEL1CR_6_1,
  83. MSEL1CR_4_0, MSEL1CR_4_1,
  84. MSEL1CR_3_0, MSEL1CR_3_1,
  85. MSEL1CR_2_0, MSEL1CR_2_1,
  86. MSEL1CR_0_0, MSEL1CR_0_1,
  87. MSEL3CR_27_0, MSEL3CR_27_1,
  88. MSEL3CR_26_0, MSEL3CR_26_1,
  89. MSEL3CR_21_0, MSEL3CR_21_1,
  90. MSEL3CR_20_0, MSEL3CR_20_1,
  91. MSEL3CR_15_0, MSEL3CR_15_1,
  92. MSEL3CR_9_0, MSEL3CR_9_1,
  93. MSEL3CR_6_0, MSEL3CR_6_1,
  94. MSEL4CR_19_0, MSEL4CR_19_1,
  95. MSEL4CR_18_0, MSEL4CR_18_1,
  96. MSEL4CR_17_0, MSEL4CR_17_1,
  97. MSEL4CR_16_0, MSEL4CR_16_1,
  98. MSEL4CR_15_0, MSEL4CR_15_1,
  99. MSEL4CR_14_0, MSEL4CR_14_1,
  100. MSEL4CR_10_0, MSEL4CR_10_1,
  101. MSEL4CR_6_0, MSEL4CR_6_1,
  102. MSEL4CR_4_0, MSEL4CR_4_1,
  103. MSEL4CR_1_0, MSEL4CR_1_1,
  104. PINMUX_FUNCTION_END,
  105. PINMUX_MARK_BEGIN,
  106. /* IRQ */
  107. IRQ0_6_MARK, IRQ0_162_MARK, IRQ1_MARK, IRQ2_4_MARK,
  108. IRQ2_5_MARK, IRQ3_8_MARK, IRQ3_16_MARK, IRQ4_17_MARK,
  109. IRQ4_163_MARK, IRQ5_MARK, IRQ6_39_MARK, IRQ6_164_MARK,
  110. IRQ7_40_MARK, IRQ7_167_MARK, IRQ8_41_MARK, IRQ8_168_MARK,
  111. IRQ9_42_MARK, IRQ9_169_MARK, IRQ10_MARK, IRQ11_MARK,
  112. IRQ12_80_MARK, IRQ12_137_MARK, IRQ13_81_MARK, IRQ13_145_MARK,
  113. IRQ14_82_MARK, IRQ14_146_MARK, IRQ15_83_MARK, IRQ15_147_MARK,