ibm405gpr.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /*
  2. * Author: Armin Kuster <akuster@mvista.com>
  3. *
  4. * 2002 (c) MontaVista, Software, Inc. This file is licensed under
  5. * the terms of the GNU General Public License version 2. This program
  6. * is licensed "as is" without any warranty of any kind, whether express
  7. * or implied.
  8. */
  9. #ifdef __KERNEL__
  10. #ifndef __ASM_IBM405GPR_H__
  11. #define __ASM_IBM405GPR_H__
  12. /* ibm405.h at bottom of this file */
  13. /* PCI
  14. * PCI Bridge config reg definitions
  15. * see 17-19 of manual
  16. */
  17. #define PPC405_PCI_CONFIG_ADDR 0xeec00000
  18. #define PPC405_PCI_CONFIG_DATA 0xeec00004
  19. #define PPC405_PCI_PHY_MEM_BASE 0x80000000 /* hose_a->pci_mem_offset */
  20. /* setbat */
  21. #define PPC405_PCI_MEM_BASE PPC405_PCI_PHY_MEM_BASE /* setbat */
  22. #define PPC405_PCI_PHY_IO_BASE 0xe8000000 /* setbat */
  23. #define PPC405_PCI_IO_BASE PPC405_PCI_PHY_IO_BASE /* setbat */
  24. #define PPC405_PCI_LOWER_MEM 0x80000000 /* hose_a->mem_space.start */
  25. #define PPC405_PCI_UPPER_MEM 0xBfffffff /* hose_a->mem_space.end */
  26. #define PPC405_PCI_LOWER_IO 0x00000000 /* hose_a->io_space.start */
  27. #define PPC405_PCI_UPPER_IO 0x0000ffff /* hose_a->io_space.end */
  28. #define PPC405_ISA_IO_BASE PPC405_PCI_IO_BASE
  29. #define PPC4xx_PCI_IO_PADDR ((uint)PPC405_PCI_PHY_IO_BASE)
  30. #define PPC4xx_PCI_IO_VADDR PPC4xx_PCI_IO_PADDR
  31. #define PPC4xx_PCI_IO_SIZE ((uint)64*1024)
  32. #define PPC4xx_PCI_CFG_PADDR ((uint)PPC405_PCI_CONFIG_ADDR)
  33. #define PPC4xx_PCI_CFG_VADDR PPC4xx_PCI_CFG_PADDR
  34. #define PPC4xx_PCI_CFG_SIZE ((uint)4*1024)
  35. #define PPC4xx_PCI_LCFG_PADDR ((uint)0xef400000)
  36. #define PPC4xx_PCI_LCFG_VADDR PPC4xx_PCI_LCFG_PADDR
  37. #define PPC4xx_PCI_LCFG_SIZE ((uint)4*1024)
  38. #define PPC4xx_ONB_IO_PADDR ((uint)0xef600000)
  39. #define PPC4xx_ONB_IO_VADDR PPC4xx_ONB_IO_PADDR
  40. #define PPC4xx_ONB_IO_SIZE ((uint)4*1024)
  41. /* serial port defines */
  42. #define RS_TABLE_SIZE 2
  43. #define UART0_INT 0
  44. #define UART1_INT 1
  45. #define PCIL0_BASE 0xEF400000
  46. #define UART0_IO_BASE 0xEF600300
  47. #define UART1_IO_BASE 0xEF600400
  48. #define EMAC0_BASE 0xEF600800
  49. #define BD_EMAC_ADDR(e,i) bi_enetaddr[i]
  50. #define STD_UART_OP(num) \
  51. { 0, BASE_BAUD, 0, UART##num##_INT, \
  52. (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \
  53. iomem_base: (u8 *)UART##num##_IO_BASE, \
  54. io_type: SERIAL_IO_MEM},
  55. #if defined(CONFIG_UART0_TTYS0)
  56. #define SERIAL_DEBUG_IO_BASE UART0_IO_BASE
  57. #define SERIAL_PORT_DFNS \
  58. STD_UART_OP(0) \
  59. STD_UART_OP(1)
  60. #endif
  61. #if defined(CONFIG_UART0_TTYS1)
  62. #define SERIAL_DEBUG_IO_BASE UART1_IO_BASE
  63. #define SERIAL_PORT_DFNS \
  64. STD_UART_OP(1) \
  65. STD_UART_OP(0)
  66. #endif
  67. /* DCR defines */
  68. #define DCRN_CHCR_BASE 0x0B1
  69. #define DCRN_CHPSR_BASE 0x0B4
  70. #define DCRN_CPMSR_BASE 0x0B8
  71. #define DCRN_CPMFR_BASE 0x0BA
  72. #define CHR0_U0EC 0x00000080 /* Select external clock for UART0 */
  73. #define CHR0_U1EC 0x00000040 /* Select external clock for UART1 */
  74. #define CHR0_UDIV 0x0000003E /* UART internal clock divisor */
  75. #define CHR1_CETE 0x00800000 /* CPU external timer enable */
  76. #define DCRN_CHPSR_BASE 0x0B4
  77. #define PSR_PLL_FWD_MASK 0xC0000000
  78. #define PSR_PLL_FDBACK_MASK 0x30000000
  79. #define PSR_PLL_TUNING_MASK 0x0E000000
  80. #define PSR_PLB_CPU_MASK 0x01800000
  81. #define PSR_OPB_PLB_MASK 0x00600000
  82. #define PSR_PCI_PLB_MASK 0x00180000
  83. #define PSR_EB_PLB_MASK 0x00060000
  84. #define PSR_ROM_WIDTH_MASK 0x00018000
  85. #define PSR_ROM_LOC 0x00004000
  86. #define PSR_PCI_ASYNC_EN 0x00001000
  87. #define PSR_PCI_ARBIT_EN 0x00000400
  88. #define IBM_CPM_IIC0 0x80000000 /* IIC interface */
  89. #define IBM_CPM_PCI 0x40000000 /* PCI bridge */
  90. #define IBM_CPM_CPU 0x20000000 /* processor core */
  91. #define IBM_CPM_DMA 0x10000000 /* DMA controller */
  92. #define IBM_CPM_OPB 0x08000000 /* PLB to OPB bridge */
  93. #define IBM_CPM_DCP 0x04000000 /* CodePack */
  94. #define IBM_CPM_EBC 0x02000000 /* ROM/SRAM peripheral controller */
  95. #define IBM_CPM_SDRAM0 0x01000000 /* SDRAM memory controller */
  96. #define IBM_CPM_PLB 0x00800000 /* PLB bus arbiter */
  97. #define IBM_CPM_GPIO0 0x00400000 /* General Purpose IO (??) */
  98. #define IBM_CPM_UART0 0x00200000 /* serial port 0 */
  99. #define IBM_CPM_UART1 0x00100000 /* serial port 1 */
  100. #define IBM_CPM_UIC 0x00080000 /* Universal Interrupt Controller */
  101. #define IBM_CPM_TMRCLK 0x00040000 /* CPU timers */
  102. #define IBM_CPM_EMAC0 0x00020000 /* on-chip ethernet MM unit */
  103. #define DFLT_IBM4xx_PM ~(IBM_CPM_PCI | IBM_CPM_CPU | IBM_CPM_DMA \
  104. | IBM_CPM_OPB | IBM_CPM_EBC \
  105. | IBM_CPM_SDRAM0 | IBM_CPM_PLB \
  106. | IBM_CPM_UIC | IBM_CPM_TMRCLK)
  107. #define DCRN_DMA0_BASE 0x100
  108. #define DCRN_DMA1_BASE 0x108
  109. #define DCRN_DMA2_BASE 0x110
  110. #define DCRN_DMA3_BASE 0x118
  111. #define DCRNCAP_DMA_SG 1 /* have DMA scatter/gather capability */
  112. #define DCRN_DMASR_BASE 0x120
  113. #define DCRN_EBC_BASE 0x012
  114. #define DCRN_DCP0_BASE 0x014
  115. #define DCRN_MAL_BASE 0x180
  116. #define DCRN_OCM0_BASE 0x018
  117. #define DCRN_PLB0_BASE 0x084
  118. #define DCRN_PLLMR_BASE 0x0B0
  119. #define DCRN_POB0_BASE 0x0A0
  120. #define DCRN_SDRAM0_BASE 0x010
  121. #define DCRN_UIC0_BASE 0x0C0
  122. #define UIC0 DCRN_UIC0_BASE
  123. #include <asm/ibm405.h>
  124. #endif /* __ASM_IBM405GPR_H__ */
  125. #endif /* __KERNEL__ */