snowball.h 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. /*
  2. * Copyright (C) ST-Ericsson SA 2009
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #ifndef __CONFIG_H
  23. #define __CONFIG_H
  24. /*
  25. * #define DEBUG 1
  26. */
  27. #define CONFIG_SKIP_LOWLEVEL_INIT
  28. #define CONFIG_SNOWBALL
  29. #define CONFIG_SYS_ICACHE_OFF
  30. #define CONFIG_SYS_DCACHE_OFF
  31. /*
  32. * High Level Configuration Options
  33. * (easy to change)
  34. */
  35. #define CONFIG_U8500
  36. #define CONFIG_L2_OFF
  37. #define CONFIG_SYS_MEMTEST_START 0x00000000
  38. #define CONFIG_SYS_MEMTEST_END 0x1FFFFFFF
  39. #define CONFIG_SYS_HZ 1000 /* must be 1000 */
  40. /*-----------------------------------------------------------------------
  41. * Size of environment and malloc() pool
  42. */
  43. /*
  44. * If you use U-Boot as crash kernel, make sure that it does not overwrite
  45. * information saved by kexec during panic. Kexec expects the start
  46. * address of the executable 32K above "crashkernel" address.
  47. */
  48. /*
  49. * Size of malloc() pool
  50. */
  51. #define CONFIG_ENV_SIZE (8*1024)
  52. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 256*1024)
  53. #define CONFIG_SYS_GBL_DATA_SIZE 128 /* for initial data */
  54. #define CONFIG_ENV_IS_IN_MMC
  55. #define CONFIG_CMD_ENV
  56. #define CONFIG_CMD_SAVEENV
  57. #define CONFIG_ENV_OFFSET 0x0118000
  58. #define CONFIG_SYS_MMC_ENV_DEV 0 /* SLOT2: eMMC */
  59. /*
  60. * PL011 Configuration
  61. */
  62. #define CONFIG_PL011_SERIAL
  63. #define CONFIG_PL011_SERIAL_RLCR
  64. #define CONFIG_PL011_SERIAL_FLUSH_ON_INIT
  65. /*
  66. * U8500 UART registers base for 3 serial devices
  67. */
  68. #define CFG_UART0_BASE 0x80120000
  69. #define CFG_UART1_BASE 0x80121000
  70. #define CFG_UART2_BASE 0x80007000
  71. #define CFG_SERIAL0 CFG_UART0_BASE
  72. #define CFG_SERIAL1 CFG_UART1_BASE
  73. #define CFG_SERIAL2 CFG_UART2_BASE
  74. #define CONFIG_PL011_CLOCK 38400000
  75. #define CONFIG_PL01x_PORTS { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1, \
  76. (void *)CFG_SERIAL2 }
  77. #define CONFIG_CONS_INDEX 2
  78. #define CONFIG_BAUDRATE 115200
  79. /*
  80. * Devices and file systems
  81. */
  82. #define CONFIG_MMC
  83. #define CONFIG_GENERIC_MMC
  84. #define CONFIG_DOS_PARTITION
  85. /*
  86. * Commands
  87. */
  88. #define CONFIG_CMD_MEMORY
  89. #define CONFIG_CMD_BOOTD
  90. #define CONFIG_CMD_BDI
  91. #define CONFIG_CMD_IMI
  92. #define CONFIG_CMD_MISC
  93. #define CONFIG_CMD_RUN
  94. #define CONFIG_CMD_ECHO
  95. #define CONFIG_CMD_CONSOLE
  96. #define CONFIG_CMD_LOADS
  97. #define CONFIG_CMD_LOADB
  98. #define CONFIG_CMD_MMC
  99. #define CONFIG_CMD_FAT
  100. #define CONFIG_CMD_EXT2
  101. #define CONFIG_CMD_SOURCE
  102. #ifndef CONFIG_BOOTDELAY
  103. #define CONFIG_BOOTDELAY 1
  104. #endif
  105. #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */
  106. #undef CONFIG_BOOTARGS
  107. #define CONFIG_BOOTCOMMAND \
  108. "mmc dev 1; " \
  109. "if run loadbootscript; " \
  110. "then run bootscript; " \
  111. "else " \
  112. "if run mmcload; " \
  113. "then run mmcboot; " \
  114. "else " \
  115. "mmc dev 0; " \
  116. "if run emmcloadbootscript; " \
  117. "then run bootscript; " \
  118. "else " \
  119. "if run emmcload; " \
  120. "then run emmcboot; " \
  121. "else " \
  122. "echo No media to boot from; " \
  123. "fi; " \
  124. "fi; " \
  125. "fi; " \
  126. "fi; "
  127. #define CONFIG_EXTRA_ENV_SETTINGS \
  128. "verify=n\0" \
  129. "loadaddr=0x00100000\0" \
  130. "console=ttyAMA2,115200n8\0" \
  131. "loadbootscript=fatload mmc 1:1 ${loadaddr} boot.scr\0" \
  132. "emmcloadbootscript=fatload mmc 0:2 ${loadaddr} boot.scr\0" \
  133. "bootscript=echo Running bootscript " \
  134. "from mmc ...; source ${loadaddr}\0" \
  135. "memargs256=mem=96M@0 mem_modem=32M@96M mem=32M@128M " \
  136. "hwmem=22M@160M pmem_hwb=42M@182M mem_mali=32@224M\0" \
  137. "memargs512=mem=96M@0 mem_modem=32M@96M hwmem=32M@128M " \
  138. "mem=64M@160M mem_mali=32M@224M " \
  139. "pmem_hwb=128M@256M mem=128M@384M\0" \
  140. "memargs1024=mem=128M@0 mali.mali_mem=32M@128M " \
  141. "hwmem=168M@M160M mem=48M@328M " \
  142. "mem_issw=1M@383M mem=640M@384M\0" \
  143. "memargs=setenv bootargs ${bootargs} ${memargs1024}\0" \
  144. "emmcload=fatload mmc 0:2 ${loadaddr} uImage\0" \
  145. "mmcload=fatload mmc 1:1 ${loadaddr} uImage\0" \
  146. "commonargs=setenv bootargs console=${console} " \
  147. "vmalloc=300M\0" \
  148. "emmcargs=setenv bootargs ${bootargs} " \
  149. "root=/dev/mmcblk0p3 " \
  150. "rootwait\0" \
  151. "addcons=setenv bootargs ${bootargs} " \
  152. "console=${console}\0" \
  153. "emmcboot=echo Booting from eMMC ...; " \
  154. "run commonargs emmcargs memargs; " \
  155. "bootm ${loadaddr}\0" \
  156. "mmcargs=setenv bootargs ${bootargs} " \
  157. "root=/dev/mmcblk1p2 " \
  158. "rootwait earlyprintk\0" \
  159. "mmcboot=echo Booting from external MMC ...; " \
  160. "run commonargs mmcargs memargs; " \
  161. "bootm ${loadaddr}\0" \
  162. "fdt_high=0x2BC00000\0" \
  163. "stdout=serial,usbtty\0" \
  164. "stdin=serial,usbtty\0" \
  165. "stderr=serial,usbtty\0"
  166. /*-----------------------------------------------------------------------
  167. * Miscellaneous configurable options
  168. */
  169. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  170. #define CONFIG_SYS_PROMPT "U8500 $ " /* Monitor Command Prompt */
  171. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  172. /* Print Buffer Size */
  173. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \
  174. + sizeof(CONFIG_SYS_PROMPT) + 16)
  175. #define CONFIG_SYS_MAXARGS 32 /* max number of command args */
  176. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Arg Buffer Size */
  177. #undef CONFIG_SYS_CLKS_IN_HZ /* everything, incl board info, in Hz */
  178. #define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */
  179. #define CONFIG_SYS_LOADS_BAUD_CHANGE 1
  180. #define CONFIG_SYS_HUSH_PARSER 1
  181. #define CONFIG_CMDLINE_EDITING
  182. #define CONFIG_SETUP_MEMORY_TAGS 2
  183. #define CONFIG_INITRD_TAG 1
  184. #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
  185. /*
  186. * Physical Memory Map
  187. */
  188. #define CONFIG_NR_DRAM_BANKS 1
  189. #define PHYS_SDRAM_1 0x00000000 /* DDR-SDRAM Bank #1 */
  190. /*
  191. * additions for new relocation code
  192. */
  193. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  194. #define CONFIG_SYS_MAX_RAM_SIZE 0x40000000
  195. #define CONFIG_SYS_INIT_RAM_SIZE 0x100000
  196. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_SDRAM_BASE + \
  197. CONFIG_SYS_INIT_RAM_SIZE - \
  198. GENERATED_GBL_DATA_SIZE)
  199. #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET
  200. /* landing address before relocation */
  201. #ifndef CONFIG_SYS_TEXT_BASE
  202. #define CONFIG_SYS_TEXT_BASE 0x0
  203. #endif
  204. /*
  205. * FLASH and environment organization
  206. */
  207. #define CONFIG_SYS_NO_FLASH
  208. /*
  209. * base register values for U8500
  210. */
  211. #define CFG_PRCMU_BASE 0x80157000 /* Power, reset and clock */
  212. /*
  213. * U8500 GPIO register base for 9 banks
  214. */
  215. #define CONFIG_DB8500_GPIO
  216. #define CFG_GPIO_0_BASE 0x8012E000
  217. #define CFG_GPIO_1_BASE 0x8012E080
  218. #define CFG_GPIO_2_BASE 0x8000E000
  219. #define CFG_GPIO_3_BASE 0x8000E080
  220. #define CFG_GPIO_4_BASE 0x8000E100
  221. #define CFG_GPIO_5_BASE 0x8000E180
  222. #define CFG_GPIO_6_BASE 0x8011E000
  223. #define CFG_GPIO_7_BASE 0x8011E080
  224. #define CFG_GPIO_8_BASE 0xA03FE000
  225. #define CFG_FSMC_BASE 0x80000000 /* FSMC Controller */
  226. #endif /* __CONFIG_H */