common.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /*
  2. * (C) Copyright 2009
  3. * Heiko Schocher, DENX Software Engineering, hs@denx.de.
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #ifndef __MANROLAND_COMMON_H
  24. #define __MANROLAND_COMMON_H
  25. /*
  26. * High Level Configuration Options
  27. * (easy to change)
  28. */
  29. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  30. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  31. #define CONFIG_BOARD_EARLY_INIT_R
  32. /* Partitions */
  33. #define CONFIG_DOS_PARTITION
  34. /*
  35. * Command line configuration.
  36. */
  37. #include <config_cmd_default.h>
  38. #define CONFIG_CMD_DATE
  39. #define CONFIG_CMD_DISPLAY
  40. #define CONFIG_CMD_DHCP
  41. #define CONFIG_CMD_PING
  42. #define CONFIG_CMD_EEPROM
  43. #define CONFIG_CMD_I2C
  44. #define CONFIG_CMD_DTT
  45. #define CONFIG_CMD_IDE
  46. #define CONFIG_CMD_FAT
  47. #define CONFIG_CMD_NFS
  48. #define CONFIG_CMD_MII
  49. #define CONFIG_CMD_SNTP
  50. /*
  51. * 8-symbol LED display (can be accessed with 'display' command)
  52. */
  53. #define CONFIG_PDSP188x
  54. #define CONFIG_TIMESTAMP 1 /* Print image info with timestamp */
  55. /*
  56. * Autobooting
  57. */
  58. #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
  59. #define CONFIG_PREBOOT "echo;" \
  60. "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \
  61. "echo"
  62. #undef CONFIG_BOOTARGS
  63. #define xstr(s) str(s)
  64. #define str(s) #s
  65. #define CONFIG_EXTRA_ENV_SETTINGS \
  66. "netdev=eth0\0" \
  67. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  68. "nfsroot=${serverip}:${rootpath}\0" \
  69. "ramargs=setenv bootargs root=/dev/ram rw\0" \
  70. "addwdt=setenv bootargs ${bootargs} wdt=off\0" \
  71. "logval=4\0" \
  72. "addlog=setenv bootargs ${bootargs} loglevel=${logval}\0" \
  73. "addip=setenv bootargs ${bootargs} " \
  74. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
  75. ":${hostname}:${netdev}:off panic=1\0" \
  76. "kernel_addr=ff810000\0" \
  77. "fdt_addr="xstr(CONFIG_SYS_FLASH_BASE)"\0" \
  78. "flash_nfs=run nfsargs addip addcon addwdt addlog;" \
  79. "bootm ${kernel_addr} - ${fdt_addr}\0" \
  80. "rootpath=/opt/eldk/ppc_82xx\0" \
  81. "kernel_addr_r=300000\0" \
  82. "fdt_addr_r=200000\0" \
  83. "fdt_file=" xstr(CONFIG_HOSTNAME) "/" \
  84. xstr(CONFIG_HOSTNAME) ".dtb\0" \
  85. "kernel_file=" xstr(CONFIG_HOSTNAME) "/uImage \0" \
  86. "load_fdt=tftp ${fdt_addr_r} ${fdt_file};\0" \
  87. "load_kernel=tftp ${kernel_addr_r} ${kernel_file};\0" \
  88. "addcon=setenv bootargs ${bootargs} console=ttyPSC0,${baudrate}\0"\
  89. "net_nfs=run load_fdt load_kernel; " \
  90. "run nfsargs addip addcon addwdt addlog;" \
  91. "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \
  92. "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0" \
  93. "u-boot_addr_r=200000\0" \
  94. "load=tftp ${u-boot_addr_r} ${u-boot}\0" \
  95. "update=protect off " xstr(TEXT_BASE) " +${filesize};" \
  96. "erase " xstr(TEXT_BASE) " +${filesize};" \
  97. "cp.b ${u-boot_addr_r} " xstr(TEXT_BASE) \
  98. " ${filesize};" \
  99. "protect on " xstr(TEXT_BASE) " +${filesize}\0" \
  100. ""
  101. #define CONFIG_BOOTCOMMAND "run net_nfs"
  102. #define CONFIG_MISC_INIT_R 1
  103. /*
  104. * Miscellaneous configurable options
  105. */
  106. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  107. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  108. #if defined(CONFIG_CMD_KGDB)
  109. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  110. #else
  111. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  112. #endif
  113. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
  114. #define CONFIG_SYS_MAXARGS 16 /* max number of command args*/
  115. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  116. #define CONFIG_CMDLINE_EDITING 1 /* add command line history */
  117. #define CONFIG_AUTO_COMPLETE /* add autocompletion support */
  118. /* Enable an alternate, more extensive memory test */
  119. #define CONFIG_SYS_ALT_MEMTEST
  120. /*
  121. * Enable loopw command.
  122. */
  123. #define CONFIG_LOOPW
  124. /* pass open firmware flat tree */
  125. #define CONFIG_OF_LIBFDT 1
  126. #define CONFIG_OF_BOARD_SETUP 1
  127. #endif /* __MANROLAND_COMMON_H */