synchronousMemoryDatabase.c 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * sh73a0 processor support - PFC hardware block
  3. *
  4. * Copyright (C) 2010 Renesas Solutions Corp.
  5. * Copyright (C) 2010 NISHIMOTO Hiroki
  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/sh73a0.h>
  25. #include <mach/irqs.h>
  26. #define CPU_ALL_PORT(fn, pfx, sfx) \
  27. PORT_10(fn, pfx, sfx), PORT_10(fn, pfx##1, sfx), \
  28. PORT_10(fn, pfx##2, sfx), PORT_10(fn, pfx##3, sfx), \
  29. PORT_10(fn, pfx##4, sfx), PORT_10(fn, pfx##5, sfx), \
  30. PORT_10(fn, pfx##6, sfx), PORT_10(fn, pfx##7, sfx), \
  31. PORT_10(fn, pfx##8, sfx), PORT_10(fn, pfx##9, sfx), \
  32. PORT_10(fn, pfx##10, sfx), \
  33. PORT_1(fn, pfx##110, sfx), PORT_1(fn, pfx##111, sfx), \
  34. PORT_1(fn, pfx##112, sfx), PORT_1(fn, pfx##113, sfx), \
  35. PORT_1(fn, pfx##114, sfx), PORT_1(fn, pfx##115, sfx), \
  36. PORT_1(fn, pfx##116, sfx), PORT_1(fn, pfx##117, sfx), \
  37. PORT_1(fn, pfx##118, sfx), \
  38. PORT_1(fn, pfx##128, sfx), PORT_1(fn, pfx##129, sfx), \
  39. PORT_10(fn, pfx##13, sfx), PORT_10(fn, pfx##14, sfx), \
  40. PORT_10(fn, pfx##15, sfx), \
  41. PORT_1(fn, pfx##160, sfx), PORT_1(fn, pfx##161, sfx), \
  42. PORT_1(fn, pfx##162, sfx), PORT_1(fn, pfx##163, sfx), \
  43. PORT_1(fn, pfx##164, sfx), \
  44. PORT_1(fn, pfx##192, sfx), PORT_1(fn, pfx##193, sfx), \
  45. PORT_1(fn, pfx##194, sfx), PORT_1(fn, pfx##195, sfx), \
  46. PORT_1(fn, pfx##196, sfx), PORT_1(fn, pfx##197, sfx), \
  47. PORT_1(fn, pfx##198, sfx), PORT_1(fn, pfx##199, sfx), \
  48. PORT_10(fn, pfx##20, sfx), PORT_10(fn, pfx##21, sfx), \
  49. PORT_10(fn, pfx##22, sfx), PORT_10(fn, pfx##23, sfx), \
  50. PORT_10(fn, pfx##24, sfx), PORT_10(fn, pfx##25, sfx), \
  51. PORT_10(fn, pfx##26, sfx), PORT_10(fn, pfx##27, sfx), \
  52. PORT_1(fn, pfx##280, sfx), PORT_1(fn, pfx##281, sfx), \
  53. PORT_1(fn, pfx##282, sfx), \
  54. PORT_1(fn, pfx##288, sfx), PORT_1(fn, pfx##289, sfx), \
  55. PORT_10(fn, pfx##29, sfx), PORT_10(fn, pfx##30, sfx)
  56. enum {
  57. PINMUX_RESERVED = 0,
  58. PINMUX_DATA_BEGIN,
  59. PORT_ALL(DATA), /* PORT0_DATA -> PORT309_DATA */
  60. PINMUX_DATA_END,
  61. PINMUX_INPUT_BEGIN,
  62. PORT_ALL(IN), /* PORT0_IN -> PORT309_IN */
  63. PINMUX_INPUT_END,
  64. PINMUX_INPUT_PULLUP_BEGIN,
  65. PORT_ALL(IN_PU), /* PORT0_IN_PU -> PORT309_IN_PU */
  66. PINMUX_INPUT_PULLUP_END,
  67. PINMUX_INPUT_PULLDOWN_BEGIN,
  68. PORT_ALL(IN_PD), /* PORT0_IN_PD -> PORT309_IN_PD */
  69. PINMUX_INPUT_PULLDOWN_END,
  70. PINMUX_OUTPUT_BEGIN,
  71. PORT_ALL(OUT), /* PORT0_OUT -> PORT309_OUT */
  72. PINMUX_OUTPUT_END,
  73. PINMUX_FUNCTION_BEGIN,
  74. PORT_ALL(FN_IN), /* PORT0_FN_IN -> PORT309_FN_IN */
  75. PORT_ALL(FN_OUT), /* PORT0_FN_OUT -> PORT309_FN_OUT */
  76. PORT_ALL(FN0), /* PORT0_FN0 -> PORT309_FN0 */
  77. PORT_ALL(FN1), /* PORT0_FN1 -> PORT309_FN1 */
  78. PORT_ALL(FN2), /* PORT0_FN2 -> PORT309_FN2 */
  79. PORT_ALL(FN3), /* PORT0_FN3 -> PORT309_FN3 */
  80. PORT_ALL(FN4), /* PORT0_FN4 -> PORT309_FN4 */
  81. PORT_ALL(FN5), /* PORT0_FN5 -> PORT309_FN5 */
  82. PORT_ALL(FN6), /* PORT0_FN6 -> PORT309_FN6 */