ppc440spe.c 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /*
  2. * PPC440SPe I/O descriptions
  3. *
  4. * Roland Dreier <rolandd@cisco.com>
  5. * Copyright (c) 2005 Cisco Systems. All rights reserved.
  6. *
  7. * Matt Porter <mporter@kernel.crashing.org>
  8. * Copyright 2002-2005 MontaVista Software Inc.
  9. *
  10. * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
  11. * Copyright (c) 2003, 2004 Zultys Technologies
  12. *
  13. * This program is free software; you can redistribute it and/or modify it
  14. * under the terms of the GNU General Public License as published by the
  15. * Free Software Foundation; either version 2 of the License, or (at your
  16. * option) any later version.
  17. *
  18. */
  19. #include <linux/init.h>
  20. #include <linux/module.h>
  21. #include <platforms/4xx/ppc440spe.h>
  22. #include <asm/ocp.h>
  23. #include <asm/ppc4xx_pic.h>
  24. static struct ocp_func_emac_data ppc440spe_emac0_def = {
  25. .rgmii_idx = -1, /* No RGMII */
  26. .rgmii_mux = -1, /* No RGMII */
  27. .zmii_idx = -1, /* No ZMII */
  28. .zmii_mux = -1, /* No ZMII */
  29. .mal_idx = 0, /* MAL device index */
  30. .mal_rx_chan = 0, /* MAL rx channel number */
  31. .mal_tx_chan = 0, /* MAL tx channel number */
  32. .wol_irq = 61, /* WOL interrupt number */
  33. .mdio_idx = -1, /* No shared MDIO */
  34. .tah_idx = -1, /* No TAH */
  35. };
  36. OCP_SYSFS_EMAC_DATA()
  37. static struct ocp_func_mal_data ppc440spe_mal0_def = {
  38. .num_tx_chans = 1, /* Number of TX channels */
  39. .num_rx_chans = 1, /* Number of RX channels */
  40. .txeob_irq = 38, /* TX End Of Buffer IRQ */
  41. .rxeob_irq = 39, /* RX End Of Buffer IRQ */
  42. .txde_irq = 34, /* TX Descriptor Error IRQ */
  43. .rxde_irq = 35, /* RX Descriptor Error IRQ */
  44. .serr_irq = 33, /* MAL System Error IRQ */
  45. .dcr_base = DCRN_MAL_BASE /* MAL0_CFG DCR number */
  46. };
  47. OCP_SYSFS_MAL_DATA()
  48. static struct ocp_func_iic_data ppc440spe_iic0_def = {
  49. .fast_mode = 0, /* Use standad mode (100Khz) */
  50. };
  51. static struct ocp_func_iic_data ppc440spe_iic1_def = {
  52. .fast_mode = 0, /* Use standad mode (100Khz) */
  53. };
  54. OCP_SYSFS_IIC_DATA()
  55. struct ocp_def core_ocp[] = {
  56. { .vendor = OCP_VENDOR_IBM,
  57. .function = OCP_FUNC_16550,
  58. .index = 0,
  59. .paddr = PPC440SPE_UART0_ADDR,
  60. .irq = UART0_INT,
  61. .pm = IBM_CPM_UART0,
  62. },
  63. { .vendor = OCP_VENDOR_IBM,
  64. .function = OCP_FUNC_16550,
  65. .index = 1,
  66. .paddr = PPC440SPE_UART1_ADDR,
  67. .irq = UART1_INT,
  68. .pm = IBM_CPM_UART1,
  69. },
  70. { .vendor = OCP_VENDOR_IBM,
  71. .function = OCP_FUNC_16550,
  72. .index = 2,
  73. .paddr = PPC440SPE_UART2_ADDR,
  74. .irq = UART2_INT,
  75. .pm = IBM_CPM_UART2,
  76. },
  77. { .vendor = OCP_VENDOR_IBM,
  78. .function = OCP_FUNC_IIC,
  79. .index = 0,
  80. .paddr = 0x00000004f0000400ULL,
  81. .irq = 2,
  82. .pm = IBM_CPM_IIC0,
  83. .additions = &ppc440spe_iic0_def,
  84. .show = &ocp_show_iic_data
  85. },
  86. { .vendor = OCP_VENDOR_IBM,
  87. .function = OCP_FUNC_IIC,
  88. .index = 1,
  89. .paddr = 0x00000004f0000500ULL,
  90. .irq = 3,
  91. .pm = IBM_CPM_IIC1,
  92. .additions = &ppc440spe_iic1_def,
  93. .show = &ocp_show_iic_data
  94. },
  95. { .vendor = OCP_VENDOR_IBM,
  96. .function = OCP_FUNC_GPIO,
  97. .index = 0,
  98. .paddr = 0x00000004f0000700ULL,
  99. .irq = OCP_IRQ_NA,
  100. .pm = IBM_CPM_GPIO0,
  101. },
  102. { .vendor = OCP_VENDOR_IBM,
  103. .function = OCP_FUNC_MAL,
  104. .paddr = OCP_PADDR_NA,
  105. .irq = OCP_IRQ_NA,
  106. .pm = OCP_CPM_NA,
  107. .additions = &ppc440spe_mal0_def,
  108. .show = &ocp_show_mal_data,
  109. },
  110. { .vendor = OCP_VENDOR_IBM,
  111. .function = OCP_FUNC_EMAC,
  112. .index = 0,
  113. .paddr = 0x00000004f0000800ULL,
  114. .irq = 60,
  115. .pm = OCP_CPM_NA,
  116. .additions = &ppc440spe_emac0_def,
  117. .show = &ocp_show_emac_data,
  118. },
  119. { .vendor = OCP_VENDOR_INVALID
  120. }
  121. };
  122. /* Polarity and triggering settings for internal interrupt sources */
  123. struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = {
  124. { .polarity = 0xffffffff,
  125. .triggering = 0x010f0004,
  126. .ext_irq_mask = 0x00000000,
  127. },
  128. { .polarity = 0xffffffff,
  129. .triggering = 0x001f8040,
  130. .ext_irq_mask = 0x00007c30, /* IRQ6 - IRQ7, IRQ8 - IRQ12 */
  131. },
  132. { .polarity = 0xffffffff,
  133. .triggering = 0x00000000,
  134. .ext_irq_mask = 0x000000fc, /* IRQ0 - IRQ5 */
  135. },
  136. { .polarity = 0xffffffff,
  137. .triggering = 0x00000000,
  138. .ext_irq_mask = 0x00000000,
  139. },
  140. };