fads.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /*
  2. * A collection of structures, addresses, and values associated with
  3. * the Motorola 860T FADS board. Copied from the MBX stuff.
  4. *
  5. * Copyright (c) 1998 Dan Malek (dmalek@jlc.net)
  6. *
  7. * Added MPC86XADS support.
  8. * The MPC86xADS manual says the board "is compatible with the MPC8xxFADS
  9. * for SW point of view". This is 99% correct.
  10. *
  11. * Author: MontaVista Software, Inc.
  12. * source@mvista.com
  13. * 2005 (c) MontaVista Software, Inc. This file is licensed under the
  14. * terms of the GNU General Public License version 2. This program is licensed
  15. * "as is" without any warranty of any kind, whether express or implied.
  16. */
  17. #ifdef __KERNEL__
  18. #ifndef __ASM_FADS_H__
  19. #define __ASM_FADS_H__
  20. #include <linux/config.h>
  21. #include <asm/ppcboot.h>
  22. #if defined(CONFIG_MPC86XADS)
  23. #define BOARD_CHIP_NAME "MPC86X"
  24. /* U-Boot maps BCSR to 0xff080000 */
  25. #define BCSR_ADDR ((uint)0xff080000)
  26. /* MPC86XADS has one more CPLD and an additional BCSR.
  27. */
  28. #define CFG_PHYDEV_ADDR ((uint)0xff0a0000)
  29. #define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300))
  30. #define BCSR5_T1_RST 0x10
  31. #define BCSR5_ATM155_RST 0x08
  32. #define BCSR5_ATM25_RST 0x04
  33. #define BCSR5_MII1_EN 0x02
  34. #define BCSR5_MII1_RST 0x01
  35. /* There is no PHY link change interrupt */
  36. #define PHY_INTERRUPT (-1)
  37. #else /* FADS */
  38. /* Memory map is configured by the PROM startup.
  39. * I tried to follow the FADS manual, although the startup PROM
  40. * dictates this and we simply have to move some of the physical
  41. * addresses for Linux.
  42. */
  43. #define BCSR_ADDR ((uint)0xff010000)
  44. /* PHY link change interrupt */
  45. #define PHY_INTERRUPT SIU_IRQ2
  46. #endif /* CONFIG_MPC86XADS */
  47. #define BCSR_SIZE ((uint)(64 * 1024))
  48. #define BCSR0 ((uint)(BCSR_ADDR + 0x00))
  49. #define BCSR1 ((uint)(BCSR_ADDR + 0x04))
  50. #define BCSR2 ((uint)(BCSR_ADDR + 0x08))
  51. #define BCSR3 ((uint)(BCSR_ADDR + 0x0c))
  52. #define BCSR4 ((uint)(BCSR_ADDR + 0x10))
  53. #define IMAP_ADDR ((uint)0xff000000)
  54. #define IMAP_SIZE ((uint)(64 * 1024))
  55. #define PCMCIA_MEM_ADDR ((uint)0xff020000)
  56. #define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
  57. /* Bits of interest in the BCSRs.
  58. */
  59. #define BCSR1_ETHEN ((uint)0x20000000)
  60. #define BCSR1_IRDAEN ((uint)0x10000000)
  61. #define BCSR1_RS232EN_1 ((uint)0x01000000)
  62. #define BCSR1_PCCEN ((uint)0x00800000)
  63. #define BCSR1_PCCVCC0 ((uint)0x00400000)
  64. #define BCSR1_PCCVPP0 ((uint)0x00200000)
  65. #define BCSR1_PCCVPP1 ((uint)0x00100000)
  66. #define BCSR1_PCCVPP_MASK (BCSR1_PCCVPP0 | BCSR1_PCCVPP1)
  67. #define BCSR1_RS232EN_2 ((uint)0x00040000)
  68. #define BCSR1_PCCVCC1 ((uint)0x00010000)
  69. #define BCSR1_PCCVCC_MASK (BCSR1_PCCVCC0 | BCSR1_PCCVCC1)
  70. #define BCSR4_ETHLOOP ((uint)0x80000000) /* EEST Loopback */
  71. #define BCSR4_EEFDX ((uint)0x40000000) /* EEST FDX enable */
  72. #define BCSR4_FETH_EN ((uint)0x08000000) /* PHY enable */
  73. #define BCSR4_FETHCFG0 ((uint)0x04000000) /* PHY autoneg mode */
  74. #define BCSR4_FETHCFG1 ((uint)0x00400000) /* PHY autoneg mode */
  75. #define BCSR4_FETHFDE ((uint)0x02000000) /* PHY FDX advertise */
  76. #define BCSR4_FETHRST ((uint)0x00200000) /* PHY Reset */
  77. /* IO_BASE definition for pcmcia.
  78. */
  79. #define _IO_BASE 0x80000000
  80. #define _IO_BASE_SIZE 0x1000
  81. #ifdef CONFIG_IDE
  82. #define MAX_HWIFS 1
  83. #endif
  84. /* Interrupt level assignments.
  85. */
  86. #define FEC_INTERRUPT SIU_LEVEL1 /* FEC interrupt */
  87. /* We don't use the 8259.
  88. */
  89. #define NR_8259_INTS 0
  90. /* CPM Ethernet through SCC1 or SCC2 */
  91. #if defined(CONFIG_SCC1_ENET) || defined(CONFIG_MPC8xx_SECOND_ETH_SCC1) /* Probably 860 variant */
  92. /* Bits in parallel I/O port registers that have to be set/cleared
  93. * to configure the pins for SCC1 use.
  94. * TCLK - CLK1, RCLK - CLK2.
  95. */
  96. #define PA_ENET_RXD ((ushort)0x0001)
  97. #define PA_ENET_TXD ((ushort)0x0002)
  98. #define PA_ENET_TCLK ((ushort)0x0100)
  99. #define PA_ENET_RCLK ((ushort)0x0200)
  100. #define PB_ENET_TENA ((uint)0x00001000)
  101. #define PC_ENET_CLSN ((ushort)0x0010)
  102. #define PC_ENET_RENA ((ushort)0x0020)
  103. /* Control bits in the SICR to route TCLK (CLK1) and RCLK (CLK2) to
  104. * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
  105. */
  106. #define SICR_ENET_MASK ((uint)0x000000ff)
  107. #define SICR_ENET_CLKRT ((uint)0x0000002c)
  108. #endif /* CONFIG_SCC1_ENET */
  109. #ifdef CONFIG_SCC2_ENET /* Probably 823/850 variant */
  110. /* Bits in parallel I/O port registers that have to be set/cleared
  111. * to configure the pins for SCC1 use.
  112. * TCLK - CLK1, RCLK - CLK2.
  113. */
  114. #define PA_ENET_RXD ((ushort)0x0004)
  115. #define PA_ENET_TXD ((ushort)0x0008)
  116. #define PA_ENET_TCLK ((ushort)0x0400)
  117. #define PA_ENET_RCLK ((ushort)0x0200)
  118. #define PB_ENET_TENA ((uint)0x00002000)
  119. #define PC_ENET_CLSN ((ushort)0x0040)
  120. #define PC_ENET_RENA ((ushort)0x0080)
  121. /* Control bits in the SICR to route TCLK and RCLK to
  122. * SCC2. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
  123. */
  124. #define SICR_ENET_MASK ((uint)0x0000ff00)
  125. #define SICR_ENET_CLKRT ((uint)0x00002e00)
  126. #endif /* CONFIG_SCC2_ENET */
  127. #endif /* __ASM_FADS_H__ */
  128. #endif /* __KERNEL__ */