common.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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 CONFIG_BOARD_EARLY_INIT_R
  30. /* Partitions */
  31. #define CONFIG_DOS_PARTITION
  32. /*
  33. * Command line configuration.
  34. */
  35. #include <config_cmd_default.h>
  36. #define CONFIG_CMD_DATE
  37. #define CONFIG_CMD_DISPLAY
  38. #define CONFIG_CMD_DHCP
  39. #define CONFIG_CMD_PING
  40. #define CONFIG_CMD_EEPROM
  41. #define CONFIG_CMD_I2C
  42. #define CONFIG_CMD_DTT
  43. #define CONFIG_CMD_IDE
  44. #define CONFIG_CMD_FAT
  45. #define CONFIG_CMD_NFS
  46. #define CONFIG_CMD_MII
  47. #define CONFIG_CMD_SNTP
  48. /*
  49. * 8-symbol LED display (can be accessed with 'display' command)
  50. */
  51. #define CONFIG_PDSP188x
  52. #define CONFIG_TIMESTAMP 1 /* Print image info with timestamp */
  53. /*
  54. * Autobooting
  55. */
  56. #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
  57. #define CONFIG_PREBOOT "echo;" \
  58. "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \
  59. "echo"
  60. #undef CONFIG_BOOTARGS
  61. #define xstr(s) str(s)
  62. #define str(s) #s
  63. #define CONFIG_EXTRA_ENV_SETTINGS \
  64. "netdev=eth0\0" \
  65. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  66. "nfsroot=${serverip}:${rootpath}\0" \
  67. "ramargs=setenv bootargs root=/dev/ram rw\0" \
  68. "addwdt=setenv bootargs ${bootargs} wdt=off\0" \
  69. "logval=4\0" \
  70. "addlog=setenv bootargs ${bootargs} loglevel=${logval}\0" \
  71. "addip=setenv bootargs ${bootargs} " \
  72. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
  73. ":${hostname}:${netdev}:off panic=1\0" \
  74. "kernel_addr=ff810000\0" \
  75. "fdt_addr="xstr(CONFIG_SYS_FLASH_BASE)"\0" \
  76. "flash_nfs=run nfsargs addip addcon addwdt addlog;" \
  77. "bootm ${kernel_addr} - ${fdt_addr}\0" \
  78. "rootpath=/opt/eldk/ppc_82xx\0" \
  79. "kernel_addr_r=300000\0" \
  80. "fdt_addr_r=200000\0" \
  81. "fdt_file=" xstr(CONFIG_HOSTNAME) "/" \
  82. xstr(CONFIG_HOSTNAME) ".dtb\0" \
  83. "kernel_file=" xstr(CONFIG_HOSTNAME) "/uImage \0" \
  84. "load_fdt=tftp ${fdt_addr_r} ${fdt_file};\0" \
  85. "load_kernel=tftp ${kernel_addr_r} ${kernel_file};\0" \
  86. "addcon=setenv bootargs ${bootargs} console=ttyPSC0,${baudrate}\0"\
  87. "net_nfs=run load_fdt load_kernel; " \
  88. "run nfsargs addip addcon addwdt addlog;" \
  89. "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \
  90. "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0" \
  91. "u-boot_addr_r=200000\0" \
  92. "load=tftp ${u-boot_addr_r} ${u-boot}\0" \
  93. "update=protect off " xstr(CONFIG_SYS_TEXT_BASE) " +${filesize};" \
  94. "erase " xstr(CONFIG_SYS_TEXT_BASE) " +${filesize};" \
  95. "cp.b ${u-boot_addr_r} " xstr(CONFIG_SYS_TEXT_BASE) \
  96. " ${filesize};" \
  97. "protect on " xstr(CONFIG_SYS_TEXT_BASE) " +${filesize}\0" \
  98. ""
  99. #define CONFIG_BOOTCOMMAND "run net_nfs"
  100. #define CONFIG_MISC_INIT_R 1
  101. /*
  102. * Miscellaneous configurable options
  103. */
  104. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  105. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  106. #if defined(CONFIG_CMD_KGDB)
  107. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  108. #else
  109. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  110. #endif
  111. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
  112. #define CONFIG_SYS_MAXARGS 16 /* max number of command args*/
  113. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  114. #define CONFIG_CMDLINE_EDITING 1 /* add command line history */
  115. #define CONFIG_AUTO_COMPLETE /* add autocompletion support */
  116. /* Enable an alternate, more extensive memory test */
  117. #define CONFIG_SYS_ALT_MEMTEST
  118. /*
  119. * Enable loopw command.
  120. */
  121. #define CONFIG_LOOPW
  122. /* pass open firmware flat tree */
  123. #define CONFIG_OF_LIBFDT 1
  124. #define CONFIG_OF_BOARD_SETUP 1
  125. #endif /* __MANROLAND_COMMON_H */