ev64260.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * Definitions for Marvell/Galileo EV-64260-BP Evaluation Board.
  3. *
  4. * Author: Mark A. Greer <mgreer@mvista.com>
  5. *
  6. * 2001-2002 (c) MontaVista, Software, Inc. This file is licensed under
  7. * the terms of the GNU General Public License version 2. This program
  8. * is licensed "as is" without any warranty of any kind, whether express
  9. * or implied.
  10. */
  11. /*
  12. * The MV64x60 has 2 PCI buses each with 1 window from the CPU bus to
  13. * PCI I/O space and 4 windows from the CPU bus to PCI MEM space.
  14. * We'll only use one PCI MEM window on each PCI bus.
  15. *
  16. * This is the CPU physical memory map (windows must be at least 1MB and start
  17. * on a boundary that is a multiple of the window size):
  18. *
  19. * 0xfc000000-0xffffffff - External FLASH on device module
  20. * 0xfbf00000-0xfbffffff - Embedded (on board) FLASH
  21. * 0xfbe00000-0xfbefffff - GT64260 Registers (preferably)
  22. * but really a config option
  23. * 0xfbd00000-0xfbdfffff - External SRAM on device module
  24. * 0xfbc00000-0xfbcfffff - TODC chip on device module
  25. * 0xfbb00000-0xfbbfffff - External UART on device module
  26. * 0xa2000000-0xfbafffff - <hole>
  27. * 0xa1000000-0xa1ffffff - PCI 1 I/O (defined in gt64260.h)
  28. * 0xa0000000-0xa0ffffff - PCI 0 I/O (defined in gt64260.h)
  29. * 0x90000000-0x9fffffff - PCI 1 MEM (defined in gt64260.h)
  30. * 0x80000000-0x8fffffff - PCI 0 MEM (defined in gt64260.h)
  31. */
  32. #ifndef __PPC_PLATFORMS_EV64260_H
  33. #define __PPC_PLATFORMS_EV64260_H
  34. /* PCI mappings */
  35. #define EV64260_PCI0_IO_CPU_BASE 0xa0000000
  36. #define EV64260_PCI0_IO_PCI_BASE 0x00000000
  37. #define EV64260_PCI0_IO_SIZE 0x01000000
  38. #define EV64260_PCI0_MEM_CPU_BASE 0x80000000
  39. #define EV64260_PCI0_MEM_PCI_BASE 0x80000000
  40. #define EV64260_PCI0_MEM_SIZE 0x10000000
  41. #define EV64260_PCI1_IO_CPU_BASE (EV64260_PCI0_IO_CPU_BASE + \
  42. EV64260_PCI0_IO_SIZE)
  43. #define EV64260_PCI1_IO_PCI_BASE (EV64260_PCI0_IO_PCI_BASE + \
  44. EV64260_PCI0_IO_SIZE)
  45. #define EV64260_PCI1_IO_SIZE 0x01000000
  46. #define EV64260_PCI1_MEM_CPU_BASE (EV64260_PCI0_MEM_CPU_BASE + \
  47. EV64260_PCI0_MEM_SIZE)
  48. #define EV64260_PCI1_MEM_PCI_BASE (EV64260_PCI0_MEM_PCI_BASE + \
  49. EV64260_PCI0_MEM_SIZE)
  50. #define EV64260_PCI1_MEM_SIZE 0x10000000
  51. /* CPU Physical Memory Map setup (other than PCI) */
  52. #define EV64260_EXT_FLASH_BASE 0xfc000000
  53. #define EV64260_EMB_FLASH_BASE 0xfbf00000
  54. #define EV64260_EXT_SRAM_BASE 0xfbd00000
  55. #define EV64260_TODC_BASE 0xfbc00000
  56. #define EV64260_UART_BASE 0xfbb00000
  57. #define EV64260_EXT_FLASH_SIZE_ACTUAL 0x04000000 /* <= 64MB Extern FLASH */
  58. #define EV64260_EMB_FLASH_SIZE_ACTUAL 0x00080000 /* 512KB of Embed FLASH */
  59. #define EV64260_EXT_SRAM_SIZE_ACTUAL 0x00100000 /* 1MB SDRAM */
  60. #define EV64260_TODC_SIZE_ACTUAL 0x00000020 /* 32 bytes for TODC */
  61. #define EV64260_UART_SIZE_ACTUAL 0x00000040 /* 64 bytes for DUART */
  62. #define EV64260_EXT_FLASH_SIZE max(GT64260_WINDOW_SIZE_MIN, \
  63. EV64260_EXT_FLASH_SIZE_ACTUAL)
  64. #define EV64260_EMB_FLASH_SIZE max(GT64260_WINDOW_SIZE_MIN, \
  65. EV64260_EMB_FLASH_SIZE_ACTUAL)
  66. #define EV64260_EXT_SRAM_SIZE max(GT64260_WINDOW_SIZE_MIN, \
  67. EV64260_EXT_SRAM_SIZE_ACTUAL)
  68. #define EV64260_TODC_SIZE max(GT64260_WINDOW_SIZE_MIN, \
  69. EV64260_TODC_SIZE_ACTUAL)
  70. /* Assembler in bootwrapper blows up if 'max' is used */
  71. #define EV64260_UART_SIZE GT64260_WINDOW_SIZE_MIN
  72. #define EV64260_UART_END ((EV64260_UART_BASE + \
  73. EV64260_UART_SIZE - 1) & 0xfff00000)
  74. /* Board-specific IRQ info */
  75. #define EV64260_UART_0_IRQ 85
  76. #define EV64260_UART_1_IRQ 86
  77. #define EV64260_PCI_0_IRQ 91
  78. #define EV64260_PCI_1_IRQ 93
  79. /* Serial port setup */
  80. #define EV64260_DEFAULT_BAUD 115200
  81. #if defined(CONFIG_SERIAL_MPSC_CONSOLE)
  82. #define SERIAL_PORT_DFNS
  83. #define EV64260_MPSC_CLK_SRC 8 /* TCLK */
  84. #define EV64260_MPSC_CLK_FREQ 100000000 /* 100MHz clk */
  85. #else
  86. #define EV64260_SERIAL_0 (EV64260_UART_BASE + 0x20)
  87. #define EV64260_SERIAL_1 EV64260_UART_BASE
  88. #define BASE_BAUD (EV64260_DEFAULT_BAUD * 2)
  89. #ifdef CONFIG_SERIAL_MANY_PORTS
  90. #define RS_TABLE_SIZE 64
  91. #else
  92. #define RS_TABLE_SIZE 2
  93. #endif
  94. #ifdef CONFIG_SERIAL_DETECT_IRQ
  95. #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
  96. #else
  97. #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
  98. #endif
  99. /* Required for bootloader's ns16550.c code */
  100. #define STD_SERIAL_PORT_DFNS \
  101. { 0, BASE_BAUD, EV64260_SERIAL_0, EV64260_UART_0_IRQ, STD_COM_FLAGS, \
  102. iomem_base: (u8 *)EV64260_SERIAL_0, /* ttyS0 */ \
  103. iomem_reg_shift: 2, \
  104. io_type: SERIAL_IO_MEM },
  105. #define SERIAL_PORT_DFNS \
  106. STD_SERIAL_PORT_DFNS
  107. #endif
  108. #endif /* __PPC_PLATFORMS_EV64260_H */