lacie_kw.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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_LACIE_KW_H
  18. #define _CONFIG_LACIE_KW_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. #elif defined(CONFIG_NET2BIG_V2)
  32. #define CONFIG_MACH_TYPE MACH_TYPE_NET2BIG_V2
  33. #define CONFIG_IDENT_STRING " 2Big v2"
  34. #else
  35. #error "Unknown board"
  36. #endif
  37. /*
  38. * High Level Configuration Options (easy to change)
  39. */
  40. #define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */
  41. #define CONFIG_KIRKWOOD /* SOC Family Name */
  42. #define CONFIG_KW88F6281 /* SOC Name */
  43. #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
  44. /*
  45. * Commands configuration
  46. */
  47. #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
  48. #include <config_cmd_default.h>
  49. #define CONFIG_CMD_ENV
  50. #define CONFIG_CMD_DHCP
  51. #define CONFIG_CMD_PING
  52. #define CONFIG_CMD_SF
  53. #define CONFIG_CMD_I2C
  54. #define CONFIG_CMD_IDE
  55. #define CONFIG_CMD_USB
  56. /*
  57. * Core clock definition
  58. */
  59. #define CONFIG_SYS_TCLK 166000000 /* 166MHz */
  60. /*
  61. * SDRAM configuration
  62. */
  63. #define CONFIG_NR_DRAM_BANKS 1
  64. #ifdef CONFIG_INETSPACE_V2
  65. /* Different SDRAM configuration and size for Internet Space v2 */
  66. #define CONFIG_SYS_KWD_CONFIG $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-is2.cfg
  67. #endif
  68. /*
  69. * mv-common.h should be defined after CMD configs since it used them
  70. * to enable certain macros
  71. */
  72. #include "mv-common.h"
  73. /* Remove or override few declarations from mv-common.h */
  74. #undef CONFIG_RBTREE
  75. #undef CONFIG_ENV_SPI_MAX_HZ
  76. #undef CONFIG_SYS_IDE_MAXBUS
  77. #undef CONFIG_SYS_IDE_MAXDEVICE
  78. #undef CONFIG_SYS_PROMPT
  79. #define CONFIG_ENV_SPI_MAX_HZ 20000000 /* 20Mhz */
  80. #define CONFIG_SYS_IDE_MAXBUS 1
  81. #define CONFIG_SYS_IDE_MAXDEVICE 1
  82. #if defined(CONFIG_NET2BIG_V2)
  83. #define CONFIG_SYS_PROMPT "2big2> "
  84. #else
  85. #define CONFIG_SYS_PROMPT "ns2> "
  86. #endif
  87. /*
  88. * Ethernet Driver configuration
  89. */
  90. #ifdef CONFIG_CMD_NET
  91. #define CONFIG_MISC_INIT_R /* Call misc_init_r() to initialize MAC address */
  92. #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
  93. #define CONFIG_NETCONSOLE
  94. #endif
  95. /*
  96. * SATA Driver configuration
  97. */
  98. #ifdef CONFIG_MVSATA_IDE
  99. #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
  100. #if defined(CONFIG_NETSPACE_MAX_V2) || defined(CONFIG_NET2BIG_V2)
  101. #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
  102. #endif
  103. #endif /* CONFIG_MVSATA_IDE */
  104. /*
  105. * Enable GPI0 support
  106. */
  107. #define CONFIG_KIRKWOOD_GPIO
  108. /*
  109. * Enable I2C support
  110. */
  111. #ifdef CONFIG_CMD_I2C
  112. /* I2C EEPROM HT24LC04 (512B - 32 pages of 16 Bytes) */
  113. #define CONFIG_CMD_EEPROM
  114. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
  115. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* 16-byte page size */
  116. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* 8-bit device address */
  117. #endif /* CONFIG_CMD_I2C */
  118. /*
  119. * Partition support
  120. */
  121. #define CONFIG_DOS_PARTITION
  122. #define CONFIG_EFI_PARTITION
  123. /*
  124. * File systems support
  125. */
  126. #define CONFIG_CMD_EXT2
  127. #define CONFIG_CMD_FAT
  128. /*
  129. * Use the HUSH parser
  130. */
  131. #define CONFIG_SYS_HUSH_PARSER
  132. /*
  133. * Console configuration
  134. */
  135. #define CONFIG_CONSOLE_MUX
  136. #define CONFIG_SYS_CONSOLE_IS_IN_ENV
  137. /*
  138. * Enable device tree support
  139. */
  140. #define CONFIG_OF_LIBFDT
  141. /*
  142. * Environment variables configurations
  143. */
  144. #define CONFIG_ENV_IS_IN_SPI_FLASH
  145. #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64KB */
  146. #define CONFIG_ENV_SIZE 0x1000 /* 4KB */
  147. #define CONFIG_ENV_ADDR 0x70000
  148. #define CONFIG_ENV_OFFSET 0x70000 /* env starts here */
  149. /*
  150. * Default environment variables
  151. */
  152. #define CONFIG_BOOTARGS "console=ttyS0,115200"
  153. #define CONFIG_BOOTCOMMAND \
  154. "dhcp && run netconsole; " \
  155. "if run usbload || run diskload; then bootm; fi"
  156. #define CONFIG_EXTRA_ENV_SETTINGS \
  157. "stdin=serial\0" \
  158. "stdout=serial\0" \
  159. "stderr=serial\0" \
  160. "bootfile=uImage\0" \
  161. "loadaddr=0x800000\0" \
  162. "autoload=no\0" \
  163. "netconsole=" \
  164. "set stdin $stdin,nc; " \
  165. "set stdout $stdout,nc; " \
  166. "set stderr $stderr,nc;\0" \
  167. "diskload=ide reset && " \
  168. "ext2load ide 0:1 $loadaddr /boot/$bootfile\0" \
  169. "usbload=usb start && " \
  170. "fatload usb 0:1 $loadaddr /boot/$bootfile\0"
  171. #endif /* _CONFIG_LACIE_KW_H */