linkstation.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  1. /*
  2. * Copyright (C) 2006 Mihai Georgian <u-boot@linuxnotincluded.org.uk>
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of
  7. * the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  17. * MA 02111-1307 USA
  18. */
  19. #ifndef __CONFIG_H
  20. #define __CONFIG_H
  21. #if 0
  22. #define DEBUG
  23. #endif
  24. #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */
  25. /*-----------------------------------------------------------------------
  26. * User configurable settings:
  27. * Mandatory settings:
  28. * CONFIG_IPADDR_LS - the IP address of the LinkStation
  29. * CONFIG_SERVERIP_LS - the address of the server for NFS/TFTP/DHCP/BOOTP
  30. * Optional settins:
  31. * CONFIG_NCIP_LS - the adress of the computer running net console
  32. * if not configured, it will be set to
  33. * CONFIG_SERVERIP_LS
  34. */
  35. #define CONFIG_IPADDR_LS 192.168.11.150
  36. #define CONFIG_SERVERIP_LS 192.168.11.149
  37. #if !defined(CONFIG_IPADDR_LS) || !defined(CONFIG_SERVERIP_LS)
  38. #error Both CONFIG_IPADDR_LS and CONFIG_SERVERIP_LS must be defined
  39. #endif
  40. #if !defined(CONFIG_NCIP_LS)
  41. #define CONFIG_NCIP_LS CONFIG_SERVERIP_LS
  42. #endif
  43. /*----------------------------------------------------------------------
  44. * DO NOT CHANGE ANYTHING BELOW, UNLESS YOU KNOW WHAT YOU ARE DOING
  45. *---------------------------------------------------------------------*/
  46. #define CONFIG_MPC8245 1
  47. #define CONFIG_LINKSTATION 1
  48. /*---------------------------------------
  49. * Supported models
  50. *
  51. * LinkStation HDLAN /KuroBox Standard (CONFIG_HLAN)
  52. * LinkStation old model (CONFIG_LAN) - totally untested
  53. * LinkStation HGLAN / KuroBox HG (CONFIG_HGLAN)
  54. *
  55. * Models not supported yet
  56. * TeraStatin (CONFIG_HTGL)
  57. */
  58. #if defined(CONFIG_HLAN) || defined(CONFIG_LAN)
  59. #define CONFIG_IDENT_STRING " LinkStation / KuroBox"
  60. #elif defined(CONFIG_HGLAN)
  61. #define CONFIG_IDENT_STRING " LinkStation HG / KuroBox HG"
  62. #elif defined(CONFIG_HTGL)
  63. #define CONFIG_IDENT_STRING " TeraStation"
  64. #else
  65. #error No LinkStation model defined
  66. #endif
  67. #define CONFIG_BOOTDELAY 5
  68. #define CONFIG_ZERO_BOOTDELAY_CHECK
  69. #undef CONFIG_BOOT_RETRY_TIME
  70. #define CONFIG_AUTOBOOT_KEYED
  71. #define CONFIG_AUTOBOOT_PROMPT \
  72. "Boot in %02d seconds ('s' to stop)...", bootdelay
  73. #define CONFIG_AUTOBOOT_STOP_STR "s"
  74. #define CONFIG_CMD_IDE
  75. #define CONFIG_CMD_PCI
  76. #define CONFIG_CMD_DHCP
  77. #define CONFIG_CMD_PING
  78. #define CONFIG_CMD_EXT2
  79. #define CONFIG_BOOTP_MASK CONFIG_BOOTP_ALL
  80. #define CONFIG_OF_LIBFDT 1
  81. #define OF_CPU "PowerPC,603e"
  82. #define OF_SOC "soc10x@80000000"
  83. #define OF_STDOUT_PATH "/soc10x/serial@80004600"
  84. /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
  85. #include <config_cmd_default.h>
  86. /*
  87. * Miscellaneous configurable options
  88. */
  89. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  90. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  91. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  92. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  93. #define CONFIG_SYS_MAXARGS 16 /* Max number of command args */
  94. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
  95. #define CONFIG_SYS_LOAD_ADDR 0x00800000 /* Default load address: 8 MB */
  96. #define CONFIG_BOOTCOMMAND "run bootcmd1"
  97. #define CONFIG_BOOTARGS "root=/dev/sda1 console=ttyS1,57600 netconsole=@192.168.1.7/eth0,@192.168.1.1/00:50:BF:A4:59:71 rtc-rs5c372.probe=0,0x32 debug"
  98. #define CONFIG_NFSBOOTCOMMAND "bootp;run nfsargs;bootm"
  99. #define CONFIG_SYS_CONSOLE_IS_IN_ENV
  100. #define XMK_STR(x) #x
  101. #define MK_STR(x) XMK_STR(x)
  102. #if defined(CONFIG_HLAN) || defined(CONFIG_LAN)
  103. #define UBFILE "share/u-boot/u-boot-hd.flash.bin"
  104. #elif defined(CONFIG_HGLAN)
  105. #define UBFILE "share/u-boot/u-boot-hg.flash.bin"
  106. #elif defined(CONFIG_HTGL)
  107. #define UBFILE "share/u-boot/u-boot-ht.flash.bin"
  108. #else
  109. #error No LinkStation model defined
  110. #endif
  111. #define CONFIG_EXTRA_ENV_SETTINGS \
  112. "autoload=no\0" \
  113. "stdin=nc\0" \
  114. "stdout=nc\0" \
  115. "stderr=nc\0" \
  116. "ipaddr="MK_STR(CONFIG_IPADDR_LS)"\0" \
  117. "netmask=255.255.255.0\0" \
  118. "serverip="MK_STR(CONFIG_SERVERIP_LS)"\0" \
  119. "ncip="MK_STR(CONFIG_NCIP_LS)"\0" \
  120. "netretry=no\0" \
  121. "nc=setenv stdin nc;setenv stdout nc;setenv stderr nc\0" \
  122. "ser=setenv stdin serial;setenv stdout serial;setenv stderr serial\0" \
  123. "ldaddr=800000\0" \
  124. "hdpart=0:1\0" \
  125. "hdfile=boot/uImage\0" \
  126. "hdload=echo Loading ${hdpart}:${hdfile};ext2load ide ${hdpart} ${ldaddr} ${hdfile};ext2load ide ${hdpart} 7f0000 boot/kuroboxHG.dtb\0" \
  127. "boothd=setenv bootargs " CONFIG_BOOTARGS ";bootm ${ldaddr} - 7f0000\0" \
  128. "hdboot=run hdload;run boothd\0" \
  129. "flboot=setenv bootargs root=/dev/hda1;bootm ffc00000\0" \
  130. "emboot=setenv bootargs root=/dev/ram0;bootm ffc00000\0" \
  131. "nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} " \
  132. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off\0" \
  133. "bootretry=30\0" \
  134. "bootcmd1=run hdboot;run flboot\0" \
  135. "bootcmd2=run flboot\0" \
  136. "bootcmd3=run emboot\0" \
  137. "writeng=protect off fff70000 fff7ffff;era fff70000 fff7ffff;mw.l 800000 4e474e47 1;cp.b 800000 fff70000 4\0" \
  138. "writeok=protect off fff70000 fff7ffff;era fff70000 fff7ffff;mw.l 800000 4f4b4f4b 1;cp.b 800000 fff70000 4\0" \
  139. "ubpart=0:3\0" \
  140. "ubfile="UBFILE"\0" \
  141. "ubload=echo Loading ${ubpart}:${ubfile};ext2load ide ${ubpart} ${ldaddr} ${ubfile}\0" \
  142. "ubsaddr=fff00000\0" \
  143. "ubeaddr=fff2ffff\0" \
  144. "ubflash=protect off ${ubsaddr} ${ubeaddr};era ${ubsaddr} ${ubeaddr};cp.b ${ldaddr} ${ubsaddr} ${filesize};cmp.b ${ldaddr} ${ubsaddr} ${filesize}\0" \
  145. "upgrade=run ubload ubflash\0"
  146. /*-----------------------------------------------------------------------
  147. * PCI stuff
  148. */
  149. #define CONFIG_PCI
  150. /* Verified: CONFIG_PCI_PNP doesn't work */
  151. #undef CONFIG_PCI_PNP
  152. #define CONFIG_PCI_SCAN_SHOW
  153. #ifndef CONFIG_PCI_PNP
  154. /* Keep the following defines in sync with the BAT mappings */
  155. #define PCI_ETH_IOADDR 0xbfff00
  156. #define PCI_ETH_MEMADDR 0xbffffc00
  157. #define PCI_IDE_IOADDR 0xbffed0
  158. #define PCI_IDE_MEMADDR 0xbffffb00
  159. #define PCI_USB0_IOADDR 0
  160. #define PCI_USB0_MEMADDR 0xbfffe000
  161. #define PCI_USB1_IOADDR 0
  162. #define PCI_USB1_MEMADDR 0xbfffd000
  163. #define PCI_USB2_IOADDR 0
  164. #define PCI_USB2_MEMADDR 0xbfffcf00
  165. #endif
  166. /*-----------------------------------------------------------------------
  167. * Ethernet stuff
  168. */
  169. #define CONFIG_NET_MULTI
  170. #if defined(CONFIG_LAN) || defined(CONFIG_HLAN)
  171. #define CONFIG_TULIP
  172. #define CONFIG_TULIP_USE_IO
  173. #elif defined(CONFIG_HGLAN) || defined(CONFIG_HTGL)
  174. #define CONFIG_RTL8169
  175. #endif
  176. #define CONFIG_NET_RETRY_COUNT 5
  177. #define CONFIG_NETCONSOLE
  178. /*-----------------------------------------------------------------------
  179. * Start addresses for the final memory configuration
  180. * (Set up by the startup code)
  181. * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
  182. */
  183. #define CONFIG_SYS_SDRAM_BASE 0x00000000
  184. #define CONFIG_SYS_FLASH_BASE 0xFFC00000
  185. #define CONFIG_SYS_FLASH_SIZE 0x00400000
  186. #define CONFIG_SYS_MONITOR_BASE TEXT_BASE
  187. #define CONFIG_SYS_RESET_ADDRESS 0xFFF00100
  188. #define CONFIG_SYS_EUMB_ADDR 0x80000000
  189. #define CONFIG_SYS_PCI_MEM_ADDR 0xB0000000
  190. #define CONFIG_SYS_MISC_REGION_ADDR 0xFE000000
  191. #define CONFIG_SYS_MONITOR_LEN 0x00040000 /* 256 kB */
  192. #define CONFIG_SYS_MALLOC_LEN (512 << 10) /* Reserve some kB for malloc() */
  193. #define CONFIG_SYS_MEMTEST_START 0x00100000 /* memtest works on */
  194. #define CONFIG_SYS_MEMTEST_END 0x00800000 /* 1M ... 8M in DRAM */
  195. /* Maximum amount of RAM */
  196. #if defined(CONFIG_HLAN) || defined(CONFIG_LAN)
  197. #define CONFIG_SYS_MAX_RAM_SIZE 0x04000000 /* 64MB of SDRAM */
  198. #elif defined(CONFIG_HGLAN) || defined(CONFIG_HTGL)
  199. #define CONFIG_SYS_MAX_RAM_SIZE 0x08000000 /* 128MB of SDRAM */
  200. #else
  201. #error Unknown LinkStation type
  202. #endif
  203. /*-----------------------------------------------------------------------
  204. * Change TEXT_BASE in bord/linkstation/config.mk to get a RAM build
  205. *
  206. * RAM based builds are for testing purposes. A Linux module, uloader.o,
  207. * exists to load U-Boot and pass control to it
  208. *
  209. * Always do "make clean" after changing the build type
  210. */
  211. #if CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE
  212. #define CONFIG_SYS_RAMBOOT
  213. #endif
  214. /*-----------------------------------------------------------------------
  215. * Definitions for initial stack pointer and data area
  216. */
  217. #if 1 /* RAM is available when the first C function is called */
  218. #define CONFIG_SYS_INIT_RAM_ADDR (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_MAX_RAM_SIZE - 0x1000)
  219. #else
  220. #define CONFIG_SYS_INIT_RAM_ADDR 0x40000000
  221. #endif
  222. #define CONFIG_SYS_INIT_RAM_END 0x1000
  223. #define CONFIG_SYS_GBL_DATA_SIZE 128
  224. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
  225. /*----------------------------------------------------------------------
  226. * Serial configuration
  227. */
  228. #define CONFIG_CONS_INDEX 1
  229. #define CONFIG_BAUDRATE 57600
  230. #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  231. #define CONFIG_SYS_NS16550
  232. #define CONFIG_SYS_NS16550_SERIAL
  233. #define CONFIG_SYS_NS16550_REG_SIZE 1
  234. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  235. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_EUMB_ADDR + 0x4600) /* Console port */
  236. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_EUMB_ADDR + 0x4500) /* AVR port */
  237. /*
  238. * Low Level Configuration Settings
  239. * (address mappings, register initial values, etc.)
  240. * You should know what you are doing if you make changes here.
  241. * For the detail description refer to the MPC8245 user's manual.
  242. *
  243. * Unless indicated otherwise, the values are
  244. * taken from the orignal Linkstation boot code
  245. *
  246. * Most of the low level configuration setttings are normally used
  247. * in cpu/mpc824x/cpu_init.c which is NOT used by this implementation.
  248. * Low level initialisation is done in board/linkstation/early_init.S
  249. * The values below are included for reference purpose only
  250. */
  251. /* FIXME: 32.768 MHz is the crystal frequency but */
  252. /* the real frequency is lower by about 0.75% */
  253. #define CONFIG_SYS_CLK_FREQ 32768000
  254. #define CONFIG_SYS_HZ 1000
  255. /* Bit-field values for MCCR1. */
  256. #define CONFIG_SYS_ROMNAL 0
  257. #define CONFIG_SYS_ROMFAL 11
  258. #define CONFIG_SYS_BANK0_ROW 2 /* Only bank 0 used: 13 x n x 4 */
  259. #define CONFIG_SYS_BANK1_ROW 0
  260. #define CONFIG_SYS_BANK2_ROW 0
  261. #define CONFIG_SYS_BANK3_ROW 0
  262. #define CONFIG_SYS_BANK4_ROW 0
  263. #define CONFIG_SYS_BANK5_ROW 0
  264. #define CONFIG_SYS_BANK6_ROW 0
  265. #define CONFIG_SYS_BANK7_ROW 0
  266. /* Bit-field values for MCCR2. */
  267. #define CONFIG_SYS_TSWAIT 0
  268. #if defined(CONFIG_LAN) || defined(CONFIG_HLAN)
  269. #define CONFIG_SYS_REFINT 0x15e0
  270. #elif defined(CONFIG_HGLAN) || defined(CONFIG_HTGL)
  271. #define CONFIG_SYS_REFINT 0x1580
  272. #endif
  273. /* Burst To Precharge. Bits of this value go to MCCR3 and MCCR4. */
  274. #define CONFIG_SYS_BSTOPRE 0x91c
  275. /* Bit-field values for MCCR3. */
  276. #define CONFIG_SYS_REFREC 7
  277. /* Bit-field values for MCCR4. */
  278. #define CONFIG_SYS_PRETOACT 2
  279. #define CONFIG_SYS_ACTTOPRE 2 /* Original value was 2 */
  280. #define CONFIG_SYS_ACTORW 2
  281. #if defined(CONFIG_LAN) || defined(CONFIG_HLAN)
  282. #define CONFIG_SYS_SDMODE_CAS_LAT 2 /* For 100MHz bus */
  283. /*#define CONFIG_SYS_SDMODE_BURSTLEN 3*/
  284. #elif defined(CONFIG_HGLAN) || defined(CONFIG_HTGL)
  285. #define CONFIG_SYS_SDMODE_CAS_LAT 3 /* For 133MHz bus */
  286. /*#define CONFIG_SYS_SDMODE_BURSTLEN 2*/
  287. #endif
  288. #define CONFIG_SYS_REGISTERD_TYPE_BUFFER 1
  289. #define CONFIG_SYS_EXTROM 1 /* Original setting but there is no EXTROM */
  290. #define CONFIG_SYS_REGDIMM 0
  291. #define CONFIG_SYS_DBUS_SIZE2 1
  292. #define CONFIG_SYS_SDMODE_WRAP 0
  293. #define CONFIG_SYS_PGMAX 0x32 /* All boards use this setting. Original 0x92 */
  294. #define CONFIG_SYS_SDRAM_DSCD 0x30
  295. /* Memory bank settings.
  296. * Only bits 20-29 are actually used from these vales to set the
  297. * start/end addresses. The upper two bits will always be 0, and the lower
  298. * 20 bits will be 0x00000 for a start address, or 0xfffff for an end
  299. * address. Refer to the MPC8240 book.
  300. */
  301. #define CONFIG_SYS_BANK0_START 0x00000000
  302. #define CONFIG_SYS_BANK0_END (CONFIG_SYS_MAX_RAM_SIZE - 1)
  303. #define CONFIG_SYS_BANK0_ENABLE 1
  304. #define CONFIG_SYS_BANK1_START 0x3ff00000
  305. #define CONFIG_SYS_BANK1_END 0x3fffffff
  306. #define CONFIG_SYS_BANK1_ENABLE 0
  307. #define CONFIG_SYS_BANK2_START 0x3ff00000
  308. #define CONFIG_SYS_BANK2_END 0x3fffffff
  309. #define CONFIG_SYS_BANK2_ENABLE 0
  310. #define CONFIG_SYS_BANK3_START 0x3ff00000
  311. #define CONFIG_SYS_BANK3_END 0x3fffffff
  312. #define CONFIG_SYS_BANK3_ENABLE 0
  313. #define CONFIG_SYS_BANK4_START 0x3ff00000
  314. #define CONFIG_SYS_BANK4_END 0x3fffffff
  315. #define CONFIG_SYS_BANK4_ENABLE 0
  316. #define CONFIG_SYS_BANK5_START 0x3ff00000
  317. #define CONFIG_SYS_BANK5_END 0x3fffffff
  318. #define CONFIG_SYS_BANK5_ENABLE 0
  319. #define CONFIG_SYS_BANK6_START 0x3ff00000
  320. #define CONFIG_SYS_BANK6_END 0x3fffffff
  321. #define CONFIG_SYS_BANK6_ENABLE 0
  322. #define CONFIG_SYS_BANK7_START 0x3ff00000
  323. #define CONFIG_SYS_BANK7_END 0x3fffffff
  324. #define CONFIG_SYS_BANK7_ENABLE 0
  325. #define CONFIG_SYS_ODCR 0x15
  326. /*----------------------------------------------------------------------
  327. * Initial BAT mappings
  328. */
  329. /* NOTES:
  330. * 1) GUARDED and WRITETHROUGH not allowed in IBATS
  331. * 2) CACHEINHIBIT and WRITETHROUGH not allowed together in same BAT
  332. */
  333. /* SDRAM */
  334. #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
  335. #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_128M | BATU_VS | BATU_VP)
  336. #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L
  337. #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U
  338. /* EUMB: 1MB of address space */
  339. #define CONFIG_SYS_IBAT1L (CONFIG_SYS_EUMB_ADDR | BATL_PP_10 | BATL_CACHEINHIBIT)
  340. #define CONFIG_SYS_IBAT1U (CONFIG_SYS_EUMB_ADDR | BATU_BL_1M | BATU_VS | BATU_VP)
  341. #define CONFIG_SYS_DBAT1L (CONFIG_SYS_IBAT1L | BATL_GUARDEDSTORAGE)
  342. #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U
  343. /* PCI Mem: 256MB of address space */
  344. #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI_MEM_ADDR | BATL_PP_10 | BATL_CACHEINHIBIT)
  345. #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI_MEM_ADDR | BATU_BL_256M | BATU_VS | BATU_VP)
  346. #define CONFIG_SYS_DBAT2L (CONFIG_SYS_IBAT2L | BATL_GUARDEDSTORAGE)
  347. #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
  348. /* PCI and local ROM/Flash: last 32MB of address space */
  349. #define CONFIG_SYS_IBAT3L (CONFIG_SYS_MISC_REGION_ADDR | BATL_PP_10 | BATL_CACHEINHIBIT)
  350. #define CONFIG_SYS_IBAT3U (CONFIG_SYS_MISC_REGION_ADDR | BATU_BL_32M | BATU_VS | BATU_VP)
  351. #define CONFIG_SYS_DBAT3L (CONFIG_SYS_IBAT3L | BATL_GUARDEDSTORAGE)
  352. #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U
  353. /*
  354. * For booting Linux, the board info and command line data
  355. * have to be in the first 8 MB of memory, since this is
  356. * the maximum mapped by the Linux kernel during initialization.
  357. *
  358. * FIXME: This doesn't appear to be true for the newer kernels
  359. * which map more that 8 MB
  360. */
  361. #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
  362. /*-----------------------------------------------------------------------
  363. * FLASH organization
  364. */
  365. #define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */
  366. #define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */
  367. #undef CONFIG_SYS_FLASH_PROTECTION
  368. #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
  369. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* Max number of flash banks */
  370. #define CONFIG_SYS_MAX_FLASH_SECT 72 /* Max number of sectors per flash */
  371. #define CONFIG_SYS_FLASH_ERASE_TOUT 12000
  372. #define CONFIG_SYS_FLASH_WRITE_TOUT 1000
  373. #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */
  374. #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */
  375. #define CONFIG_SYS_FLASH_QUIET_TEST 1 /* don't warn upon unknown flash */
  376. #define CONFIG_ENV_IS_IN_FLASH
  377. /*
  378. * The original LinkStation flash organisation uses
  379. * 448 kB (0xFFF00000 - 0xFFF6FFFF) for the boot loader
  380. * We use the last sector of this area to store the environment
  381. * which leaves max. 384 kB for the U-Boot itself
  382. */
  383. #define CONFIG_ENV_ADDR 0xFFF60000
  384. #define CONFIG_ENV_SIZE 0x00010000
  385. #define CONFIG_ENV_SECT_SIZE 0x00010000
  386. /*-----------------------------------------------------------------------
  387. * Cache Configuration
  388. */
  389. #define CONFIG_SYS_CACHELINE_SIZE 32
  390. #ifdef CONFIG_CMD_KGDB
  391. #define CONFIG_SYS_CACHELINE_SHIFT 5 /* log base 2 of the above value */
  392. #endif
  393. /*-----------------------------------------------------------------------
  394. * IDE/ATA definitions
  395. */
  396. #undef CONFIG_IDE_LED /* No IDE LED */
  397. #define CONFIG_IDE_RESET /* no reset for ide supported */
  398. #define CONFIG_IDE_PREINIT /* check for units */
  399. #define CONFIG_LBA48 /* 48 bit LBA supported */
  400. #if defined(CONFIG_LAN) || defined(CONFIG_HLAN) || defined(CONFIG_HGLAN)
  401. #define CONFIG_SYS_IDE_MAXBUS 1 /* Scan only 1 IDE bus */
  402. #define CONFIG_SYS_IDE_MAXDEVICE 1 /* Only 1 drive per IDE bus */
  403. #elif defined(CONFIG_HGTL)
  404. #define CONFIG_SYS_IDE_MAXBUS 2 /* Max. 2 IDE busses */
  405. #define CONFIG_SYS_IDE_MAXDEVICE 2 /* max. 2 drives per IDE bus */
  406. #else
  407. #error Config IDE: Unknown LinkStation type
  408. #endif
  409. #define CONFIG_SYS_ATA_BASE_ADDR 0
  410. #define CONFIG_SYS_ATA_DATA_OFFSET 0 /* Offset for data I/O */
  411. #define CONFIG_SYS_ATA_REG_OFFSET 0 /* Offset for normal registers */
  412. #define CONFIG_SYS_ATA_ALT_OFFSET 0 /* Offset for alternate registers */
  413. /*-----------------------------------------------------------------------
  414. * Partitions and file system
  415. */
  416. #define CONFIG_DOS_PARTITION
  417. /*-----------------------------------------------------------------------
  418. * Internal Definitions
  419. *
  420. * Boot Flags
  421. */
  422. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  423. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  424. #endif /* __CONFIG_H */