cmd_immap.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. /*
  2. * (C) Copyright 2000
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. /*
  24. * PowerPC 8xx/8260 Internal Memory Map commands
  25. */
  26. #ifndef _CMD_IMMAP_H
  27. #define _CMD_IMMAP_H
  28. #if (CONFIG_COMMANDS & CFG_CMD_IMMAP) && \
  29. (defined(CONFIG_8xx) || defined(CONFIG_8260))
  30. #define CMD_TBL_SIUINFO MK_CMD_TBL_ENTRY( \
  31. "siuinfo", 3, 1, 1, do_siuinfo, \
  32. "siuinfo - print System Interface Unit (SIU) registers\n", \
  33. NULL \
  34. ),
  35. #define CMD_TBL_MEMCINFO MK_CMD_TBL_ENTRY( \
  36. "memcinfo", 4, 1, 1, do_memcinfo, \
  37. "memcinfo- print Memory Controller registers\n", \
  38. NULL \
  39. ),
  40. #define CMD_TBL_SITINFO MK_CMD_TBL_ENTRY( \
  41. "sitinfo", 3, 1, 1, do_sitinfo, \
  42. "sitinfo - print System Integration Timers (SIT) registers\n", \
  43. NULL \
  44. ),
  45. #ifdef CONFIG_8260
  46. #define CMD_TBL_ICINFO MK_CMD_TBL_ENTRY( \
  47. "icinfo", 3, 1, 1, do_icinfo, \
  48. "icinfo - print Interrupt Controller registers\n", \
  49. NULL \
  50. ),
  51. #endif
  52. #define CMD_TBL_CARINFO MK_CMD_TBL_ENTRY( \
  53. "carinfo", 3, 1, 1, do_carinfo, \
  54. "carinfo - print Clocks and Reset registers\n", \
  55. NULL \
  56. ),
  57. #define CMD_TBL_IOPINFO MK_CMD_TBL_ENTRY( \
  58. "iopinfo", 4, 1, 1, do_iopinfo, \
  59. "iopinfo - print I/O Port registers\n", \
  60. NULL \
  61. ),
  62. #define CMD_TBL_IOPSET MK_CMD_TBL_ENTRY( \
  63. "iopset", 4, 5, 0, do_iopset, \
  64. "iopset - set I/O Port registers\n", \
  65. "PORT PIN CMD VALUE\nPORT: A-D, PIN: 0-31, CMD: [dat|dir|odr|sor], VALUE: 0|1" \
  66. ),
  67. #define CMD_TBL_DMAINFO MK_CMD_TBL_ENTRY( \
  68. "dmainfo", 3, 1, 1, do_dmainfo, \
  69. "dmainfo - print SDMA/IDMA registers\n", \
  70. NULL \
  71. ),
  72. #define CMD_TBL_FCCINFO MK_CMD_TBL_ENTRY( \
  73. "fccinfo", 3, 1, 1, do_fccinfo, \
  74. "fccinfo - print FCC registers\n", \
  75. NULL \
  76. ),
  77. #define CMD_TBL_BRGINFO MK_CMD_TBL_ENTRY( \
  78. "brginfo", 3, 1, 1, do_brginfo, \
  79. "brginfo - print Baud Rate Generator (BRG) registers\n", \
  80. NULL \
  81. ),
  82. #define CMD_TBL_I2CINFO MK_CMD_TBL_ENTRY( \
  83. "i2cinfo", 4, 1, 1, do_i2cinfo, \
  84. "i2cinfo - print I2C registers\n", \
  85. NULL \
  86. ),
  87. #define CMD_TBL_SCCINFO MK_CMD_TBL_ENTRY( \
  88. "sccinfo", 3, 1, 1, do_sccinfo, \
  89. "sccinfo - print SCC registers\n", \
  90. NULL \
  91. ),
  92. #define CMD_TBL_SMCINFO MK_CMD_TBL_ENTRY( \
  93. "smcinfo", 3, 1, 1, do_smcinfo, \
  94. "smcinfo - print SMC registers\n", \
  95. NULL \
  96. ),
  97. #define CMD_TBL_SPIINFO MK_CMD_TBL_ENTRY( \
  98. "spiinfo", 3, 1, 1, do_spiinfo, \
  99. "spiinfo - print Serial Peripheral Interface (SPI) registers\n",\
  100. NULL \
  101. ),
  102. #define CMD_TBL_MUXINFO MK_CMD_TBL_ENTRY( \
  103. "muxinfo", 3, 1, 1, do_muxinfo, \
  104. "muxinfo - print CPM Multiplexing registers\n", \
  105. NULL \
  106. ),
  107. #define CMD_TBL_SIINFO MK_CMD_TBL_ENTRY( \
  108. "siinfo", 3, 1, 1, do_siinfo, \
  109. "siinfo - print Serial Interface (SI) registers\n", \
  110. NULL \
  111. ),
  112. #define CMD_TBL_MCCINFO MK_CMD_TBL_ENTRY( \
  113. "mccinfo", 3, 1, 1, do_mccinfo, \
  114. "mccinfo - print MCC registers\n", \
  115. NULL \
  116. ),
  117. int do_siuinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  118. int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  119. int do_sitinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  120. #ifdef CONFIG_8260
  121. int do_icinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  122. #endif
  123. int do_carinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  124. int do_iopinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  125. int do_iopset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  126. int do_dmainfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  127. int do_fccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  128. int do_brginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  129. int do_i2cinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  130. int do_sccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  131. int do_smcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  132. int do_spiinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  133. int do_muxinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  134. int do_siinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  135. int do_mccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  136. #else
  137. #define CMD_TBL_SIUINFO
  138. #define CMD_TBL_MEMCINFO
  139. #define CMD_TBL_SITINFO
  140. #ifdef CONFIG_8260
  141. #define CMD_TBL_ICINFO
  142. #endif
  143. #define CMD_TBL_CARINFO
  144. #define CMD_TBL_IOPINFO
  145. #define CMD_TBL_IOPSET
  146. #define CMD_TBL_DMAINFO
  147. #define CMD_TBL_FCCINFO
  148. #define CMD_TBL_BRGINFO
  149. #define CMD_TBL_I2CINFO
  150. #define CMD_TBL_SCCINFO
  151. #define CMD_TBL_SMCINFO
  152. #define CMD_TBL_SPIINFO
  153. #define CMD_TBL_MUXINFO
  154. #define CMD_TBL_SIINFO
  155. #define CMD_TBL_MCCINFO
  156. #endif /* CFG_CMD_IMMAP && (CONFIG_8xx || CONFIG_8260) */
  157. #endif /* _CMD_IMMAP_H */