ibm405ep.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /*
  2. * IBM PPC 405EP processor defines.
  3. *
  4. * Author: SAW (IBM), derived from ibm405gp.h.
  5. * Maintained by MontaVista Software <source@mvista.com>
  6. *
  7. * 2003 (c) MontaVista Softare Inc. This file is licensed under the
  8. * terms of the GNU General Public License version 2. This program is
  9. * licensed "as is" without any warranty of any kind, whether express
  10. * or implied.
  11. */
  12. #ifdef __KERNEL__
  13. #ifndef __ASM_IBM405EP_H__
  14. #define __ASM_IBM405EP_H__
  15. /* ibm405.h at bottom of this file */
  16. /* PCI
  17. * PCI Bridge config reg definitions
  18. * see 17-19 of manual
  19. */
  20. #define PPC405_PCI_CONFIG_ADDR 0xeec00000
  21. #define PPC405_PCI_CONFIG_DATA 0xeec00004
  22. #define PPC405_PCI_PHY_MEM_BASE 0x80000000 /* hose_a->pci_mem_offset */
  23. /* setbat */
  24. #define PPC405_PCI_MEM_BASE PPC405_PCI_PHY_MEM_BASE /* setbat */
  25. #define PPC405_PCI_PHY_IO_BASE 0xe8000000 /* setbat */
  26. #define PPC405_PCI_IO_BASE PPC405_PCI_PHY_IO_BASE /* setbat */
  27. #define PPC405_PCI_LOWER_MEM 0x80000000 /* hose_a->mem_space.start */
  28. #define PPC405_PCI_UPPER_MEM 0xBfffffff /* hose_a->mem_space.end */
  29. #define PPC405_PCI_LOWER_IO 0x00000000 /* hose_a->io_space.start */
  30. #define PPC405_PCI_UPPER_IO 0x0000ffff /* hose_a->io_space.end */
  31. #define PPC405_ISA_IO_BASE PPC405_PCI_IO_BASE
  32. #define PPC4xx_PCI_IO_PADDR ((uint)PPC405_PCI_PHY_IO_BASE)
  33. #define PPC4xx_PCI_IO_VADDR PPC4xx_PCI_IO_PADDR
  34. #define PPC4xx_PCI_IO_SIZE ((uint)64*1024)
  35. #define PPC4xx_PCI_CFG_PADDR ((uint)PPC405_PCI_CONFIG_ADDR)
  36. #define PPC4xx_PCI_CFG_VADDR PPC4xx_PCI_CFG_PADDR
  37. #define PPC4xx_PCI_CFG_SIZE ((uint)4*1024)
  38. #define PPC4xx_PCI_LCFG_PADDR ((uint)0xef400000)
  39. #define PPC4xx_PCI_LCFG_VADDR PPC4xx_PCI_LCFG_PADDR
  40. #define PPC4xx_PCI_LCFG_SIZE ((uint)4*1024)
  41. #define PPC4xx_ONB_IO_PADDR ((uint)0xef600000)
  42. #define PPC4xx_ONB_IO_VADDR PPC4xx_ONB_IO_PADDR
  43. #define PPC4xx_ONB_IO_SIZE ((uint)4*1024)
  44. /* serial port defines */
  45. #define RS_TABLE_SIZE 2
  46. #define UART0_INT 0
  47. #define UART1_INT 1
  48. #define PCIL0_BASE 0xEF400000
  49. #define UART0_IO_BASE 0xEF600300
  50. #define UART1_IO_BASE 0xEF600400
  51. #define EMAC0_BASE 0xEF600800
  52. #define BD_EMAC_ADDR(e,i) bi_enetaddr[e][i]
  53. #if defined(CONFIG_UART0_TTYS0)
  54. #define ACTING_UART0_IO_BASE UART0_IO_BASE
  55. #define ACTING_UART1_IO_BASE UART1_IO_BASE
  56. #define ACTING_UART0_INT UART0_INT
  57. #define ACTING_UART1_INT UART1_INT
  58. #else
  59. #define ACTING_UART0_IO_BASE UART1_IO_BASE
  60. #define ACTING_UART1_IO_BASE UART0_IO_BASE
  61. #define ACTING_UART0_INT UART1_INT
  62. #define ACTING_UART1_INT UART0_INT
  63. #endif
  64. #define STD_UART_OP(num) \
  65. { 0, BASE_BAUD, 0, ACTING_UART##num##_INT, \
  66. (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \
  67. iomem_base: (u8 *)ACTING_UART##num##_IO_BASE, \
  68. io_type: SERIAL_IO_MEM},
  69. #define SERIAL_DEBUG_IO_BASE ACTING_UART0_IO_BASE
  70. #define SERIAL_PORT_DFNS \
  71. STD_UART_OP(0) \
  72. STD_UART_OP(1)
  73. /* DCR defines */
  74. #define DCRN_CPMSR_BASE 0x0BA
  75. #define DCRN_CPMFR_BASE 0x0B9
  76. #define DCRN_CPC0_PLLMR0_BASE 0x0F0
  77. #define DCRN_CPC0_BOOT_BASE 0x0F1
  78. #define DCRN_CPC0_CR1_BASE 0x0F2
  79. #define DCRN_CPC0_EPRCSR_BASE 0x0F3
  80. #define DCRN_CPC0_PLLMR1_BASE 0x0F4
  81. #define DCRN_CPC0_UCR_BASE 0x0F5
  82. #define DCRN_CPC0_UCR_U0DIV 0x07F
  83. #define DCRN_CPC0_SRR_BASE 0x0F6
  84. #define DCRN_CPC0_JTAGID_BASE 0x0F7
  85. #define DCRN_CPC0_SPARE_BASE 0x0F8
  86. #define DCRN_CPC0_PCI_BASE 0x0F9
  87. #define IBM_CPM_GPT 0x80000000 /* GPT interface */
  88. #define IBM_CPM_PCI 0x40000000 /* PCI bridge */
  89. #define IBM_CPM_UIC 0x00010000 /* Universal Int Controller */
  90. #define IBM_CPM_CPU 0x00008000 /* processor core */
  91. #define IBM_CPM_EBC 0x00002000 /* EBC controller */
  92. #define IBM_CPM_SDRAM0 0x00004000 /* SDRAM memory controller */
  93. #define IBM_CPM_GPIO0 0x00001000 /* General Purpose IO */
  94. #define IBM_CPM_TMRCLK 0x00000400 /* CPU timers */
  95. #define IBM_CPM_PLB 0x00000100 /* PLB bus arbiter */
  96. #define IBM_CPM_OPB 0x00000080 /* PLB to OPB bridge */
  97. #define IBM_CPM_DMA 0x00000040 /* DMA controller */
  98. #define IBM_CPM_IIC0 0x00000010 /* IIC interface */
  99. #define IBM_CPM_UART1 0x00000002 /* serial port 0 */
  100. #define IBM_CPM_UART0 0x00000001 /* serial port 1 */
  101. #define DFLT_IBM4xx_PM ~(IBM_CPM_PCI | IBM_CPM_CPU | IBM_CPM_DMA \
  102. | IBM_CPM_OPB | IBM_CPM_EBC \
  103. | IBM_CPM_SDRAM0 | IBM_CPM_PLB \
  104. | IBM_CPM_UIC | IBM_CPM_TMRCLK)
  105. #define DCRN_DMA0_BASE 0x100
  106. #define DCRN_DMA1_BASE 0x108
  107. #define DCRN_DMA2_BASE 0x110
  108. #define DCRN_DMA3_BASE 0x118
  109. #define DCRNCAP_DMA_SG 1 /* have DMA scatter/gather capability */
  110. #define DCRN_DMASR_BASE 0x120
  111. #define DCRN_EBC_BASE 0x012
  112. #define DCRN_DCP0_BASE 0x014
  113. #define DCRN_MAL_BASE 0x180
  114. #define DCRN_OCM0_BASE 0x018
  115. #define DCRN_PLB0_BASE 0x084
  116. #define DCRN_PLLMR_BASE 0x0B0
  117. #define DCRN_POB0_BASE 0x0A0
  118. #define DCRN_SDRAM0_BASE 0x010
  119. #define DCRN_UIC0_BASE 0x0C0
  120. #define UIC0 DCRN_UIC0_BASE
  121. #include <asm/ibm405.h>
  122. #endif /* __ASM_IBM405EP_H__ */
  123. #endif /* __KERNEL__ */