adsvix.h 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. /*
  2. * (C) Copyright 2004
  3. * Robert Whaley, Applied Data Systems, Inc. rwhaley@applieddata.net
  4. *
  5. * (C) Copyright 2002
  6. * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
  7. *
  8. * (C) Copyright 2002
  9. * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  10. * Marius Groeger <mgroeger@sysgo.de>
  11. *
  12. * Configuation settings for the LUBBOCK board.
  13. *
  14. * See file CREDITS for list of people who contributed to this
  15. * project.
  16. *
  17. * This program is free software; you can redistribute it and/or
  18. * modify it under the terms of the GNU General Public License as
  19. * published by the Free Software Foundation; either version 2 of
  20. * the License, or (at your option) any later version.
  21. *
  22. * This program is distributed in the hope that it will be useful,
  23. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  24. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  25. * GNU General Public License for more details.
  26. *
  27. * You should have received a copy of the GNU General Public License
  28. * along with this program; if not, write to the Free Software
  29. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  30. * MA 02111-1307 USA
  31. */
  32. #ifndef __CONFIG_H
  33. #define __CONFIG_H
  34. /*
  35. * High Level Configuration Options
  36. * (easy to change)
  37. */
  38. #define CONFIG_PXA27X 1 /* This is an PXA27x CPU */
  39. #define CONFIG_ADSVIX 1 /* on a Adsvix Board */
  40. #define CONFIG_MMC 1
  41. #define BOARD_LATE_INIT 1
  42. #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
  43. #define RTC
  44. /*
  45. * Size of malloc() pool
  46. */
  47. #define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
  48. #define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
  49. /*
  50. * Hardware drivers
  51. */
  52. /*
  53. * select serial console configuration
  54. */
  55. #define CONFIG_FFUART 1 /* we use FFUART on ADSVIX */
  56. /* allow to overwrite serial and ethaddr */
  57. #define CONFIG_ENV_OVERWRITE
  58. #define CONFIG_BAUDRATE 38400
  59. #define CONFIG_DOS_PARTITION 1
  60. /*
  61. * BOOTP options
  62. */
  63. #define CONFIG_BOOTP_BOOTFILESIZE
  64. #define CONFIG_BOOTP_BOOTPATH
  65. #define CONFIG_BOOTP_GATEWAY
  66. #define CONFIG_BOOTP_HOSTNAME
  67. /*
  68. * Command line configuration.
  69. */
  70. #include <config_cmd_default.h>
  71. #define CONFIG_CMD_FAT
  72. #define CONFIG_CMD_IDE
  73. #define CONFIG_CMD_MMC
  74. #define CONFIG_CMD_PCMCIA
  75. #undef CONFIG_CMD_NET
  76. #undef CONFIG_SHOW_BOOT_PROGRESS
  77. #define CONFIG_BOOTDELAY 3
  78. #define CONFIG_SERVERIP 192.168.1.99
  79. #define CONFIG_BOOTCOMMAND "run boot_flash"
  80. #define CONFIG_BOOTARGS "console=ttyS0,38400 ramdisk_size=12288"\
  81. " rw root=/dev/ram initrd=0xa0800000,5m"
  82. #define CONFIG_EXTRA_ENV_SETTINGS \
  83. "program_boot_cf=" \
  84. "mw.b 0xa0010000 0xff 0x20000; " \
  85. "if pinit on && " \
  86. "ide reset && " \
  87. "fatload ide 0 0xa0010000 u-boot.bin; " \
  88. "then " \
  89. "protect off 0x0 0x1ffff; " \
  90. "erase 0x0 0x1ffff; " \
  91. "cp.b 0xa0010000 0x0 0x20000; " \
  92. "fi\0" \
  93. "program_uzImage_cf=" \
  94. "mw.b 0xa0010000 0xff 0x180000; " \
  95. "if pinit on && " \
  96. "ide reset && " \
  97. "fatload ide 0 0xa0010000 uzImage; " \
  98. "then " \
  99. "protect off 0x40000 0x1bffff; " \
  100. "erase 0x40000 0x1bffff; " \
  101. "cp.b 0xa0010000 0x40000 0x180000; " \
  102. "fi\0" \
  103. "program_ramdisk_cf=" \
  104. "mw.b 0xa0010000 0xff 0x500000; " \
  105. "if pinit on && " \
  106. "ide reset && " \
  107. "fatload ide 0 0xa0010000 ramdisk.gz; " \
  108. "then " \
  109. "protect off 0x1c0000 0x6bffff; " \
  110. "erase 0x1c0000 0x6bffff; " \
  111. "cp.b 0xa0010000 0x1c0000 0x500000; " \
  112. "fi\0" \
  113. "boot_cf=" \
  114. "if pinit on && " \
  115. "ide reset && " \
  116. "fatload ide 0 0xa0030000 uzImage && " \
  117. "fatload ide 0 0xa0800000 ramdisk.gz; " \
  118. "then " \
  119. "bootm 0xa0030000; " \
  120. "fi\0" \
  121. "program_boot_mmc=" \
  122. "mw.b 0xa0010000 0xff 0x20000; " \
  123. "if mmcinit && " \
  124. "fatload mmc 0 0xa0010000 u-boot.bin; " \
  125. "then " \
  126. "protect off 0x0 0x1ffff; " \
  127. "erase 0x0 0x1ffff; " \
  128. "cp.b 0xa0010000 0x0 0x20000; " \
  129. "fi\0" \
  130. "program_uzImage_mmc=" \
  131. "mw.b 0xa0010000 0xff 0x180000; " \
  132. "if mmcinit && " \
  133. "fatload mmc 0 0xa0010000 uzImage; " \
  134. "then " \
  135. "protect off 0x40000 0x1bffff; " \
  136. "erase 0x40000 0x1bffff; " \
  137. "cp.b 0xa0010000 0x40000 0x180000; " \
  138. "fi\0" \
  139. "program_ramdisk_mmc=" \
  140. "mw.b 0xa0010000 0xff 0x500000; " \
  141. "if mmcinit && " \
  142. "fatload mmc 0 0xa0010000 ramdisk.gz; " \
  143. "then " \
  144. "protect off 0x1c0000 0x6bffff; " \
  145. "erase 0x1c0000 0x6bffff; " \
  146. "cp.b 0xa0010000 0x1c0000 0x500000; " \
  147. "fi\0" \
  148. "boot_mmc=" \
  149. "if mmcinit && " \
  150. "fatload mmc 0 0xa0030000 uzImage && " \
  151. "fatload mmc 0 0xa0800000 ramdisk.gz; " \
  152. "then " \
  153. "bootm 0xa0030000; " \
  154. "fi\0" \
  155. "boot_flash=" \
  156. "cp.b 0x1c0000 0xa0800000 0x500000; " \
  157. "bootm 0x40000\0" \
  158. #define CONFIG_SETUP_MEMORY_TAGS 1
  159. #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
  160. /* #define CONFIG_INITRD_TAG 1 */
  161. #if defined(CONFIG_CMD_KGDB)
  162. #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
  163. #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
  164. #endif
  165. /*
  166. * Miscellaneous configurable options
  167. */
  168. #define CFG_HUSH_PARSER 1
  169. #define CFG_PROMPT_HUSH_PS2 "> "
  170. #define CFG_LONGHELP /* undef to save memory */
  171. #ifdef CFG_HUSH_PARSER
  172. #define CFG_PROMPT "$ " /* Monitor Command Prompt */
  173. #else
  174. #define CFG_PROMPT "=> " /* Monitor Command Prompt */
  175. #endif
  176. #define CFG_CBSIZE 256 /* Console I/O Buffer Size */
  177. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
  178. #define CFG_MAXARGS 16 /* max number of command args */
  179. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  180. #define CFG_DEVICE_NULLDEV 1
  181. #define CFG_MEMTEST_START 0xa0400000 /* memtest works on */
  182. #define CFG_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */
  183. #undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */
  184. #define CFG_LOAD_ADDR 0xa1000000 /* default load address */
  185. #define CFG_HZ 3686400 /* incrementer freq: 3.6864 MHz */
  186. #define CFG_CPUSPEED 0x207 /* need to look more closely, I think this is Turbo = 2x, L=91Mhz */
  187. /* valid baudrates */
  188. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  189. #define CFG_MMC_BASE 0xF0000000
  190. /*
  191. * Stack sizes
  192. *
  193. * The stack sizes are set up in start.S using the settings below
  194. */
  195. #define CONFIG_STACKSIZE (128*1024) /* regular stack */
  196. #ifdef CONFIG_USE_IRQ
  197. #define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
  198. #define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
  199. #endif
  200. /*
  201. * Physical Memory Map
  202. */
  203. #define CONFIG_NR_DRAM_BANKS 4 /* we have 2 banks of DRAM */
  204. #define PHYS_SDRAM_1 0xa0000000 /* SDRAM Bank #1 */
  205. #define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */
  206. #define PHYS_SDRAM_2 0xa4000000 /* SDRAM Bank #2 */
  207. #define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 MB */
  208. #define PHYS_SDRAM_3 0xa8000000 /* SDRAM Bank #3 */
  209. #define PHYS_SDRAM_3_SIZE 0x00000000 /* 0 MB */
  210. #define PHYS_SDRAM_4 0xac000000 /* SDRAM Bank #4 */
  211. #define PHYS_SDRAM_4_SIZE 0x00000000 /* 0 MB */
  212. #define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */
  213. #define CFG_DRAM_BASE 0xa0000000
  214. #define CFG_DRAM_SIZE 0x04000000
  215. #define CFG_FLASH_BASE PHYS_FLASH_1
  216. /*
  217. * GPIO settings
  218. */
  219. #define CFG_GPSR0_VAL 0x00018004
  220. #define CFG_GPSR1_VAL 0x004F0080
  221. #define CFG_GPSR2_VAL 0x13EFC000
  222. #define CFG_GPSR3_VAL 0x0006E032
  223. #define CFG_GPCR0_VAL 0x084AFE1A
  224. #define CFG_GPCR1_VAL 0x003003F2
  225. #define CFG_GPCR2_VAL 0x0C014000
  226. #define CFG_GPCR3_VAL 0x00000C00
  227. #define CFG_GPDR0_VAL 0xCBC3BFFC
  228. #define CFG_GPDR1_VAL 0x00FFABF3
  229. #define CFG_GPDR2_VAL 0x1EEFFC00
  230. #define CFG_GPDR3_VAL 0x0187EC32
  231. #define CFG_GAFR0_L_VAL 0x84400000
  232. #define CFG_GAFR0_U_VAL 0xA51A8010
  233. #define CFG_GAFR1_L_VAL 0x699A955A
  234. #define CFG_GAFR1_U_VAL 0x0005A0AA
  235. #define CFG_GAFR2_L_VAL 0x40000000
  236. #define CFG_GAFR2_U_VAL 0x0109A400
  237. #define CFG_GAFR3_L_VAL 0x54000000
  238. #define CFG_GAFR3_U_VAL 0x00001409
  239. #define CFG_PSSR_VAL 0x20
  240. /*
  241. * Clock settings
  242. */
  243. #define CFG_CKEN 0x00400200
  244. #define CFG_CCCR 0x02000290 /* 520Mhz */
  245. /* #define CFG_CCCR 0x02000210 416 Mhz */
  246. /*
  247. * Memory settings
  248. */
  249. #define CFG_MSC0_VAL 0x23F2B3DB
  250. #define CFG_MSC1_VAL 0x0000CCD1
  251. #define CFG_MSC2_VAL 0x0000B884
  252. #define CFG_MDCNFG_VAL 0x08000AC8
  253. #define CFG_MDREFR_VAL 0x0000001E
  254. #define CFG_MDMRS_VAL 0x00000000
  255. #define CFG_FLYCNFG_VAL 0x00010001
  256. #define CFG_SXCNFG_VAL 0x40044004
  257. /*
  258. * PCMCIA and CF Interfaces
  259. */
  260. #define CFG_MECR_VAL 0x00000002
  261. #define CFG_MCMEM0_VAL 0x00004204
  262. #define CFG_MCMEM1_VAL 0x00000000
  263. #define CFG_MCATT0_VAL 0x00010504
  264. #define CFG_MCATT1_VAL 0x00000000
  265. #define CFG_MCIO0_VAL 0x00008407
  266. #define CFG_MCIO1_VAL 0x00000000
  267. #define CONFIG_PXA_PCMCIA 1
  268. #define CONFIG_PXA_IDE 1
  269. #define CONFIG_PCMCIA_SLOT_A 1
  270. /* just to keep build system happy */
  271. #define CFG_PCMCIA_MEM_ADDR 0x28000000
  272. #define CFG_PCMCIA_MEM_SIZE 0x04000000
  273. #define CFG_IDE_MAXBUS 1
  274. /* max. 1 IDE bus */
  275. #define CFG_IDE_MAXDEVICE 1
  276. /* max. 1 drive per IDE bus */
  277. #define CFG_ATA_IDE0_OFFSET 0x0000
  278. #define CFG_ATA_BASE_ADDR 0x20000000
  279. /* Offset for data I/O */
  280. #define CFG_ATA_DATA_OFFSET 0x1f0
  281. /* Offset for normal register accesses */
  282. #define CFG_ATA_REG_OFFSET 0x1f0
  283. /* Offset for alternate registers */
  284. #define CFG_ATA_ALT_OFFSET 0x3f0
  285. /*
  286. * FLASH and environment organization
  287. */
  288. #define CFG_FLASH_CFI
  289. #define CFG_FLASH_CFI_DRIVER 1
  290. #define CFG_MONITOR_BASE 0
  291. #define CFG_MONITOR_LEN 0x20000
  292. #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
  293. #define CFG_MAX_FLASH_SECT 4 + 255 /* max number of sectors on one chip */
  294. /* timeout values are in ticks */
  295. #define CFG_FLASH_ERASE_TOUT (25*CFG_HZ) /* Timeout for Flash Erase */
  296. #define CFG_FLASH_WRITE_TOUT (25*CFG_HZ) /* Timeout for Flash Write */
  297. /* write flash less slowly */
  298. #define CFG_FLASH_USE_BUFFER_WRITE 1
  299. /* Flash environment locations */
  300. #define CFG_ENV_IS_IN_FLASH 1
  301. #define CFG_ENV_ADDR (PHYS_FLASH_1 + CFG_MONITOR_LEN) /* Addr of Environment Sector */
  302. #define CFG_ENV_SIZE 0x20000 /* Total Size of Environment */
  303. #define CFG_ENV_SECT_SIZE 0x20000 /* Total Size of Environment Sector */
  304. #endif /* __CONFIG_H */