spear310.c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. /*
  2. * arch/arm/mach-spear3xx/spear310.c
  3. *
  4. * SPEAr310 machine source file
  5. *
  6. * Copyright (C) 2009 ST Microelectronics
  7. * Viresh Kumar<viresh.kumar@st.com>
  8. *
  9. * This file is licensed under the terms of the GNU General Public
  10. * License version 2. This program is licensed "as is" without any
  11. * warranty of any kind, whether express or implied.
  12. */
  13. #include <linux/ptrace.h>
  14. #include <asm/irq.h>
  15. #include <mach/generic.h>
  16. #include <mach/spear.h>
  17. /* pad multiplexing support */
  18. /* muxing registers */
  19. #define PAD_MUX_CONFIG_REG 0x08
  20. /* devices */
  21. struct pmx_dev_mode pmx_emi_cs_0_1_4_5_modes[] = {
  22. {
  23. .ids = 0x00,
  24. .mask = PMX_TIMER_3_4_MASK,
  25. },
  26. };
  27. struct pmx_dev pmx_emi_cs_0_1_4_5 = {
  28. .name = "emi_cs_0_1_4_5",
  29. .modes = pmx_emi_cs_0_1_4_5_modes,
  30. .mode_count = ARRAY_SIZE(pmx_emi_cs_0_1_4_5_modes),
  31. .enb_on_reset = 1,
  32. };
  33. struct pmx_dev_mode pmx_emi_cs_2_3_modes[] = {
  34. {
  35. .ids = 0x00,
  36. .mask = PMX_TIMER_1_2_MASK,
  37. },
  38. };
  39. struct pmx_dev pmx_emi_cs_2_3 = {
  40. .name = "emi_cs_2_3",
  41. .modes = pmx_emi_cs_2_3_modes,
  42. .mode_count = ARRAY_SIZE(pmx_emi_cs_2_3_modes),
  43. .enb_on_reset = 1,
  44. };
  45. struct pmx_dev_mode pmx_uart1_modes[] = {
  46. {
  47. .ids = 0x00,
  48. .mask = PMX_FIRDA_MASK,
  49. },
  50. };
  51. struct pmx_dev pmx_uart1 = {
  52. .name = "uart1",
  53. .modes = pmx_uart1_modes,
  54. .mode_count = ARRAY_SIZE(pmx_uart1_modes),
  55. .enb_on_reset = 1,
  56. };
  57. struct pmx_dev_mode pmx_uart2_modes[] = {
  58. {
  59. .ids = 0x00,
  60. .mask = PMX_TIMER_1_2_MASK,
  61. },
  62. };
  63. struct pmx_dev pmx_uart2 = {
  64. .name = "uart2",
  65. .modes = pmx_uart2_modes,
  66. .mode_count = ARRAY_SIZE(pmx_uart2_modes),
  67. .enb_on_reset = 1,
  68. };
  69. struct pmx_dev_mode pmx_uart3_4_5_modes[] = {
  70. {
  71. .ids = 0x00,
  72. .mask = PMX_UART0_MODEM_MASK,
  73. },
  74. };
  75. struct pmx_dev pmx_uart3_4_5 = {
  76. .name = "uart3_4_5",
  77. .modes = pmx_uart3_4_5_modes,
  78. .mode_count = ARRAY_SIZE(pmx_uart3_4_5_modes),
  79. .enb_on_reset = 1,
  80. };
  81. struct pmx_dev_mode pmx_fsmc_modes[] = {
  82. {
  83. .ids = 0x00,
  84. .mask = PMX_SSP_CS_MASK,
  85. },
  86. };
  87. struct pmx_dev pmx_fsmc = {
  88. .name = "fsmc",
  89. .modes = pmx_fsmc_modes,
  90. .mode_count = ARRAY_SIZE(pmx_fsmc_modes),
  91. .enb_on_reset = 1,
  92. };
  93. struct pmx_dev_mode pmx_rs485_0_1_modes[] = {
  94. {
  95. .ids = 0x00,
  96. .mask = PMX_MII_MASK,
  97. },
  98. };
  99. struct pmx_dev pmx_rs485_0_1 = {
  100. .name = "rs485_0_1",
  101. .modes = pmx_rs485_0_1_modes,
  102. .mode_count = ARRAY_SIZE(pmx_rs485_0_1_modes),
  103. .enb_on_reset = 1,
  104. };
  105. struct pmx_dev_mode pmx_tdm0_modes[] = {
  106. {
  107. .ids = 0x00,
  108. .mask = PMX_MII_MASK,
  109. },
  110. };
  111. struct pmx_dev pmx_tdm0 = {
  112. .name = "tdm0",
  113. .modes = pmx_tdm0_modes,
  114. .mode_count = ARRAY_SIZE(pmx_tdm0_modes),
  115. .enb_on_reset = 1,
  116. };
  117. /* pmx driver structure */
  118. struct pmx_driver pmx_driver = {
  119. .mux_reg = {.offset = PAD_MUX_CONFIG_REG, .mask = 0x00007fff},
  120. };
  121. /* Add spear310 specific devices here */
  122. /* spear310 routines */
  123. void __init spear310_init(void)
  124. {
  125. /* call spear3xx family common init function */
  126. spear3xx_init();
  127. }
  128. void spear310_pmx_init(void)
  129. {
  130. spear_pmx_init(&pmx_driver, SPEAR310_SOC_CONFIG_BASE,
  131. SPEAR310_SOC_CONFIG_SIZE);
  132. }