actux2.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. /*
  2. * (C) Copyright 2007
  3. * Michael Schwingen, michael@schwingen.org
  4. *
  5. * Configuration settings for the AcTux-2 board.
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. #ifndef __CONFIG_H
  26. #define __CONFIG_H
  27. #define CONFIG_IXP425 1
  28. #define CONFIG_ACTUX2 1
  29. #define CONFIG_DISPLAY_CPUINFO 1
  30. #define CONFIG_DISPLAY_BOARDINFO 1
  31. #define CFG_IXP425_CONSOLE IXP425_UART2
  32. #define CONFIG_BAUDRATE 115200
  33. #define CONFIG_BOOTDELAY 5
  34. #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */
  35. /***************************************************************
  36. * U-boot generic defines start here.
  37. ***************************************************************/
  38. #undef CONFIG_USE_IRQ
  39. /* Size of malloc() pool */
  40. #define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
  41. /* size in bytes reserved for initial data */
  42. #define CFG_GBL_DATA_SIZE 128
  43. /* allow to overwrite serial and ethaddr */
  44. #define CONFIG_ENV_OVERWRITE
  45. /* Command line configuration. */
  46. #include <config_cmd_default.h>
  47. #define CONFIG_CMD_ELF
  48. #undef CONFIG_CMD_PCI
  49. #undef CONFIG_PCI
  50. #define CONFIG_BOOTCOMMAND "run boot_flash"
  51. /* enable passing of ATAGs */
  52. #define CONFIG_CMDLINE_TAG 1
  53. #define CONFIG_SETUP_MEMORY_TAGS 1
  54. #define CONFIG_INITRD_TAG 1
  55. #define CONFIG_REVISION_TAG 1
  56. #if defined(CONFIG_CMD_KGDB)
  57. # define CONFIG_KGDB_BAUDRATE 230400
  58. /* which serial port to use */
  59. # define CONFIG_KGDB_SER_INDEX 1
  60. #endif
  61. /* Miscellaneous configurable options */
  62. #define CFG_LONGHELP
  63. #define CFG_PROMPT "=> "
  64. /* Console I/O Buffer Size */
  65. #define CFG_CBSIZE 256
  66. /* Print Buffer Size */
  67. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16)
  68. /* max number of command args */
  69. #define CFG_MAXARGS 16
  70. /* Boot Argument Buffer Size */
  71. #define CFG_BARGSIZE CFG_CBSIZE
  72. #define CFG_MEMTEST_START 0x00400000
  73. #define CFG_MEMTEST_END 0x00800000
  74. /* everything, incl board info, in Hz */
  75. #undef CFG_CLKS_IN_HZ
  76. /* spec says 66.666 MHz, but it appears to be 33 */
  77. #define CFG_HZ 3333333
  78. /* default load address */
  79. #define CFG_LOAD_ADDR 0x00010000
  80. /* valid baudrates */
  81. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, \
  82. 115200, 230400 }
  83. #define CONFIG_SERIAL_RTS_ACTIVE 1
  84. /*
  85. * Stack sizes
  86. * The stack sizes are set up in start.S using the settings below
  87. */
  88. #define CONFIG_STACKSIZE (128*1024) /* regular stack */
  89. #ifdef CONFIG_USE_IRQ
  90. # define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
  91. # define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
  92. #endif
  93. /* Expansion bus settings */
  94. #define CFG_EXP_CS0 0xbd113042
  95. /* SDRAM settings */
  96. #define CONFIG_NR_DRAM_BANKS 1
  97. #define PHYS_SDRAM_1 0x00000000
  98. #define CFG_DRAM_BASE 0x00000000
  99. /* 16MB SDRAM */
  100. #define CFG_SDR_CONFIG 0x3A
  101. #define PHYS_SDRAM_1_SIZE 0x01000000
  102. #define CFG_SDRAM_REFRESH_CNT 0x81a
  103. #define CFG_SDR_MODE_CONFIG 0x1
  104. #define CFG_DRAM_SIZE 0x01000000
  105. /* FLASH organization */
  106. #define CFG_MAX_FLASH_BANKS 1
  107. /* max number of sectors on one chip */
  108. #define CFG_MAX_FLASH_SECT 140
  109. #define PHYS_FLASH_1 0x50000000
  110. #define CFG_FLASH_BANKS_LIST { PHYS_FLASH_1 }
  111. #define CFG_FLASH_BASE PHYS_FLASH_1
  112. #define CFG_MONITOR_BASE PHYS_FLASH_1
  113. #define CFG_MONITOR_LEN (256 << 10)
  114. /* Use common CFI driver */
  115. #define CFG_FLASH_CFI
  116. #define CONFIG_FLASH_CFI_DRIVER
  117. /* no byte writes on IXP4xx */
  118. #define CFG_FLASH_CFI_WIDTH FLASH_CFI_16BIT
  119. /* print 'E' for empty sector on flinfo */
  120. #define CFG_FLASH_EMPTY_INFO
  121. /* Ethernet */
  122. /* include IXP4xx NPE support */
  123. #define CONFIG_IXP4XX_NPE 1
  124. /* use separate flash sector with ucode images */
  125. #define CONFIG_IXP4XX_NPE_EXT_UCODE_BASE 0x50040000
  126. #define CONFIG_NET_MULTI 1
  127. /* NPE0 PHY address */
  128. #define CONFIG_PHY_ADDR 0x00
  129. /* MII PHY management */
  130. #define CONFIG_MII 1
  131. /* Number of ethernet rx buffers & descriptors */
  132. #define CFG_RX_ETH_BUFFER 16
  133. #define CONFIG_RESET_PHY_R 1
  134. /* ethernet switch connected to MII port */
  135. #define CONFIG_MII_ETHSWITCH 1
  136. #define CONFIG_CMD_DHCP
  137. #define CONFIG_CMD_NET
  138. #define CONFIG_CMD_MII
  139. #define CONFIG_CMD_PING
  140. #undef CONFIG_CMD_NFS
  141. /* BOOTP options */
  142. #define CONFIG_BOOTP_BOOTFILESIZE
  143. #define CONFIG_BOOTP_BOOTPATH
  144. #define CONFIG_BOOTP_GATEWAY
  145. #define CONFIG_BOOTP_HOSTNAME
  146. /* Cache Configuration */
  147. #define CFG_CACHELINE_SIZE 32
  148. /*
  149. * environment organization:
  150. * one flash sector, embedded in uboot area (bottom bootblock flash)
  151. */
  152. #define CFG_ENV_IS_IN_FLASH 1
  153. #define CFG_ENV_SIZE 0x2000
  154. #define CFG_ENV_ADDR (PHYS_FLASH_1 + 0x4000)
  155. #define CFG_USE_PPCENV 1
  156. #define CONFIG_EXTRA_ENV_SETTINGS \
  157. "mtd=IXP4XX-Flash.0:256k(uboot),64k(ucode),1152k(linux),-(root)\0" \
  158. "kerneladdr=50050000\0" \
  159. "rootaddr=50170000\0" \
  160. "loadaddr=10000\0" \
  161. "updateboot_ser=mw.b 10000 ff 40000;" \
  162. " loady ${loadaddr};" \
  163. " run eraseboot writeboot\0" \
  164. "updateboot_net=mw.b 10000 ff 40000;" \
  165. " tftp ${loadaddr} u-boot.bin;" \
  166. " run eraseboot writeboot\0" \
  167. "eraseboot=protect off 50000000 50003fff;" \
  168. " protect off 50006000 5003ffff;" \
  169. " erase 50000000 50003fff;" \
  170. " erase 50006000 5003ffff\0" \
  171. "writeboot=cp.b 10000 50000000 4000;" \
  172. " cp.b 16000 50006000 3a000\0" \
  173. "eraseenv=protect off 50004000 50005fff;" \
  174. " erase 50004000 50005fff\0" \
  175. "updateroot=tftp ${loadaddr} ${rootfile};" \
  176. " era ${rootaddr} +${filesize};" \
  177. " cp.b ${loadaddr} ${rootaddr} ${filesize}\0" \
  178. "updatekern=tftp ${loadaddr} ${kernelfile};" \
  179. " era ${kerneladdr} +${filesize};" \
  180. " cp.b ${loadaddr} ${kerneladdr} ${filesize}\0" \
  181. "flashargs=setenv bootargs mtdparts=${mtd} root=/dev/mtdblock3" \
  182. " rootfstype=squashfs,jffs2 init=/etc/preinit\0" \
  183. "netargs=setenv bootargs mtdparts=${mtd} root=/dev/mtdblock3" \
  184. " rootfstype=squashfs,jffs2 init=/etc/preinit\0" \
  185. "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0" \
  186. "addeth=setenv bootargs ${bootargs} ethaddr=${ethaddr}\0" \
  187. "boot_flash=run flashargs addtty addeth;" \
  188. " bootm ${kerneladdr}\0" \
  189. "boot_net=run netargs addtty addeth;" \
  190. " tftpboot ${loadaddr} ${kernelfile};" \
  191. " bootm\0"
  192. #endif /* __CONFIG_H */