ibm440sp.c 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /*
  2. * arch/ppc/platforms/4xx/ibm440sp.c
  3. *
  4. * PPC440SP I/O descriptions
  5. *
  6. * Matt Porter <mporter@kernel.crashing.org>
  7. * Copyright 2002-2005 MontaVista Software Inc.
  8. *
  9. * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
  10. * Copyright (c) 2003, 2004 Zultys Technologies
  11. *
  12. * This program is free software; you can redistribute it and/or modify it
  13. * under the terms of the GNU General Public License as published by the
  14. * Free Software Foundation; either version 2 of the License, or (at your
  15. * option) any later version.
  16. *
  17. */
  18. #include <linux/init.h>
  19. #include <linux/module.h>
  20. #include <platforms/4xx/ibm440sp.h>
  21. #include <asm/ocp.h>
  22. static struct ocp_func_emac_data ibm440sp_emac0_def = {
  23. .rgmii_idx = -1, /* No RGMII */
  24. .rgmii_mux = -1, /* No RGMII */
  25. .zmii_idx = -1, /* No ZMII */
  26. .zmii_mux = -1, /* No ZMII */
  27. .mal_idx = 0, /* MAL device index */
  28. .mal_rx_chan = 0, /* MAL rx channel number */
  29. .mal_tx_chan = 0, /* MAL tx channel number */
  30. .wol_irq = 61, /* WOL interrupt number */
  31. .mdio_idx = -1, /* No shared MDIO */
  32. .tah_idx = -1, /* No TAH */
  33. .jumbo = 1, /* Jumbo frames supported */
  34. };
  35. OCP_SYSFS_EMAC_DATA()
  36. static struct ocp_func_mal_data ibm440sp_mal0_def = {
  37. .num_tx_chans = 4, /* Number of TX channels */
  38. .num_rx_chans = 4, /* Number of RX channels */
  39. .txeob_irq = 38, /* TX End Of Buffer IRQ */
  40. .rxeob_irq = 39, /* RX End Of Buffer IRQ */
  41. .txde_irq = 34, /* TX Descriptor Error IRQ */
  42. .rxde_irq = 35, /* RX Descriptor Error IRQ */
  43. .serr_irq = 33, /* MAL System Error IRQ */
  44. };
  45. OCP_SYSFS_MAL_DATA()
  46. static struct ocp_func_iic_data ibm440sp_iic0_def = {
  47. .fast_mode = 0, /* Use standad mode (100Khz) */
  48. };
  49. static struct ocp_func_iic_data ibm440sp_iic1_def = {
  50. .fast_mode = 0, /* Use standad mode (100Khz) */
  51. };
  52. OCP_SYSFS_IIC_DATA()
  53. struct ocp_def core_ocp[] = {
  54. { .vendor = OCP_VENDOR_IBM,
  55. .function = OCP_FUNC_OPB,
  56. .index = 0,
  57. .paddr = 0x0000000140000000ULL,
  58. .irq = OCP_IRQ_NA,
  59. .pm = OCP_CPM_NA,
  60. },
  61. { .vendor = OCP_VENDOR_IBM,
  62. .function = OCP_FUNC_16550,
  63. .index = 0,
  64. .paddr = PPC440SP_UART0_ADDR,
  65. .irq = UART0_INT,
  66. .pm = IBM_CPM_UART0,
  67. },
  68. { .vendor = OCP_VENDOR_IBM,
  69. .function = OCP_FUNC_16550,
  70. .index = 1,
  71. .paddr = PPC440SP_UART1_ADDR,
  72. .irq = UART1_INT,
  73. .pm = IBM_CPM_UART1,
  74. },
  75. { .vendor = OCP_VENDOR_IBM,
  76. .function = OCP_FUNC_16550,
  77. .index = 2,
  78. .paddr = PPC440SP_UART2_ADDR,
  79. .irq = UART2_INT,
  80. .pm = IBM_CPM_UART2,
  81. },
  82. { .vendor = OCP_VENDOR_IBM,
  83. .function = OCP_FUNC_IIC,
  84. .index = 0,
  85. .paddr = 0x00000001f0000400ULL,
  86. .irq = 2,
  87. .pm = IBM_CPM_IIC0,
  88. .additions = &ibm440sp_iic0_def,
  89. .show = &ocp_show_iic_data
  90. },
  91. { .vendor = OCP_VENDOR_IBM,
  92. .function = OCP_FUNC_IIC,
  93. .index = 1,
  94. .paddr = 0x00000001f0000500ULL,
  95. .irq = 3,
  96. .pm = IBM_CPM_IIC1,
  97. .additions = &ibm440sp_iic1_def,
  98. .show = &ocp_show_iic_data
  99. },
  100. { .vendor = OCP_VENDOR_IBM,
  101. .function = OCP_FUNC_GPIO,
  102. .index = 0,
  103. .paddr = 0x00000001f0000700ULL,
  104. .irq = OCP_IRQ_NA,
  105. .pm = IBM_CPM_GPIO0,
  106. },
  107. { .vendor = OCP_VENDOR_IBM,
  108. .function = OCP_FUNC_MAL,
  109. .paddr = OCP_PADDR_NA,
  110. .irq = OCP_IRQ_NA,
  111. .pm = OCP_CPM_NA,
  112. .additions = &ibm440sp_mal0_def,
  113. .show = &ocp_show_mal_data,
  114. },
  115. { .vendor = OCP_VENDOR_IBM,
  116. .function = OCP_FUNC_EMAC,
  117. .index = 0,
  118. .paddr = 0x00000001f0000800ULL,
  119. .irq = 60,
  120. .pm = OCP_CPM_NA,
  121. .additions = &ibm440sp_emac0_def,
  122. .show = &ocp_show_emac_data,
  123. },
  124. { .vendor = OCP_VENDOR_INVALID
  125. }
  126. };