motherboard.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. #ifndef __MACH_MOTHERBOARD_H
  2. #define __MACH_MOTHERBOARD_H
  3. /*
  4. * Physical addresses, offset from V2M_PA_CS0-3
  5. */
  6. #define V2M_NOR0 (V2M_PA_CS0)
  7. #define V2M_NOR1 (V2M_PA_CS1)
  8. #define V2M_SRAM (V2M_PA_CS2)
  9. #define V2M_VIDEO_SRAM (V2M_PA_CS3 + 0x00000000)
  10. #define V2M_LAN9118 (V2M_PA_CS3 + 0x02000000)
  11. #define V2M_ISP1761 (V2M_PA_CS3 + 0x03000000)
  12. /*
  13. * Physical addresses, offset from V2M_PA_CS7
  14. */
  15. #define V2M_SYSREGS (V2M_PA_CS7 + 0x00000000)
  16. #define V2M_SYSCTL (V2M_PA_CS7 + 0x00001000)
  17. #define V2M_SERIAL_BUS_PCI (V2M_PA_CS7 + 0x00002000)
  18. #define V2M_AACI (V2M_PA_CS7 + 0x00004000)
  19. #define V2M_MMCI (V2M_PA_CS7 + 0x00005000)
  20. #define V2M_KMI0 (V2M_PA_CS7 + 0x00006000)
  21. #define V2M_KMI1 (V2M_PA_CS7 + 0x00007000)
  22. #define V2M_UART0 (V2M_PA_CS7 + 0x00009000)
  23. #define V2M_UART1 (V2M_PA_CS7 + 0x0000a000)
  24. #define V2M_UART2 (V2M_PA_CS7 + 0x0000b000)
  25. #define V2M_UART3 (V2M_PA_CS7 + 0x0000c000)
  26. #define V2M_WDT (V2M_PA_CS7 + 0x0000f000)
  27. #define V2M_TIMER01 (V2M_PA_CS7 + 0x00011000)
  28. #define V2M_TIMER23 (V2M_PA_CS7 + 0x00012000)
  29. #define V2M_SERIAL_BUS_DVI (V2M_PA_CS7 + 0x00016000)
  30. #define V2M_RTC (V2M_PA_CS7 + 0x00017000)
  31. #define V2M_CF (V2M_PA_CS7 + 0x0001a000)
  32. #define V2M_CLCD (V2M_PA_CS7 + 0x0001f000)
  33. #define V2M_SYS_ID (V2M_SYSREGS + 0x000)
  34. #define V2M_SYS_SW (V2M_SYSREGS + 0x004)
  35. #define V2M_SYS_LED (V2M_SYSREGS + 0x008)
  36. #define V2M_SYS_100HZ (V2M_SYSREGS + 0x024)
  37. #define V2M_SYS_FLAGS (V2M_SYSREGS + 0x030)
  38. #define V2M_SYS_FLAGSSET (V2M_SYSREGS + 0x030)
  39. #define V2M_SYS_FLAGSCLR (V2M_SYSREGS + 0x034)
  40. #define V2M_SYS_NVFLAGS (V2M_SYSREGS + 0x038)
  41. #define V2M_SYS_NVFLAGSSET (V2M_SYSREGS + 0x038)
  42. #define V2M_SYS_NVFLAGSCLR (V2M_SYSREGS + 0x03c)
  43. #define V2M_SYS_MCI (V2M_SYSREGS + 0x048)
  44. #define V2M_SYS_FLASH (V2M_SYSREGS + 0x03c)
  45. #define V2M_SYS_CFGSW (V2M_SYSREGS + 0x058)
  46. #define V2M_SYS_24MHZ (V2M_SYSREGS + 0x05c)
  47. #define V2M_SYS_MISC (V2M_SYSREGS + 0x060)
  48. #define V2M_SYS_DMA (V2M_SYSREGS + 0x064)
  49. #define V2M_SYS_PROCID0 (V2M_SYSREGS + 0x084)
  50. #define V2M_SYS_PROCID1 (V2M_SYSREGS + 0x088)
  51. #define V2M_SYS_CFGDATA (V2M_SYSREGS + 0x0a0)
  52. #define V2M_SYS_CFGCTRL (V2M_SYSREGS + 0x0a4)
  53. #define V2M_SYS_CFGSTAT (V2M_SYSREGS + 0x0a8)
  54. #define V2M_TIMER0 (V2M_TIMER01 + 0x000)
  55. #define V2M_TIMER1 (V2M_TIMER01 + 0x020)
  56. #define V2M_TIMER2 (V2M_TIMER23 + 0x000)
  57. #define V2M_TIMER3 (V2M_TIMER23 + 0x020)
  58. /*
  59. * Interrupts. Those in {} are for AMBA devices
  60. */
  61. #define IRQ_V2M_WDT { (32 + 0) }
  62. #define IRQ_V2M_TIMER0 (32 + 2)
  63. #define IRQ_V2M_TIMER1 (32 + 2)
  64. #define IRQ_V2M_TIMER2 (32 + 3)
  65. #define IRQ_V2M_TIMER3 (32 + 3)
  66. #define IRQ_V2M_RTC { (32 + 4) }
  67. #define IRQ_V2M_UART0 { (32 + 5) }
  68. #define IRQ_V2M_UART1 { (32 + 6) }
  69. #define IRQ_V2M_UART2 { (32 + 7) }
  70. #define IRQ_V2M_UART3 { (32 + 8) }
  71. #define IRQ_V2M_MMCI { (32 + 9), (32 + 10) }
  72. #define IRQ_V2M_AACI { (32 + 11) }
  73. #define IRQ_V2M_KMI0 { (32 + 12) }
  74. #define IRQ_V2M_KMI1 { (32 + 13) }
  75. #define IRQ_V2M_CLCD { (32 + 14) }
  76. #define IRQ_V2M_LAN9118 (32 + 15)
  77. #define IRQ_V2M_ISP1761 (32 + 16)
  78. #define IRQ_V2M_PCIE (32 + 17)
  79. /*
  80. * Configuration
  81. */
  82. #define SYS_CFG_START (1 << 31)
  83. #define SYS_CFG_WRITE (1 << 30)
  84. #define SYS_CFG_OSC (1 << 20)
  85. #define SYS_CFG_VOLT (2 << 20)
  86. #define SYS_CFG_AMP (3 << 20)
  87. #define SYS_CFG_TEMP (4 << 20)
  88. #define SYS_CFG_RESET (5 << 20)
  89. #define SYS_CFG_SCC (6 << 20)
  90. #define SYS_CFG_MUXFPGA (7 << 20)
  91. #define SYS_CFG_SHUTDOWN (8 << 20)
  92. #define SYS_CFG_REBOOT (9 << 20)
  93. #define SYS_CFG_DVIMODE (11 << 20)
  94. #define SYS_CFG_POWER (12 << 20)
  95. #define SYS_CFG_SITE_MB (0 << 16)
  96. #define SYS_CFG_SITE_DB1 (1 << 16)
  97. #define SYS_CFG_SITE_DB2 (2 << 16)
  98. #define SYS_CFG_STACK(n) ((n) << 12)
  99. #define SYS_CFG_ERR (1 << 1)
  100. #define SYS_CFG_COMPLETE (1 << 0)
  101. int v2m_cfg_write(u32 devfn, u32 data);
  102. int v2m_cfg_read(u32 devfn, u32 *data);
  103. /*
  104. * Core tile IDs
  105. */
  106. #define V2M_CT_ID_CA9 0x0c000191
  107. #define V2M_CT_ID_UNSUPPORTED 0xff000191
  108. #define V2M_CT_ID_MASK 0xff000fff
  109. struct ct_desc {
  110. u32 id;
  111. const char *name;
  112. void (*map_io)(void);
  113. void (*init_early)(void);
  114. void (*init_irq)(void);
  115. void (*init_tile)(void);
  116. #ifdef CONFIG_SMP
  117. void (*init_cpu_map)(void);
  118. void (*smp_enable)(unsigned int);
  119. #endif
  120. };
  121. extern struct ct_desc *ct_desc;
  122. #endif