netspace_v2.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /*
  2. * Copyright (C) 2011 Simon Guinot <sguinot@lacie.com>
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. */
  17. #ifndef _CONFIG_NETSPACE_V2_H
  18. #define _CONFIG_NETSPACE_V2_H
  19. /*
  20. * Machine number definition
  21. */
  22. #if defined(CONFIG_INETSPACE_V2)
  23. #define CONFIG_MACH_TYPE MACH_TYPE_INETSPACE_V2
  24. #define CONFIG_IDENT_STRING " IS v2"
  25. #elif defined(CONFIG_NETSPACE_V2)
  26. #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2
  27. #define CONFIG_IDENT_STRING " NS v2"
  28. #elif defined(CONFIG_NETSPACE_MAX_V2)
  29. #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2
  30. #define CONFIG_IDENT_STRING " NS Max v2"
  31. #else
  32. #error "Unknown board"
  33. #endif
  34. /*
  35. * High Level Configuration Options (easy to change)
  36. */
  37. #define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */
  38. #define CONFIG_KIRKWOOD /* SOC Family Name */
  39. #define CONFIG_KW88F6281 /* SOC Name */
  40. #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
  41. /*
  42. * Commands configuration
  43. */
  44. #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
  45. #include <config_cmd_default.h>
  46. #define CONFIG_CMD_ENV
  47. #define CONFIG_CMD_DHCP
  48. #define CONFIG_CMD_PING
  49. #define CONFIG_CMD_SF
  50. #define CONFIG_CMD_I2C
  51. #define CONFIG_CMD_IDE
  52. #define CONFIG_CMD_USB
  53. /*
  54. * Core clock definition.
  55. */
  56. #define CONFIG_SYS_TCLK 166000000 /* 166MHz */
  57. /*
  58. * mv-common.h should be defined after CMD configs since it used them
  59. * to enable certain macros
  60. */
  61. #define CONFIG_NR_DRAM_BANKS 2
  62. #include "mv-common.h"
  63. /* Remove or override few declarations from mv-common.h */
  64. #undef CONFIG_RBTREE
  65. #undef CONFIG_ENV_SPI_MAX_HZ
  66. #undef CONFIG_SYS_IDE_MAXBUS
  67. #undef CONFIG_SYS_IDE_MAXDEVICE
  68. #undef CONFIG_SYS_PROMPT
  69. #define CONFIG_ENV_SPI_MAX_HZ 20000000 /* 20Mhz */
  70. #define CONFIG_SYS_IDE_MAXBUS 1
  71. #define CONFIG_SYS_IDE_MAXDEVICE 1
  72. #define CONFIG_SYS_PROMPT "ns2> "
  73. /*
  74. * Ethernet Driver configuration
  75. */
  76. #ifdef CONFIG_CMD_NET
  77. #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
  78. #define CONFIG_NETCONSOLE
  79. #endif
  80. /*
  81. * SATA Driver configuration
  82. */
  83. #ifdef CONFIG_MVSATA_IDE
  84. #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
  85. /* Network Space Max v2 use 2 SATA ports */
  86. #ifdef CONFIG_NETSPACE_MAX_V2
  87. #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
  88. #endif
  89. #endif
  90. /*
  91. * Enable GPI0 support
  92. */
  93. #define CONFIG_KIRKWOOD_GPIO
  94. /*
  95. * File systems support
  96. */
  97. #define CONFIG_CMD_EXT2
  98. #define CONFIG_CMD_FAT
  99. /*
  100. * Use the HUSH parser
  101. */
  102. #define CONFIG_SYS_HUSH_PARSER
  103. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  104. /*
  105. * Console configuration
  106. */
  107. #define CONFIG_CONSOLE_MUX
  108. #define CONFIG_SYS_CONSOLE_IS_IN_ENV
  109. /*
  110. * Enable device tree support
  111. */
  112. #define CONFIG_OF_LIBFDT
  113. /*
  114. * Environment variables configurations
  115. */
  116. #define CONFIG_ENV_IS_IN_SPI_FLASH
  117. #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64KB */
  118. #define CONFIG_ENV_SIZE 0x1000 /* 4KB */
  119. #define CONFIG_ENV_ADDR 0x70000
  120. #define CONFIG_ENV_OFFSET 0x70000 /* env starts here */
  121. /*
  122. * Default environment variables
  123. */
  124. #define CONFIG_BOOTARGS "console=ttyS0,115200"
  125. #define CONFIG_BOOTCOMMAND \
  126. "dhcp && run netconsole; " \
  127. "if run usbload || run diskload; then bootm; fi"
  128. #define CONFIG_EXTRA_ENV_SETTINGS \
  129. "stdin=serial\0" \
  130. "stdout=serial\0" \
  131. "stderr=serial\0" \
  132. "bootfile=uImage\0" \
  133. "loadaddr=0x800000\0" \
  134. "autoload=no\0" \
  135. "netconsole=" \
  136. "set stdin $stdin,nc; " \
  137. "set stdout $stdout,nc; " \
  138. "set stderr $stderr,nc;\0" \
  139. "diskload=ide reset && " \
  140. "ext2load ide 0:1 $loadaddr /boot/$bootfile\0" \
  141. "usbload=usb start && " \
  142. "fatload usb 0:1 $loadaddr /boot/$bootfile\0"
  143. #endif /* _CONFIG_NETSPACE_V2_H */