wireless_space.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. /*
  2. * Copyright (C) 2011 Albert ARIBAUD <albert.u.boot@aribaud.net>
  3. *
  4. * Based on the netspace_v2 code which is
  5. * Copyright (C) 2011 Simon Guinot <sguinot@lacie.com>
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. */
  20. #ifndef _CONFIG_WIRELESS_SPACE_H
  21. #define _CONFIG_WIRELESS_SPACE_H
  22. /*
  23. * Machine number definition
  24. */
  25. #define MACH_TYPE_WIRELESS_SPACE 2500 /* is missing in mach-types.h */
  26. #define CONFIG_MACH_TYPE MACH_TYPE_WIRELESS_SPACE
  27. #define CONFIG_IDENT_STRING " Wireless Space"
  28. /*
  29. * High Level Configuration Options (easy to change)
  30. */
  31. #define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */
  32. #define CONFIG_KIRKWOOD /* SoC Family Name */
  33. /* SoC name */
  34. #define CONFIG_KW88F6281
  35. #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
  36. /*
  37. * Commands configuration
  38. */
  39. #define CONFIG_SYS_NO_FLASH /* no NOR or SPI flash */
  40. #include <config_cmd_default.h>
  41. #define CONFIG_CMD_ENV
  42. #define CONFIG_CMD_DHCP
  43. #define CONFIG_CMD_PING
  44. #define CONFIG_CMD_NAND
  45. #define CONFIG_CMD_I2C
  46. #define CONFIG_CMD_IDE
  47. #define CONFIG_CMD_USB
  48. /*
  49. * Core clock definition
  50. */
  51. #define CONFIG_SYS_TCLK 166000000 /* 166MHz */
  52. /*
  53. * SDRAM configuration
  54. */
  55. #define CONFIG_NR_DRAM_BANKS 1
  56. /*
  57. * Different SDRAM configuration and size for some of the boards derived
  58. * from the Network Space v2
  59. */
  60. /*
  61. * mv-common.h should be defined after CMD configs since it used them
  62. * to enable certain macros
  63. */
  64. #include "mv-common.h"
  65. /* Remove or override few declarations from mv-common.h */
  66. #undef CONFIG_RBTREE
  67. #undef CONFIG_SYS_IDE_MAXBUS
  68. #undef CONFIG_SYS_IDE_MAXDEVICE
  69. #define CONFIG_SYS_IDE_MAXBUS 1
  70. #define CONFIG_SYS_IDE_MAXDEVICE 1
  71. #undef CONFIG_SYS_PROMPT
  72. #define CONFIG_SYS_PROMPT "ws> "
  73. /*
  74. * Ethernet Driver configuration
  75. */
  76. #ifdef CONFIG_CMD_NET
  77. #define CONFIG_MISC_INIT_R /* misc_init_r() initializes MAC address */
  78. #define CONFIG_MVGBE_PORTS {1, 0} /* enable only egiga0... */
  79. #define PORT_SERIAL_CONTROL_VALUE 0x00A4260E /* ... tied to the switch... */
  80. #define CONFIG_PHY_BASE_ADR 0xa /* ... through a 'fake' PHY */
  81. #define CONFIG_MII
  82. #undef CONFIG_SYS_FAULT_ECHO_LINK_DOWN
  83. #define CONFIG_NETCONSOLE
  84. #define CONFIG_MV88E61XX_SWITCH
  85. #define CONFIG_MV88E61XX_MULTICHIP_ADRMODE
  86. #define CONFIG_MV88E61XX_CMD
  87. #define CONFIG_CMD_TFTPPUT
  88. #endif /* CONFIG_CMD_NET */
  89. /*
  90. * SATA Driver configuration
  91. */
  92. #ifdef CONFIG_MVSATA_IDE
  93. #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
  94. #endif /* CONFIG_MVSATA_IDE */
  95. /*
  96. * Enable GPI0 support
  97. */
  98. #define CONFIG_KIRKWOOD_GPIO
  99. /*
  100. * Enable I2C support
  101. */
  102. #ifdef CONFIG_CMD_I2C
  103. /* I2C EEPROM HT24LC04 (512B - 32 pages of 16 Bytes) */
  104. #define CONFIG_CMD_EEPROM
  105. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
  106. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* 16-byte page size */
  107. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* 8-bit device address */
  108. #endif /* CONFIG_CMD_I2C */
  109. /*
  110. * Partition support
  111. */
  112. #define CONFIG_DOS_PARTITION
  113. #define CONFIG_EFI_PARTITION
  114. /*
  115. * File systems support
  116. */
  117. #define CONFIG_CMD_EXT2
  118. #define CONFIG_CMD_FAT
  119. /*
  120. * Use the HUSH parser
  121. */
  122. #define CONFIG_SYS_HUSH_PARSER
  123. /*
  124. * Console configuration
  125. */
  126. #define CONFIG_CONSOLE_MUX
  127. #define CONFIG_SYS_CONSOLE_IS_IN_ENV
  128. /*
  129. * Enable device tree support
  130. */
  131. #define CONFIG_OF_LIBFDT
  132. /*
  133. * Environment variables configurations
  134. */
  135. #define CONFIG_ENV_IS_IN_NAND
  136. #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128KB */
  137. #define CONFIG_ENV_SIZE 0x20000 /* 128KB */
  138. #define CONFIG_ENV_OFFSET 0x80000 /* env starts here */
  139. /*
  140. * Board-specific command to make using buttons etc easier
  141. */
  142. #define CONFIG_WIRELESS_SPACE_CMD
  143. /*
  144. * Default environment variables
  145. */
  146. #define CONFIG_PREBOOT
  147. #define CONFIG_BOOTARGS "console=ttyS0,115200"
  148. #define CONFIG_BOOTCOMMAND \
  149. "if run usbload || run diskload; then bootm; fi"
  150. #define CONFIG_EXTRA_ENV_SETTINGS \
  151. "stdin=serial\0" \
  152. "stdout=serial\0" \
  153. "stderr=serial\0" \
  154. "bootfile=uImage\0" \
  155. "loadaddr=0x800000\0" \
  156. "autoload=no\0" \
  157. "netconsole=" \
  158. "set stdin $stdin,nc; " \
  159. "set stdout $stdout,nc; " \
  160. "set stderr $stderr,nc;\0" \
  161. "diskload=ide reset && " \
  162. "ext2load ide 0:1 $loadaddr /boot/$bootfile\0" \
  163. "usbload=usb start && " \
  164. "fatload usb 0:1 $loadaddr /boot/$bootfile\0" \
  165. "preboot=" \
  166. "dhcp && run netconsole\0"
  167. #endif /* _CONFIG_WIRELESS_SPACE_H */