dns325.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. /*
  2. * Copyright (C) 2011
  3. * Stefan Herbrechtsmeier <stefan@code.herbrechtsmeier.net>
  4. *
  5. * Based on Kirkwood support:
  6. * (C) Copyright 2009
  7. * Marvell Semiconductor <www.marvell.com>
  8. * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
  9. *
  10. * See file CREDITS for list of people who contributed to this
  11. * project.
  12. *
  13. * This program is free software; you can redistribute it and/or
  14. * modify it under the terms of the GNU General Public License as
  15. * published by the Free Software Foundation; either version 2 of
  16. * the License, or (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with this program; if not, write to the Free Software
  25. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  26. * MA 02110-1301 USA
  27. */
  28. #ifndef _CONFIG_DNS325_H
  29. #define _CONFIG_DNS325_H
  30. /*
  31. * Machine number definition
  32. */
  33. #define MACH_TYPE_DNS325 3800
  34. #define CONFIG_MACH_TYPE MACH_TYPE_DNS325
  35. #define CONFIG_IDENT_STRING "\nD-Link DNS-325"
  36. /*
  37. * High Level Configuration Options (easy to change)
  38. */
  39. #define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */
  40. #define CONFIG_KIRKWOOD /* SOC Family Name */
  41. #define CONFIG_KW88F6281 /* SOC Name */
  42. #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
  43. /*
  44. * Commands configuration
  45. */
  46. #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
  47. #include <config_cmd_default.h>
  48. #define CONFIG_CMD_DHCP
  49. #define CONFIG_CMD_ENV
  50. #define CONFIG_CMD_NAND
  51. #define CONFIG_CMD_PING
  52. #define CONFIG_CMD_USB
  53. #define CONFIG_CMD_IDE
  54. #define CONFIG_CMD_DATE
  55. #define CONFIG_SYS_MVFS
  56. #define CONFIG_NR_DRAM_BANKS 1
  57. /*
  58. * mv-common.h should be defined after CMD configs since it used them
  59. * to enable certain macros
  60. */
  61. #include "mv-common.h"
  62. /* Remove or override few declarations from mv-common.h */
  63. #undef CONFIG_SYS_PROMPT
  64. #define CONFIG_SYS_PROMPT "=> "
  65. /*
  66. * Ethernet Driver configuration
  67. */
  68. #ifdef CONFIG_CMD_NET
  69. #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
  70. #define CONFIG_NETCONSOLE
  71. #endif
  72. /*
  73. * SATA Driver configuration
  74. */
  75. #ifdef CONFIG_MVSATA_IDE
  76. #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
  77. #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
  78. #endif
  79. /*
  80. * RTC driver configuration
  81. */
  82. #ifdef CONFIG_CMD_DATE
  83. #define CONFIG_RTC_MV
  84. #endif
  85. /*
  86. * Enable GPI0 support
  87. */
  88. #define CONFIG_KIRKWOOD_GPIO
  89. /*
  90. * Use the HUSH parser
  91. */
  92. #define CONFIG_SYS_HUSH_PARSER
  93. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  94. /*
  95. * Console configuration
  96. */
  97. #define CONFIG_CONSOLE_MUX
  98. #define CONFIG_SYS_CONSOLE_IS_IN_ENV
  99. /*
  100. * Enable device tree support
  101. */
  102. #define CONFIG_OF_LIBFDT
  103. /*
  104. * Display cpu info at boot
  105. */
  106. #define CONFIG_DISPLAY_CPUINFO
  107. /*
  108. * Environment variables configurations
  109. */
  110. #ifdef CONFIG_CMD_NAND
  111. #define CONFIG_ENV_IS_IN_NAND
  112. #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128KB */
  113. #else
  114. #define CONFIG_ENV_IS_NOWHERE
  115. #endif
  116. #define CONFIG_ENV_SIZE 0x20000 /* 128KB */
  117. #define CONFIG_ENV_ADDR 0xe0000
  118. #define CONFIG_ENV_OFFSET 0xe0000 /* env starts here */
  119. /*
  120. * Default environment variables
  121. */
  122. #define MTDIDS_DEFAULT "nand0=orion_nand"
  123. #define MTDPARTS_DEFAULT "mtdparts=orion_nand:" \
  124. "896k(u-boot),128k(u-boot-env),5m(kernel),-(rootfs)\0"
  125. #define CONFIG_EXTRA_ENV_SETTINGS \
  126. "stdin=serial\0" \
  127. "stdout=serial\0" \
  128. "stderr=serial\0" \
  129. "loadaddr=0x800000\0" \
  130. "autoload=no\0" \
  131. "console=ttyS0,115200\0" \
  132. "mtdparts="MTDPARTS_DEFAULT \
  133. "optargs=\0" \
  134. "bootenv=uEnv.txt\0" \
  135. "importbootenv=echo Importing environment ...; " \
  136. "env import -t ${loadaddr} ${filesize}\0" \
  137. "loadbootenv=fatload usb 0 ${loadaddr} ${bootenv}\0" \
  138. "setbootargs=setenv bootargs console=${console} " \
  139. "${optargs} " \
  140. "${mtdparts} " \
  141. "root=${bootenvroot} " \
  142. "rootfstype=${bootenvrootfstype}\0" \
  143. "subbootcmd=run setbootargs; " \
  144. "if run bootenvloadimage; then " \
  145. "bootm ${loadaddr};" \
  146. "fi;\0" \
  147. "nandroot=ubi0:rootfs ubi.mtd=rootfs\0" \
  148. "nandrootfstype=ubifs\0" \
  149. "nandloadimage=nand read ${loadaddr} kernel\0" \
  150. "setnandbootenv=echo Booting from nand ...; " \
  151. "setenv bootenvroot ${nandroot}; " \
  152. "setenv bootenvrootfstype ${nandrootfstype}; " \
  153. "setenv bootenvloadimage ${nandloadimage}\0"
  154. #define CONFIG_BOOTCOMMAND \
  155. "if test -n ${bootenv} && usb start; then " \
  156. "if run loadbootenv; then " \
  157. "echo Loaded environment ${bootenv} from usb;" \
  158. "run importbootenv;" \
  159. "fi;" \
  160. "if test -n ${bootenvcmd}; then " \
  161. "echo Running bootenvcmd ...;" \
  162. "run bootenvcmd;" \
  163. "fi;" \
  164. "fi;" \
  165. "run setnandbootenv subbootcmd;"
  166. #endif /* _CONFIG_DNS325_H */