integratorcp.h 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. /*
  2. * (C) Copyright 2003
  3. * Texas Instruments.
  4. * Kshitij Gupta <kshitij@ti.com>
  5. * Configuation settings for the TI OMAP Innovator board.
  6. *
  7. * (C) Copyright 2004
  8. * ARM Ltd.
  9. * Philippe Robin, <philippe.robin@arm.com>
  10. * Configuration for Compact Integrator board.
  11. *
  12. * See file CREDITS for list of people who contributed to this
  13. * project.
  14. *
  15. * This program is free software; you can redistribute it and/or
  16. * modify it under the terms of the GNU General Public License as
  17. * published by the Free Software Foundation; either version 2 of
  18. * the License, or (at your option) any later version.
  19. *
  20. * This program is distributed in the hope that it will be useful,
  21. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. * GNU General Public License for more details.
  24. *
  25. * You should have received a copy of the GNU General Public License
  26. * along with this program; if not, write to the Free Software
  27. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  28. * MA 02111-1307 USA
  29. */
  30. #ifndef __CONFIG_H
  31. #define __CONFIG_H
  32. #define CONFIG_INTEGRATOR
  33. #define CONFIG_ARCH_INTEGRATOR
  34. /*
  35. * High Level Configuration Options
  36. * (easy to change)
  37. */
  38. #define CONFIG_SYS_MEMTEST_START 0x100000
  39. #define CONFIG_SYS_MEMTEST_END 0x10000000
  40. #define CONFIG_SYS_HZ 1000
  41. #define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer 1 is clocked at 1Mhz */
  42. #define CONFIG_SYS_TIMERBASE 0x13000100
  43. #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
  44. #define CONFIG_SETUP_MEMORY_TAGS 1
  45. #define CONFIG_MISC_INIT_R 1 /* call misc_init_r during start up */
  46. /*
  47. * Size of malloc() pool
  48. */
  49. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)
  50. /*
  51. * Hardware drivers
  52. */
  53. #define CONFIG_SMC91111
  54. #define CONFIG_SMC_USE_32_BIT
  55. #define CONFIG_SMC91111_BASE 0xC8000000
  56. #undef CONFIG_SMC91111_EXT_PHY
  57. /*
  58. * NS16550 Configuration
  59. */
  60. #define CONFIG_PL011_SERIAL
  61. #define CONFIG_PL011_CLOCK 14745600
  62. #define CONFIG_PL01x_PORTS { (void *)CONFIG_SYS_SERIAL0, (void *)CONFIG_SYS_SERIAL1 }
  63. #define CONFIG_CONS_INDEX 0
  64. #define CONFIG_BAUDRATE 38400
  65. #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  66. #define CONFIG_SYS_SERIAL0 0x16000000
  67. #define CONFIG_SYS_SERIAL1 0x17000000
  68. /*
  69. * BOOTP options
  70. */
  71. #define CONFIG_BOOTP_BOOTFILESIZE
  72. #define CONFIG_BOOTP_BOOTPATH
  73. #define CONFIG_BOOTP_GATEWAY
  74. #define CONFIG_BOOTP_HOSTNAME
  75. /*
  76. * Command line configuration.
  77. */
  78. #define CONFIG_CMD_BDI
  79. #define CONFIG_CMD_DHCP
  80. #define CONFIG_CMD_SAVEENV
  81. #define CONFIG_CMD_FLASH
  82. #define CONFIG_CMD_IMI
  83. #define CONFIG_CMD_MEMORY
  84. #define CONFIG_CMD_NET
  85. #define CONFIG_CMD_PING
  86. #if 0
  87. #define CONFIG_BOOTDELAY 2
  88. #define CONFIG_BOOTARGS "root=/dev/nfs nfsroot=<IP address>:/<exported rootfs> mem=128M ip=dhcp netdev=27,0,0xfc800000,0xfc800010,eth0 video=clcdfb:0"
  89. #define CONFIG_BOOTCOMMAND "bootp ; bootm"
  90. #endif
  91. /* The kernel command line & boot command below are for a platform flashed with afu.axf
  92. Image 666 Block 0 End Block 0 address 0x24000000 exec 0x24000000- name u-boot
  93. Image 667 Block 1 End Block 13 address 0x24040000 exec 0x24040000- name u-linux
  94. Image 668 Block 14 End Block 33 address 0x24380000 exec 0x24380000- name rootfs
  95. SIB at Block62 End Block62 address 0x24f80000
  96. */
  97. #define CONFIG_BOOTDELAY 2
  98. #define CONFIG_BOOTARGS "root=/dev/mtdblock2 mem=128M ip=dhcp netdev=27,0,0xfc800000,0xfc800010,eth0 video=clcdfb:0 console=ttyAMA0"
  99. #define CONFIG_BOOTCOMMAND "cp 0x24080000 0x7fc0 0x100000; bootm"
  100. /*
  101. * Miscellaneous configurable options
  102. */
  103. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  104. #define CONFIG_SYS_PROMPT "Integrator-CP # " /* Monitor Command Prompt */
  105. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size*/
  106. /* Print Buffer Size */
  107. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
  108. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  109. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size*/
  110. #define CONFIG_SYS_LOAD_ADDR 0x7fc0 /* default load address */
  111. /*-----------------------------------------------------------------------
  112. * Stack sizes
  113. *
  114. * The stack sizes are set up in start.S using the settings below
  115. */
  116. #define CONFIG_STACKSIZE (128*1024) /* regular stack */
  117. #ifdef CONFIG_USE_IRQ
  118. #define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
  119. #define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
  120. #endif
  121. /*-----------------------------------------------------------------------
  122. * Physical Memory Map
  123. */
  124. #define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
  125. #define PHYS_SDRAM_1 0x00000000 /* SDRAM Bank #1 */
  126. #define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */
  127. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  128. #define CONFIG_SYS_INIT_RAM_SIZE PHYS_SDRAM_1_SIZE
  129. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_SDRAM_BASE + \
  130. CONFIG_SYS_INIT_RAM_SIZE - \
  131. GENERATED_GBL_DATA_SIZE)
  132. #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET
  133. /*-----------------------------------------------------------------------
  134. * FLASH and environment organization
  135. * Top varies according to amount fitted
  136. * Reserve top 4 blocks of flash
  137. * - ARM Boot Monitor
  138. * - Unused
  139. * - SIB block
  140. * - U-Boot environment
  141. *
  142. * Base is always 0x24000000
  143. */
  144. #define CONFIG_SYS_FLASH_BASE 0x24000000
  145. #define CONFIG_SYS_FLASH_CFI 1
  146. #define CONFIG_FLASH_CFI_DRIVER 1
  147. #define CONFIG_SYS_MAX_FLASH_SECT 64
  148. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
  149. #define PHYS_FLASH_SIZE 0x01000000 /* 16MB */
  150. #define CONFIG_SYS_FLASH_ERASE_TOUT (2*CONFIG_SYS_HZ) /* Timeout for Flash Erase */
  151. #define CONFIG_SYS_FLASH_WRITE_TOUT (2*CONFIG_SYS_HZ) /* Timeout for Flash Write */
  152. #define CONFIG_SYS_MONITOR_LEN 0x00100000
  153. #define CONFIG_ENV_IS_IN_FLASH 1
  154. /*
  155. * Move up the U-Boot & monitor area if more flash is fitted.
  156. * If this U-Boot is to be run on Integrators with varying flash sizes,
  157. * drivers/mtd/cfi_flash.c::flash_init() can read the Integrator CP_FLASHPROG
  158. * register and dynamically assign CONFIG_ENV_ADDR & CONFIG_SYS_MONITOR_BASE
  159. * - CONFIG_SYS_MONITOR_BASE is set to indicate that the environment is not
  160. * embedded in the boot monitor(s) area
  161. */
  162. #if ( PHYS_FLASH_SIZE == 0x04000000 )
  163. #define CONFIG_ENV_ADDR 0x27F00000
  164. #define CONFIG_SYS_MONITOR_BASE 0x27F40000
  165. #elif (PHYS_FLASH_SIZE == 0x02000000 )
  166. #define CONFIG_ENV_ADDR 0x25F00000
  167. #define CONFIG_SYS_MONITOR_BASE 0x25F40000
  168. #else
  169. #define CONFIG_ENV_ADDR 0x24F00000
  170. #define CONFIG_SYS_MONITOR_BASE 0x27F40000
  171. #endif
  172. #define CONFIG_ENV_SECT_SIZE 0x40000 /* 256KB */
  173. #define CONFIG_ENV_SIZE 8192 /* 8KB */
  174. /*-----------------------------------------------------------------------
  175. * CP control registers
  176. */
  177. #define CPCR_BASE 0xCB000000 /* CP Registers*/
  178. #define OS_FLASHPROG 0x00000004 /* Flash register*/
  179. #define CPMASK_EXTRABANK 0x8
  180. #define CPMASK_FLASHSIZE 0x4
  181. #define CPMASK_FLWREN 0x2
  182. #define CPMASK_FLVPPEN 0x1
  183. /*
  184. * The ARM boot monitor initializes the board.
  185. * However, the default U-Boot code also performs the initialization.
  186. * If desired, this can be prevented by defining SKIP_LOWLEVEL_INIT
  187. * - see documentation supplied with board for details of how to choose the
  188. * image to run at reset/power up
  189. * e.g. whether the ARM Boot Monitor runs before U-Boot
  190. #define CONFIG_SKIP_LOWLEVEL_INIT
  191. */
  192. /*
  193. * The ARM boot monitor does not relocate U-Boot.
  194. * However, the default U-Boot code performs the relocation check,
  195. * and may relocate the code if the memory map is changed.
  196. * If necessary this can be prevented by defining SKIP_RELOCATE_UBOOT
  197. #define SKIP_CONFIG_RELOCATE_UBOOT
  198. */
  199. /*-----------------------------------------------------------------------
  200. * There are various dependencies on the core module (CM) fitted
  201. * Users should refer to their CM user guide
  202. * - when porting adjust u-boot/Makefile accordingly
  203. * to define the necessary CONFIG_ s for the CM involved
  204. * see e.g. cp_926ejs_config
  205. */
  206. #include "armcoremodule.h"
  207. /*
  208. * If CONFIG_SKIP_LOWLEVEL_INIT is not defined &
  209. * the core module has a CM_INIT register
  210. * then the U-Boot initialisation code will
  211. * e.g. ARM Boot Monitor or pre-loader is repeated once
  212. * (to re-initialise any existing CM_INIT settings to safe values).
  213. *
  214. * This is usually not the desired behaviour since the platform
  215. * will either reboot into the ARM monitor (or pre-loader)
  216. * or continuously cycle thru it without U-Boot running,
  217. * depending upon the setting of Integrator/CP switch S2-4.
  218. *
  219. * However it may be needed if Integrator/CP switch S2-1
  220. * is set OFF to boot direct into U-Boot.
  221. * In that case comment out the line below.
  222. #undef CONFIG_CM_INIT
  223. */
  224. #endif /* __CONFIG_H */