tqm8xx.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /*
  2. * TQM8xx(L) board specific definitions
  3. *
  4. * Copyright (c) 1999-2002 Wolfgang Denk (wd@denx.de)
  5. */
  6. #ifdef __KERNEL__
  7. #ifndef __MACH_TQM8xx_H
  8. #define __MACH_TQM8xx_H
  9. #include <linux/config.h>
  10. #include <asm/ppcboot.h>
  11. #ifndef __ASSEMBLY__
  12. #define TQM_IMMR_BASE 0xFFF00000 /* phys. addr of IMMR */
  13. #define TQM_IMAP_SIZE (64 * 1024) /* size of mapped area */
  14. #define IMAP_ADDR TQM_IMMR_BASE /* physical base address of IMMR area */
  15. #define IMAP_SIZE TQM_IMAP_SIZE /* mapped size of IMMR area */
  16. /*-----------------------------------------------------------------------
  17. * PCMCIA stuff
  18. *-----------------------------------------------------------------------
  19. *
  20. */
  21. #define PCMCIA_MEM_SIZE ( 64 << 20 )
  22. #ifndef CONFIG_KUP4K
  23. # define MAX_HWIFS 1 /* overwrite default in include/asm-ppc/ide.h */
  24. #else /* CONFIG_KUP4K */
  25. # define MAX_HWIFS 2 /* overwrite default in include/asm-ppc/ide.h */
  26. # ifndef __ASSEMBLY__
  27. # include <asm/8xx_immap.h>
  28. static __inline__ void ide_led(int on)
  29. {
  30. volatile immap_t *immap = (immap_t *)IMAP_ADDR;
  31. if (on) {
  32. immap->im_ioport.iop_padat &= ~0x80;
  33. } else {
  34. immap->im_ioport.iop_padat |= 0x80;
  35. }
  36. }
  37. # endif /* __ASSEMBLY__ */
  38. # define IDE_LED(x) ide_led((x))
  39. #endif /* CONFIG_KUP4K */
  40. /*
  41. * Definitions for IDE0 Interface
  42. */
  43. #define IDE0_BASE_OFFSET 0
  44. #define IDE0_DATA_REG_OFFSET (PCMCIA_MEM_SIZE + 0x320)
  45. #define IDE0_ERROR_REG_OFFSET (2 * PCMCIA_MEM_SIZE + 0x320 + 1)
  46. #define IDE0_NSECTOR_REG_OFFSET (2 * PCMCIA_MEM_SIZE + 0x320 + 2)
  47. #define IDE0_SECTOR_REG_OFFSET (2 * PCMCIA_MEM_SIZE + 0x320 + 3)
  48. #define IDE0_LCYL_REG_OFFSET (2 * PCMCIA_MEM_SIZE + 0x320 + 4)
  49. #define IDE0_HCYL_REG_OFFSET (2 * PCMCIA_MEM_SIZE + 0x320 + 5)
  50. #define IDE0_SELECT_REG_OFFSET (2 * PCMCIA_MEM_SIZE + 0x320 + 6)
  51. #define IDE0_STATUS_REG_OFFSET (2 * PCMCIA_MEM_SIZE + 0x320 + 7)
  52. #define IDE0_CONTROL_REG_OFFSET 0x0106
  53. #define IDE0_IRQ_REG_OFFSET 0x000A /* not used */
  54. /* define IO_BASE for PCMCIA */
  55. #define _IO_BASE 0x80000000
  56. #define _IO_BASE_SIZE (64<<10)
  57. #define FEC_INTERRUPT 9 /* = SIU_LEVEL4 */
  58. #define PHY_INTERRUPT 12 /* = IRQ6 */
  59. #define IDE0_INTERRUPT 13
  60. #ifdef CONFIG_IDE
  61. #endif
  62. /*-----------------------------------------------------------------------
  63. * CPM Ethernet through SCCx.
  64. *-----------------------------------------------------------------------
  65. *
  66. */
  67. /*** TQM823L, TQM850L ***********************************************/
  68. #if defined(CONFIG_TQM823L) || defined(CONFIG_TQM850L)
  69. /* Bits in parallel I/O port registers that have to be set/cleared
  70. * to configure the pins for SCC1 use.
  71. */
  72. #define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
  73. #define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
  74. #define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
  75. #define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
  76. #define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
  77. #define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
  78. #define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
  79. /* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
  80. * SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
  81. */
  82. #define SICR_ENET_MASK ((uint)0x0000ff00)
  83. #define SICR_ENET_CLKRT ((uint)0x00002600)
  84. #endif /* CONFIG_TQM823L, CONFIG_TQM850L */
  85. /*** TQM860L ********************************************************/
  86. #ifdef CONFIG_TQM860L
  87. /* Bits in parallel I/O port registers that have to be set/cleared
  88. * to configure the pins for SCC1 use.
  89. */
  90. #define PA_ENET_RXD ((ushort)0x0001) /* PA 15 */
  91. #define PA_ENET_TXD ((ushort)0x0002) /* PA 14 */
  92. #define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
  93. #define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
  94. #define PC_ENET_TENA ((ushort)0x0001) /* PC 15 */
  95. #define PC_ENET_CLSN ((ushort)0x0010) /* PC 11 */
  96. #define PC_ENET_RENA ((ushort)0x0020) /* PC 10 */
  97. /* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
  98. * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
  99. */
  100. #define SICR_ENET_MASK ((uint)0x000000ff)
  101. #define SICR_ENET_CLKRT ((uint)0x00000026)
  102. #endif /* CONFIG_TQM860L */
  103. /*** FPS850L *********************************************************/
  104. #ifdef CONFIG_FPS850L
  105. /* Bits in parallel I/O port registers that have to be set/cleared
  106. * to configure the pins for SCC1 use.
  107. */
  108. #define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
  109. #define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
  110. #define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
  111. #define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
  112. #define PC_ENET_TENA ((ushort)0x0002) /* PC 14 */
  113. #define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
  114. #define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
  115. /* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to
  116. * SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
  117. */
  118. #define SICR_ENET_MASK ((uint)0x0000ff00)
  119. #define SICR_ENET_CLKRT ((uint)0x00002600)
  120. #endif /* CONFIG_FPS850L */
  121. /* We don't use the 8259.
  122. */
  123. #define NR_8259_INTS 0
  124. #endif /* !__ASSEMBLY__ */
  125. #endif /* __MACH_TQM8xx_H */
  126. #endif /* __KERNEL__ */