ibmnp405h.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. /*
  2. * arch/ppc/platforms/4xx/ibmnp405h.h
  3. *
  4. * Author: Armin Kuster <akuster@mvista.com>
  5. *
  6. * 2002 (c) MontaVista, Software, Inc. This file is licensed under
  7. * the terms of the GNU General Public License version 2. This program
  8. * is licensed "as is" without any warranty of any kind, whether express
  9. * or implied.
  10. */
  11. #ifdef __KERNEL__
  12. #ifndef __ASM_IBMNP405H_H__
  13. #define __ASM_IBMNP405H_H__
  14. #include <linux/config.h>
  15. /* ibm405.h at bottom of this file */
  16. #define PPC405_PCI_CONFIG_ADDR 0xeec00000
  17. #define PPC405_PCI_CONFIG_DATA 0xeec00004
  18. #define PPC405_PCI_PHY_MEM_BASE 0x80000000 /* hose_a->pci_mem_offset */
  19. /* setbat */
  20. #define PPC405_PCI_MEM_BASE PPC405_PCI_PHY_MEM_BASE /* setbat */
  21. #define PPC405_PCI_PHY_IO_BASE 0xe8000000 /* setbat */
  22. #define PPC405_PCI_IO_BASE PPC405_PCI_PHY_IO_BASE /* setbat */
  23. #define PPC405_PCI_LOWER_MEM 0x00000000 /* hose_a->mem_space.start */
  24. #define PPC405_PCI_UPPER_MEM 0xBfffffff /* hose_a->mem_space.end */
  25. #define PPC405_PCI_LOWER_IO 0x00000000 /* hose_a->io_space.start */
  26. #define PPC405_PCI_UPPER_IO 0x0000ffff /* hose_a->io_space.end */
  27. #define PPC405_ISA_IO_BASE PPC405_PCI_IO_BASE
  28. #define PPC4xx_PCI_IO_ADDR ((uint)PPC405_PCI_PHY_IO_BASE)
  29. #define PPC4xx_PCI_IO_SIZE ((uint)64*1024)
  30. #define PPC4xx_PCI_CFG_ADDR ((uint)PPC405_PCI_CONFIG_ADDR)
  31. #define PPC4xx_PCI_CFG_SIZE ((uint)4*1024)
  32. #define PPC4xx_PCI_LCFG_ADDR ((uint)0xef400000)
  33. #define PPC4xx_PCI_LCFG_SIZE ((uint)4*1024)
  34. #define PPC4xx_ONB_IO_ADDR ((uint)0xef600000)
  35. #define PPC4xx_ONB_IO_SIZE ((uint)4*1024)
  36. /* serial port defines */
  37. #define RS_TABLE_SIZE 4
  38. #define UART0_INT 0
  39. #define UART1_INT 1
  40. #define PCIL0_BASE 0xEF400000
  41. #define UART0_IO_BASE 0xEF600300
  42. #define UART1_IO_BASE 0xEF600400
  43. #define OPB0_BASE 0xEF600600
  44. #define EMAC0_BASE 0xEF600800
  45. #define BD_EMAC_ADDR(e,i) bi_enetaddr[e][i]
  46. #define STD_UART_OP(num) \
  47. { 0, BASE_BAUD, 0, UART##num##_INT, \
  48. (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \
  49. iomem_base:(u8 *) UART##num##_IO_BASE, \
  50. io_type: SERIAL_IO_MEM},
  51. #if defined(CONFIG_UART0_TTYS0)
  52. #define SERIAL_DEBUG_IO_BASE UART0_IO_BASE
  53. #define SERIAL_PORT_DFNS \
  54. STD_UART_OP(0) \
  55. STD_UART_OP(1)
  56. #endif
  57. #if defined(CONFIG_UART0_TTYS1)
  58. #define SERIAL_DEBUG_IO_BASE UART0_IO_BASE
  59. #define SERIAL_PORT_DFNS \
  60. STD_UART_OP(1) \
  61. STD_UART_OP(0)
  62. #endif
  63. /* DCR defines */
  64. /* ------------------------------------------------------------------------- */
  65. #define DCRN_CHCR_BASE 0x0F1
  66. #define DCRN_CHPSR_BASE 0x0B4
  67. #define DCRN_CPMSR_BASE 0x0BA
  68. #define DCRN_CPMFR_BASE 0x0B9
  69. #define DCRN_CPMER_BASE 0x0B8
  70. /* CPM Clocking & Power Mangement defines */
  71. #define IBM_CPM_PCI 0x40000000 /* PCI */
  72. #define IBM_CPM_EMAC2 0x20000000 /* EMAC 2 MII */
  73. #define IBM_CPM_EMAC3 0x04000000 /* EMAC 3 MII */
  74. #define IBM_CPM_EMAC0 0x00800000 /* EMAC 0 MII */
  75. #define IBM_CPM_EMAC1 0x00100000 /* EMAC 1 MII */
  76. #define IBM_CPM_EMMII 0 /* Shift value for MII */
  77. #define IBM_CPM_EMRX 1 /* Shift value for recv */
  78. #define IBM_CPM_EMTX 2 /* Shift value for MAC */
  79. #define IBM_CPM_UIC1 0x00020000 /* Universal Interrupt Controller */
  80. #define IBM_CPM_UIC0 0x00010000 /* Universal Interrupt Controller */
  81. #define IBM_CPM_CPU 0x00008000 /* processor core */
  82. #define IBM_CPM_EBC 0x00004000 /* ROM/SRAM peripheral controller */
  83. #define IBM_CPM_SDRAM0 0x00002000 /* SDRAM memory controller */
  84. #define IBM_CPM_GPIO0 0x00001000 /* General Purpose IO (??) */
  85. #define IBM_CPM_HDLC 0x00000800 /* HDCL */
  86. #define IBM_CPM_TMRCLK 0x00000400 /* CPU timers */
  87. #define IBM_CPM_PLB 0x00000100 /* PLB bus arbiter */
  88. #define IBM_CPM_OPB 0x00000080 /* PLB to OPB bridge */
  89. #define IBM_CPM_DMA 0x00000040 /* DMA controller */
  90. #define IBM_CPM_IIC0 0x00000010 /* IIC interface */
  91. #define IBM_CPM_UART0 0x00000002 /* serial port 0 */
  92. #define IBM_CPM_UART1 0x00000001 /* serial port 1 */
  93. /* this is the default setting for devices put to sleep when booting */
  94. #define DFLT_IBM4xx_PM ~(IBM_CPM_UIC0 | IBM_CPM_UIC1 | IBM_CPM_CPU \
  95. | IBM_CPM_EBC | IBM_CPM_SDRAM0 | IBM_CPM_PLB \
  96. | IBM_CPM_OPB | IBM_CPM_TMRCLK | IBM_CPM_DMA \
  97. | IBM_CPM_EMAC0 | IBM_CPM_EMAC1 | IBM_CPM_EMAC2 \
  98. | IBM_CPM_EMAC3 | IBM_CPM_PCI)
  99. #define DCRN_DMA0_BASE 0x100
  100. #define DCRN_DMA1_BASE 0x108
  101. #define DCRN_DMA2_BASE 0x110
  102. #define DCRN_DMA3_BASE 0x118
  103. #define DCRNCAP_DMA_SG 1 /* have DMA scatter/gather capability */
  104. #define DCRN_DMASR_BASE 0x120
  105. #define DCRN_EBC_BASE 0x012
  106. #define DCRN_DCP0_BASE 0x014
  107. #define DCRN_MAL_BASE 0x180
  108. #define DCRN_OCM0_BASE 0x018
  109. #define DCRN_PLB0_BASE 0x084
  110. #define DCRN_PLLMR_BASE 0x0B0
  111. #define DCRN_POB0_BASE 0x0A0
  112. #define DCRN_SDRAM0_BASE 0x010
  113. #define DCRN_UIC0_BASE 0x0C0
  114. #define DCRN_UIC1_BASE 0x0D0
  115. #define DCRN_CPC0_EPRCSR 0x0F3
  116. #define UIC0_UIC1NC 0x00000002
  117. #define CHR1_CETE 0x00000004 /* CPU external timer enable */
  118. #define UIC0 DCRN_UIC0_BASE
  119. #define UIC1 DCRN_UIC1_BASE
  120. #undef NR_UICS
  121. #define NR_UICS 2
  122. /* EMAC DCRN's FIXME: armin */
  123. #define DCRN_MALRXCTP2R(base) ((base) + 0x42) /* Channel Rx 2 Channel Table Pointer */
  124. #define DCRN_MALRXCTP3R(base) ((base) + 0x43) /* Channel Rx 3 Channel Table Pointer */
  125. #define DCRN_MALTXCTP4R(base) ((base) + 0x24) /* Channel Tx 4 Channel Table Pointer */
  126. #define DCRN_MALTXCTP5R(base) ((base) + 0x25) /* Channel Tx 5 Channel Table Pointer */
  127. #define DCRN_MALTXCTP6R(base) ((base) + 0x26) /* Channel Tx 6 Channel Table Pointer */
  128. #define DCRN_MALTXCTP7R(base) ((base) + 0x27) /* Channel Tx 7 Channel Table Pointer */
  129. #define DCRN_MALRCBS2(base) ((base) + 0x62) /* Channel Rx 2 Channel Buffer Size */
  130. #define DCRN_MALRCBS3(base) ((base) + 0x63) /* Channel Rx 3 Channel Buffer Size */
  131. #include <asm/ibm405.h>
  132. #endif /* __ASM_IBMNP405H_H__ */
  133. #endif /* __KERNEL__ */