sacsng.h 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074
  1. /*
  2. * (C) Copyright 2000
  3. * Murray Jensen <Murray.Jensen@cmst.csiro.au>
  4. *
  5. * (C) Copyright 2000
  6. * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  7. * Marius Groeger <mgroeger@sysgo.de>
  8. *
  9. * (C) Copyright 2001
  10. * Advent Networks, Inc. <http://www.adventnetworks.com>
  11. * Jay Monkman <jtm@smoothsmoothie.com>
  12. *
  13. * Configuration settings for the WindRiver SBC8260 board.
  14. * See http://www.windriver.com/products/html/sbc8260.html
  15. *
  16. * See file CREDITS for list of people who contributed to this
  17. * project.
  18. *
  19. * This program is free software; you can redistribute it and/or
  20. * modify it under the terms of the GNU General Public License as
  21. * published by the Free Software Foundation; either version 2 of
  22. * the License, or (at your option) any later version.
  23. *
  24. * This program is distributed in the hope that it will be useful,
  25. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  26. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  27. * GNU General Public License for more details.
  28. *
  29. * You should have received a copy of the GNU General Public License
  30. * along with this program; if not, write to the Free Software
  31. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  32. * MA 02111-1307 USA
  33. */
  34. #ifndef __CONFIG_H
  35. #define __CONFIG_H
  36. #undef DEBUG /* General debug */
  37. #undef DEBUG_BOOTP_EXT /* Debug received vendor fields */
  38. #undef CONFIG_LOGBUFFER /* External logbuffer support */
  39. /*****************************************************************************
  40. *
  41. * These settings must match the way _your_ board is set up
  42. *
  43. *****************************************************************************/
  44. /* What is the oscillator's (UX2) frequency in Hz? */
  45. #define CONFIG_8260_CLKIN 66666600
  46. /*-----------------------------------------------------------------------
  47. * MODCK_H & MODCLK[1-3] - Ref: Section 9.2 in MPC8206 User Manual
  48. *-----------------------------------------------------------------------
  49. * What should MODCK_H be? It is dependent on the oscillator
  50. * frequency, MODCK[1-3], and desired CPM and core frequencies.
  51. * Here are some example values (all frequencies are in MHz):
  52. *
  53. * MODCK_H MODCK[1-3] Osc CPM Core S2-6 S2-7 S2-8
  54. * ------- ---------- --- --- ---- ----- ----- -----
  55. * 0x1 0x5 33 100 133 Open Close Open
  56. * 0x1 0x6 33 100 166 Open Open Close
  57. * 0x1 0x7 33 100 200 Open Open Open
  58. *
  59. * 0x2 0x2 33 133 133 Close Open Close
  60. * 0x2 0x3 33 133 166 Close Open Open
  61. * 0x2 0x4 33 133 200 Open Close Close
  62. * 0x2 0x5 33 133 233 Open Close Open
  63. * 0x2 0x6 33 133 266 Open Open Close
  64. *
  65. * 0x5 0x5 66 133 133 Open Close Open
  66. * 0x5 0x6 66 133 166 Open Open Close
  67. * 0x5 0x7 66 133 200 Open Open Open
  68. * 0x6 0x0 66 133 233 Close Close Close
  69. * 0x6 0x1 66 133 266 Close Close Open
  70. * 0x6 0x2 66 133 300 Close Open Close
  71. */
  72. #define CFG_SBC_MODCK_H 0x05
  73. /* Define this if you want to boot from 0x00000100. If you don't define
  74. * this, you will need to program the bootloader to 0xfff00000, and
  75. * get the hardware reset config words at 0xfe000000. The simplest
  76. * way to do that is to program the bootloader at both addresses.
  77. * It is suggested that you just let U-Boot live at 0x00000000.
  78. */
  79. #define CFG_SBC_BOOT_LOW 1
  80. /* What should the base address of the main FLASH be and how big is
  81. * it (in MBytes)? This must contain TEXT_BASE from board/sacsng/config.mk
  82. * The main FLASH is whichever is connected to *CS0.
  83. */
  84. #define CFG_FLASH0_BASE 0x40000000
  85. #define CFG_FLASH0_SIZE 2
  86. /* What should the base address of the secondary FLASH be and how big
  87. * is it (in Mbytes)? The secondary FLASH is whichever is connected
  88. * to *CS6.
  89. */
  90. #define CFG_FLASH1_BASE 0x60000000
  91. #define CFG_FLASH1_SIZE 2
  92. /* Define CONFIG_VERY_BIG_RAM to allow use of SDRAMs larger than 256MBytes
  93. */
  94. #define CONFIG_VERY_BIG_RAM 1
  95. /* What should be the base address of SDRAM DIMM and how big is
  96. * it (in Mbytes)? This will normally auto-configure via the SPD.
  97. */
  98. #define CFG_SDRAM0_BASE 0x00000000
  99. #define CFG_SDRAM0_SIZE 64
  100. /*
  101. * Memory map example with 64 MB DIMM:
  102. *
  103. * 0x0000 0000 Exception Vector code, 8k
  104. * :
  105. * 0x0000 1FFF
  106. * 0x0000 2000 Free for Application Use
  107. * :
  108. * :
  109. *
  110. * :
  111. * :
  112. * 0x03F5 FF30 Monitor Stack (Growing downward)
  113. * Monitor Stack Buffer (0x80)
  114. * 0x03F5 FFB0 Board Info Data
  115. * 0x03F6 0000 Malloc Arena
  116. * : CFG_ENV_SECT_SIZE, 16k
  117. * : CFG_MALLOC_LEN, 128k
  118. * 0x03FC 0000 RAM Copy of Monitor Code
  119. * : CFG_MONITOR_LEN, 256k
  120. * 0x03FF FFFF [End of RAM], CFG_SDRAM_SIZE - 1
  121. */
  122. #define CONFIG_POST (CFG_POST_MEMORY | \
  123. CFG_POST_CPU)
  124. /*
  125. * select serial console configuration
  126. *
  127. * if either CONFIG_CONS_ON_SMC or CONFIG_CONS_ON_SCC is selected, then
  128. * CONFIG_CONS_INDEX must be set to the channel number (1-2 for SMC, 1-4
  129. * for SCC).
  130. *
  131. * if CONFIG_CONS_NONE is defined, then the serial console routines must
  132. * defined elsewhere.
  133. */
  134. #define CONFIG_CONS_ON_SMC 1 /* define if console on SMC */
  135. #undef CONFIG_CONS_ON_SCC /* define if console on SCC */
  136. #undef CONFIG_CONS_NONE /* define if console on neither */
  137. #define CONFIG_CONS_INDEX 1 /* which SMC/SCC channel for console */
  138. /*
  139. * select ethernet configuration
  140. *
  141. * if either CONFIG_ETHER_ON_SCC or CONFIG_ETHER_ON_FCC is selected, then
  142. * CONFIG_ETHER_INDEX must be set to the channel number (1-4 for SCC, 1-3
  143. * for FCC)
  144. *
  145. * if CONFIG_ETHER_NONE is defined, then either the ethernet routines must be
  146. * defined elsewhere (as for the console), or CFG_CMD_NET must be removed
  147. * from CONFIG_COMMANDS to remove support for networking.
  148. */
  149. #undef CONFIG_ETHER_ON_SCC
  150. #define CONFIG_ETHER_ON_FCC
  151. #undef CONFIG_ETHER_NONE /* define if ethernet on neither */
  152. #ifdef CONFIG_ETHER_ON_SCC
  153. #define CONFIG_ETHER_INDEX 1 /* which SCC/FCC channel for ethernet */
  154. #endif /* CONFIG_ETHER_ON_SCC */
  155. #ifdef CONFIG_ETHER_ON_FCC
  156. #define CONFIG_ETHER_INDEX 2 /* which SCC/FCC channel for ethernet */
  157. #undef CONFIG_ETHER_LOOPBACK_TEST /* Ethernet external loopback test */
  158. #define CONFIG_MII /* MII PHY management */
  159. #define CONFIG_BITBANGMII /* bit-bang MII PHY management */
  160. /*
  161. * Port pins used for bit-banged MII communictions (if applicable).
  162. */
  163. #define MDIO_PORT 2 /* Port A=0, B=1, C=2, D=3 */
  164. #define MDIO_ACTIVE (iop->pdir |= 0x40000000)
  165. #define MDIO_TRISTATE (iop->pdir &= ~0x40000000)
  166. #define MDIO_READ ((iop->pdat & 0x40000000) != 0)
  167. #define MDIO(bit) if(bit) iop->pdat |= 0x40000000; \
  168. else iop->pdat &= ~0x40000000
  169. #define MDC(bit) if(bit) iop->pdat |= 0x80000000; \
  170. else iop->pdat &= ~0x80000000
  171. #define MIIDELAY udelay(50)
  172. #endif /* CONFIG_ETHER_ON_FCC */
  173. #if defined(CONFIG_ETHER_ON_SCC) && (CONFIG_ETHER_INDEX == 1)
  174. /*
  175. * - RX clk is CLK11
  176. * - TX clk is CLK12
  177. */
  178. # define CFG_CMXSCR_VALUE (CMXSCR_RS1CS_CLK11 | CMXSCR_TS1CS_CLK12)
  179. #elif defined(CONFIG_ETHER_ON_FCC) && (CONFIG_ETHER_INDEX == 2)
  180. /*
  181. * - Rx-CLK is CLK13
  182. * - Tx-CLK is CLK14
  183. * - Select bus for bd/buffers (see 28-13)
  184. * - Enable Full Duplex in FSMR
  185. */
  186. # define CFG_CMXFCR_MASK (CMXFCR_FC2|CMXFCR_RF2CS_MSK|CMXFCR_TF2CS_MSK)
  187. # define CFG_CMXFCR_VALUE (CMXFCR_RF2CS_CLK13|CMXFCR_TF2CS_CLK14)
  188. # define CFG_CPMFCR_RAMTYPE 0
  189. # define CFG_FCC_PSMR (FCC_PSMR_FDE | FCC_PSMR_LPB)
  190. #endif /* CONFIG_ETHER_ON_FCC, CONFIG_ETHER_INDEX */
  191. #define CONFIG_SHOW_BOOT_PROGRESS 1 /* boot progress enabled */
  192. /*
  193. * Configure for RAM tests.
  194. */
  195. #undef CFG_DRAM_TEST /* calls other tests in board.c */
  196. /*
  197. * Status LED for power up status feedback.
  198. */
  199. #define CONFIG_STATUS_LED 1 /* Status LED enabled */
  200. #define STATUS_LED_PAR im_ioport.iop_ppara
  201. #define STATUS_LED_DIR im_ioport.iop_pdira
  202. #define STATUS_LED_ODR im_ioport.iop_podra
  203. #define STATUS_LED_DAT im_ioport.iop_pdata
  204. #define STATUS_LED_BIT 0x00000800 /* LED 0 is on PA.20 */
  205. #define STATUS_LED_PERIOD (CFG_HZ)
  206. #define STATUS_LED_STATE STATUS_LED_OFF
  207. #define STATUS_LED_BIT1 0x00001000 /* LED 1 is on PA.19 */
  208. #define STATUS_LED_PERIOD1 (CFG_HZ)
  209. #define STATUS_LED_STATE1 STATUS_LED_OFF
  210. #define STATUS_LED_BIT2 0x00002000 /* LED 2 is on PA.18 */
  211. #define STATUS_LED_PERIOD2 (CFG_HZ/2)
  212. #define STATUS_LED_STATE2 STATUS_LED_ON
  213. #define STATUS_LED_ACTIVE 0 /* LED on for bit == 0 */
  214. #define STATUS_LED_YELLOW 0
  215. #define STATUS_LED_GREEN 1
  216. #define STATUS_LED_RED 2
  217. #define STATUS_LED_BOOT 1
  218. /*
  219. * Select SPI support configuration
  220. */
  221. #define CONFIG_SOFT_SPI /* Enable SPI driver */
  222. #define MAX_SPI_BYTES 4 /* Maximum number of bytes we can handle */
  223. #undef DEBUG_SPI /* Disable SPI debugging */
  224. /*
  225. * Software (bit-bang) SPI driver configuration
  226. */
  227. #ifdef CONFIG_SOFT_SPI
  228. /*
  229. * Software (bit-bang) SPI driver configuration
  230. */
  231. #define I2C_SCLK 0x00002000 /* PD 18: Shift clock */
  232. #define I2C_MOSI 0x00004000 /* PD 17: Master Out, Slave In */
  233. #define I2C_MISO 0x00008000 /* PD 16: Master In, Slave Out */
  234. #undef SPI_INIT /* no port initialization needed */
  235. #define SPI_READ ((immr->im_ioport.iop_pdatd & I2C_MISO) != 0)
  236. #define SPI_SDA(bit) if(bit) immr->im_ioport.iop_pdatd |= I2C_MOSI; \
  237. else immr->im_ioport.iop_pdatd &= ~I2C_MOSI
  238. #define SPI_SCL(bit) if(bit) immr->im_ioport.iop_pdatd |= I2C_SCLK; \
  239. else immr->im_ioport.iop_pdatd &= ~I2C_SCLK
  240. #define SPI_DELAY /* No delay is needed */
  241. #endif /* CONFIG_SOFT_SPI */
  242. /*
  243. * select I2C support configuration
  244. *
  245. * Supported configurations are {none, software, hardware} drivers.
  246. * If the software driver is chosen, there are some additional
  247. * configuration items that the driver uses to drive the port pins.
  248. */
  249. #undef CONFIG_HARD_I2C /* I2C with hardware support */
  250. #define CONFIG_SOFT_I2C 1 /* I2C bit-banged */
  251. #define CFG_I2C_SPEED 400000 /* I2C speed and slave address */
  252. #define CFG_I2C_SLAVE 0x7F
  253. /*
  254. * Software (bit-bang) I2C driver configuration
  255. */
  256. #ifdef CONFIG_SOFT_I2C
  257. #define I2C_PORT 3 /* Port A=0, B=1, C=2, D=3 */
  258. #define I2C_ACTIVE (iop->pdir |= 0x00010000)
  259. #define I2C_TRISTATE (iop->pdir &= ~0x00010000)
  260. #define I2C_READ ((iop->pdat & 0x00010000) != 0)
  261. #define I2C_SDA(bit) if(bit) iop->pdat |= 0x00010000; \
  262. else iop->pdat &= ~0x00010000
  263. #define I2C_SCL(bit) if(bit) iop->pdat |= 0x00020000; \
  264. else iop->pdat &= ~0x00020000
  265. #define I2C_DELAY udelay(20) /* 1/4 I2C clock duration */
  266. #endif /* CONFIG_SOFT_I2C */
  267. /* Define this to reserve an entire FLASH sector for
  268. * environment variables. Otherwise, the environment will be
  269. * put in the same sector as U-Boot, and changing variables
  270. * will erase U-Boot temporarily
  271. */
  272. #define CFG_ENV_IN_OWN_SECT 1
  273. /* Define this to contain any number of null terminated strings that
  274. * will be part of the default enviroment compiled into the boot image.
  275. */
  276. #define CONFIG_EXTRA_ENV_SETTINGS \
  277. "quiet=0\0" \
  278. "serverip=192.168.123.205\0" \
  279. "ipaddr=192.168.123.203\0" \
  280. "checkhostname=VR8500\0" \
  281. "reprog="\
  282. "bootp; " \
  283. "tftpboot 0x140000 /bdi2000/u-boot.bin; " \
  284. "protect off 60000000 6003FFFF; " \
  285. "erase 60000000 6003FFFF; " \
  286. "cp.b 140000 60000000 $(filesize); " \
  287. "protect on 60000000 6003FFFF\0" \
  288. "copyenv="\
  289. "protect off 60040000 6004FFFF; " \
  290. "erase 60040000 6004FFFF; " \
  291. "cp.b 40040000 60040000 10000; " \
  292. "protect on 60040000 6004FFFF\0" \
  293. "copyprog="\
  294. "protect off 60000000 6003FFFF; " \
  295. "erase 60000000 6003FFFF; " \
  296. "cp.b 40000000 60000000 40000; " \
  297. "protect on 60000000 6003FFFF\0" \
  298. "zapenv="\
  299. "protect off 40040000 4004FFFF; " \
  300. "erase 40040000 4004FFFF; " \
  301. "protect on 40040000 4004FFFF\0" \
  302. "zapotherenv="\
  303. "protect off 60040000 6004FFFF; " \
  304. "erase 60040000 6004FFFF; " \
  305. "protect on 60040000 6004FFFF\0" \
  306. "root-on-initrd="\
  307. "setenv bootcmd "\
  308. "version\\;" \
  309. "echo\\;" \
  310. "bootp\\;" \
  311. "setenv bootargs root=/dev/ram0 rw quiet " \
  312. "ip=\\$(ipaddr):\\$(serverip):\\$(gatewayip):\\$(netmask):\\$(hostname)::off\\;" \
  313. "run boot-hook\\;" \
  314. "bootm\0" \
  315. "root-on-initrd-debug="\
  316. "setenv bootcmd "\
  317. "version\\;" \
  318. "echo\\;" \
  319. "bootp\\;" \
  320. "setenv bootargs root=/dev/ram0 rw debug " \
  321. "ip=\\$(ipaddr):\\$(serverip):\\$(gatewayip):\\$(netmask):\\$(hostname)::off\\;" \
  322. "run debug-hook\\;" \
  323. "run boot-hook\\;" \
  324. "bootm\0" \
  325. "root-on-nfs="\
  326. "setenv bootcmd "\
  327. "version\\;" \
  328. "echo\\;" \
  329. "bootp\\;" \
  330. "setenv bootargs root=/dev/nfs rw quiet " \
  331. "nfsroot=\\$(serverip):\\$(rootpath) " \
  332. "ip=\\$(ipaddr):\\$(serverip):\\$(gatewayip):\\$(netmask):\\$(hostname)::off\\;" \
  333. "run boot-hook\\;" \
  334. "bootm\0" \
  335. "root-on-nfs-debug="\
  336. "setenv bootcmd "\
  337. "version\\;" \
  338. "echo\\;" \
  339. "bootp\\;" \
  340. "setenv bootargs root=/dev/nfs rw debug " \
  341. "nfsroot=\\$(serverip):\\$(rootpath) " \
  342. "ip=\\$(ipaddr):\\$(serverip):\\$(gatewayip):\\$(netmask):\\$(hostname)::off\\;" \
  343. "run debug-hook\\;" \
  344. "run boot-hook\\;" \
  345. "bootm\0" \
  346. "debug-checkout="\
  347. "setenv checkhostname;" \
  348. "setenv ethaddr 00:09:70:00:00:01;" \
  349. "bootp;" \
  350. "setenv bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath) debug " \
  351. "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;" \
  352. "run debug-hook;" \
  353. "run boot-hook;" \
  354. "bootm\0" \
  355. "debug-hook="\
  356. "echo ipaddr $(ipaddr);" \
  357. "echo serverip $(serverip);" \
  358. "echo gatewayip $(gatewayip);" \
  359. "echo netmask $(netmask);" \
  360. "echo hostname $(hostname)\0" \
  361. "ana=run adc ; run dac\0" \
  362. "adc=run adc-12 ; run adc-34\0" \
  363. "adc-12=echo ### ADC-12 ; imd.b e 81 e\0" \
  364. "adc-34=echo ### ADC-34 ; imd.b f 81 e\0" \
  365. "dac=echo ### DAC ; imd.b 11 81 5\0" \
  366. "boot-hook=echo\0"
  367. /* What should the console's baud rate be? */
  368. #define CONFIG_BAUDRATE 9600
  369. /* Ethernet MAC address */
  370. #define CONFIG_ETHADDR 00:09:70:00:00:00
  371. /* The default Ethernet MAC address can be overwritten just once */
  372. #ifdef CONFIG_ETHADDR
  373. #define CONFIG_OVERWRITE_ETHADDR_ONCE 1
  374. #endif
  375. /*
  376. * Define this to do some miscellaneous board-specific initialization.
  377. */
  378. #define CONFIG_MISC_INIT_R
  379. /* Set to a positive value to delay for running BOOTCOMMAND */
  380. #define CONFIG_BOOTDELAY 1 /* autoboot after 1 second */
  381. /* Be selective on what keys can delay or stop the autoboot process
  382. * To stop use: " "
  383. */
  384. #define CONFIG_AUTOBOOT_KEYED
  385. #define CONFIG_AUTOBOOT_PROMPT "Autobooting...\n"
  386. #define CONFIG_AUTOBOOT_STOP_STR " "
  387. #undef CONFIG_AUTOBOOT_DELAY_STR
  388. #define CONFIG_ZERO_BOOTDELAY_CHECK
  389. #define DEBUG_BOOTKEYS 0
  390. /* Define a command string that is automatically executed when no character
  391. * is read on the console interface withing "Boot Delay" after reset.
  392. */
  393. #undef CONFIG_BOOT_ROOT_INITRD /* Use ram disk for the root file system */
  394. #define CONFIG_BOOT_ROOT_NFS /* Use a NFS mounted root file system */
  395. #ifdef CONFIG_BOOT_ROOT_INITRD
  396. #define CONFIG_BOOTCOMMAND \
  397. "version;" \
  398. "echo;" \
  399. "bootp;" \
  400. "setenv bootargs root=/dev/ram0 rw quiet " \
  401. "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;" \
  402. "run boot-hook;" \
  403. "bootm"
  404. #endif /* CONFIG_BOOT_ROOT_INITRD */
  405. #ifdef CONFIG_BOOT_ROOT_NFS
  406. #define CONFIG_BOOTCOMMAND \
  407. "version;" \
  408. "echo;" \
  409. "bootp;" \
  410. "setenv bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath) quiet " \
  411. "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;" \
  412. "run boot-hook;" \
  413. "bootm"
  414. #endif /* CONFIG_BOOT_ROOT_NFS */
  415. #define CONFIG_BOOTP_RANDOM_DELAY /* Randomize the BOOTP retry delay */
  416. /* Add support for a few extra bootp options like:
  417. * - File size
  418. * - DNS (up to 2 servers)
  419. * - Send hostname to DHCP server
  420. */
  421. #define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT | \
  422. CONFIG_BOOTP_BOOTFILESIZE | \
  423. CONFIG_BOOTP_DNS | \
  424. CONFIG_BOOTP_DNS2 | \
  425. CONFIG_BOOTP_SEND_HOSTNAME)
  426. /* undef this to save memory */
  427. #define CFG_LONGHELP
  428. /* Monitor Command Prompt */
  429. #define CFG_PROMPT "=> "
  430. #undef CFG_HUSH_PARSER
  431. #ifdef CFG_HUSH_PARSER
  432. #define CFG_PROMPT_HUSH_PS2 "> "
  433. #endif
  434. /* When CONFIG_TIMESTAMP is selected, the timestamp (date and time)
  435. * of an image is printed by image commands like bootm or iminfo.
  436. */
  437. #define CONFIG_TIMESTAMP
  438. /* If this variable is defined, an environment variable named "ver"
  439. * is created by U-Boot showing the U-Boot version.
  440. */
  441. #define CONFIG_VERSION_VARIABLE
  442. /* What U-Boot subsytems do you want enabled? */
  443. #ifdef CONFIG_ETHER_ON_FCC
  444. # define CONFIG_COMMANDS (((CONFIG_CMD_DFL & ~(CFG_CMD_KGDB))) | \
  445. CFG_CMD_ELF | \
  446. CFG_CMD_ASKENV | \
  447. CFG_CMD_ECHO | \
  448. CFG_CMD_I2C | \
  449. CFG_CMD_SPI | \
  450. CFG_CMD_SDRAM | \
  451. CFG_CMD_REGINFO | \
  452. CFG_CMD_IMMAP | \
  453. CFG_CMD_IRQ | \
  454. CFG_CMD_PING | \
  455. CFG_CMD_MII )
  456. #else
  457. # define CONFIG_COMMANDS (((CONFIG_CMD_DFL & ~(CFG_CMD_KGDB))) | \
  458. CFG_CMD_ELF | \
  459. CFG_CMD_ASKENV | \
  460. CFG_CMD_ECHO | \
  461. CFG_CMD_I2C | \
  462. CFG_CMD_SPI | \
  463. CFG_CMD_SDRAM | \
  464. CFG_CMD_REGINFO | \
  465. CFG_CMD_IMMAP | \
  466. CFG_CMD_IRQ | \
  467. CFG_CMD_PING )
  468. #endif /* CONFIG_ETHER_ON_FCC */
  469. /* Where do the internal registers live? */
  470. #define CFG_IMMR 0xF0000000
  471. #undef CONFIG_WATCHDOG /* disable the watchdog */
  472. /*****************************************************************************
  473. *
  474. * You should not have to modify any of the following settings
  475. *
  476. *****************************************************************************/
  477. #define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
  478. #define CONFIG_SBC8260 1 /* on an EST SBC8260 Board */
  479. #define CONFIG_SACSng 1 /* munged for the SACSng */
  480. #define CONFIG_CPM2 1 /* Has a CPM2 */
  481. /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
  482. #include <cmd_confdefs.h>
  483. /*
  484. * Miscellaneous configurable options
  485. */
  486. #define CFG_BOOTM_HEADER_QUIET 1 /* Suppress the image header dump */
  487. /* in the bootm command. */
  488. #define CFG_BOOTM_PROGESS_QUIET 1 /* Suppress the progress displays, */
  489. /* "## <message>" from the bootm cmd */
  490. #define CFG_BOOTP_CHECK_HOSTNAME 1 /* If checkhostname environment is */
  491. /* defined, then the hostname param */
  492. /* validated against checkhostname. */
  493. #define CFG_BOOTP_RETRY_COUNT 0x40000000 /* # of timeouts before giving up */
  494. #define CFG_BOOTP_SHORT_RANDOM_DELAY 1 /* Use a short random delay value */
  495. /* (limited to maximum of 1024 msec) */
  496. #define CFG_CHK_FOR_ABORT_AT_LEAST_ONCE 1
  497. /* Check for abort key presses */
  498. /* at least once in dependent of the */
  499. /* CONFIG_BOOTDELAY value. */
  500. #define CFG_CONSOLE_INFO_QUIET 1 /* Don't print console @ startup */
  501. #define CFG_FAULT_ECHO_LINK_DOWN 1 /* Echo the inverted Ethernet link */
  502. /* state to the fault LED. */
  503. #define CFG_FAULT_MII_ADDR 0x02 /* MII addr of the PHY to check for */
  504. /* the Ethernet link state. */
  505. #define CFG_STATUS_FLASH_UNTIL_TFTP_OK 1 /* Keeping the status LED flashing */
  506. /* until the TFTP is successful. */
  507. #define CFG_STATUS_OFF_AFTER_NETBOOT 1 /* After a successful netboot, */
  508. /* turn off the STATUS LEDs. */
  509. #define CFG_TFTP_BLINK_STATUS_ON_DATA_IN 1 /* Blink status LED based on */
  510. /* incoming data. */
  511. #define CFG_TFTP_BLOCKS_PER_HASH 100 /* For every XX blocks, output a '#' */
  512. /* to signify that tftp is moving. */
  513. #define CFG_TFTP_HASHES_PER_FLASH 200 /* For every '#' hashes, */
  514. /* flash the status LED. */
  515. #define CFG_TFTP_HASHES_PER_LINE 65 /* Only output XX '#'s per line */
  516. /* during the tftp file transfer. */
  517. #define CFG_TFTP_PROGESS_QUIET 1 /* Suppress the progress displays */
  518. /* '#'s from the tftp command. */
  519. #define CFG_TFTP_STATUS_QUIET 1 /* Suppress the status displays */
  520. /* issued during the tftp command. */
  521. #define CFG_TFTP_TIMEOUT_COUNT 5 /* How many timeouts TFTP will allow */
  522. /* before it gives up. */
  523. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  524. # define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
  525. #else
  526. # define CFG_CBSIZE 256 /* Console I/O Buffer Size */
  527. #endif
  528. /* Print Buffer Size */
  529. #define CFG_PBSIZE (CFG_CBSIZE + sizeof(CFG_PROMPT)+16)
  530. #define CFG_MAXARGS 32 /* max number of command args */
  531. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  532. #define CFG_LOAD_ADDR 0x400000 /* default load address */
  533. #define CFG_HZ 1000 /* decrementer freq: 1 ms ticks */
  534. #define CFG_ALT_MEMTEST /* Select full-featured memory test */
  535. #define CFG_MEMTEST_START 0x2000 /* memtest works from the end of */
  536. /* the exception vector table */
  537. /* to the end of the DRAM */
  538. /* less monitor and malloc area */
  539. #define CFG_STACK_USAGE 0x10000 /* Reserve 64k for the stack usage */
  540. #define CFG_MEM_END_USAGE ( CFG_MONITOR_LEN \
  541. + CFG_MALLOC_LEN \
  542. + CFG_ENV_SECT_SIZE \
  543. + CFG_STACK_USAGE )
  544. #define CFG_MEMTEST_END ( CFG_SDRAM_SIZE * 1024 * 1024 \
  545. - CFG_MEM_END_USAGE )
  546. /* valid baudrates */
  547. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  548. /*
  549. * Low Level Configuration Settings
  550. * (address mappings, register initial values, etc.)
  551. * You should know what you are doing if you make changes here.
  552. */
  553. #define CFG_FLASH_BASE CFG_FLASH0_BASE
  554. #define CFG_FLASH_SIZE CFG_FLASH0_SIZE
  555. #define CFG_SDRAM_BASE CFG_SDRAM0_BASE
  556. #define CFG_SDRAM_SIZE CFG_SDRAM0_SIZE
  557. /*-----------------------------------------------------------------------
  558. * Hard Reset Configuration Words
  559. */
  560. #if defined(CFG_SBC_BOOT_LOW)
  561. # define CFG_SBC_HRCW_BOOT_FLAGS (HRCW_CIP | HRCW_BMS)
  562. #else
  563. # define CFG_SBC_HRCW_BOOT_FLAGS (0)
  564. #endif /* defined(CFG_SBC_BOOT_LOW) */
  565. /* get the HRCW ISB field from CFG_IMMR */
  566. #define CFG_SBC_HRCW_IMMR ( ((CFG_IMMR & 0x10000000) >> 10) | \
  567. ((CFG_IMMR & 0x01000000) >> 7) | \
  568. ((CFG_IMMR & 0x00100000) >> 4) )
  569. #define CFG_HRCW_MASTER ( HRCW_BPS10 | \
  570. HRCW_DPPC11 | \
  571. CFG_SBC_HRCW_IMMR | \
  572. HRCW_MMR00 | \
  573. HRCW_LBPC11 | \
  574. HRCW_APPC10 | \
  575. HRCW_CS10PC00 | \
  576. (CFG_SBC_MODCK_H & HRCW_MODCK_H1111) | \
  577. CFG_SBC_HRCW_BOOT_FLAGS )
  578. /* no slaves */
  579. #define CFG_HRCW_SLAVE1 0
  580. #define CFG_HRCW_SLAVE2 0
  581. #define CFG_HRCW_SLAVE3 0
  582. #define CFG_HRCW_SLAVE4 0
  583. #define CFG_HRCW_SLAVE5 0
  584. #define CFG_HRCW_SLAVE6 0
  585. #define CFG_HRCW_SLAVE7 0
  586. /*-----------------------------------------------------------------------
  587. * Definitions for initial stack pointer and data area (in DPRAM)
  588. */
  589. #define CFG_INIT_RAM_ADDR CFG_IMMR
  590. #define CFG_INIT_RAM_END 0x4000 /* End of used area in DPRAM */
  591. #define CFG_GBL_DATA_SIZE 128 /* bytes reserved for initial data */
  592. #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
  593. #define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
  594. /*-----------------------------------------------------------------------
  595. * Start addresses for the final memory configuration
  596. * (Set up by the startup code)
  597. * Please note that CFG_SDRAM_BASE _must_ start at 0
  598. * Note also that the logic that sets CFG_RAMBOOT is platform dependent.
  599. */
  600. #define CFG_MONITOR_BASE CFG_FLASH0_BASE
  601. #if (CFG_MONITOR_BASE < CFG_FLASH_BASE)
  602. # define CFG_RAMBOOT
  603. #endif
  604. #define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
  605. #define CFG_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
  606. /*
  607. * For booting Linux, the board info and command line data
  608. * have to be in the first 8 MB of memory, since this is
  609. * the maximum mapped by the Linux kernel during initialization.
  610. */
  611. #define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
  612. /*-----------------------------------------------------------------------
  613. * FLASH and environment organization
  614. */
  615. #define CFG_FLASH_CFI 1 /* Flash is CFI conformant */
  616. #undef CFG_FLASH_PROTECTION /* use hardware protection */
  617. #define CFG_MAX_FLASH_BANKS 2 /* max number of memory banks */
  618. #define CFG_MAX_FLASH_SECT (64+4) /* max number of sectors on one chip */
  619. #define CFG_FLASH_ERASE_TOUT 8000 /* Timeout for Flash Erase (in ms) */
  620. #define CFG_FLASH_WRITE_TOUT 1 /* Timeout for Flash Write (in ms) */
  621. #ifndef CFG_RAMBOOT
  622. # define CFG_ENV_IS_IN_FLASH 1
  623. # ifdef CFG_ENV_IN_OWN_SECT
  624. # define CFG_ENV_ADDR (CFG_MONITOR_BASE + CFG_MONITOR_LEN)
  625. # define CFG_ENV_SECT_SIZE 0x10000
  626. # else
  627. # define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_MONITOR_LEN - CFG_ENV_SECT_SIZE)
  628. # define CFG_ENV_SIZE 0x1000 /* Total Size of Environment Sector */
  629. # define CFG_ENV_SECT_SIZE 0x10000 /* see README - env sect real size */
  630. # endif /* CFG_ENV_IN_OWN_SECT */
  631. #else
  632. # define CFG_ENV_IS_IN_NVRAM 1
  633. # define CFG_ENV_ADDR (CFG_MONITOR_BASE - 0x1000)
  634. # define CFG_ENV_SIZE 0x200
  635. #endif /* CFG_RAMBOOT */
  636. /*-----------------------------------------------------------------------
  637. * Cache Configuration
  638. */
  639. #define CFG_CACHELINE_SIZE 32 /* For MPC8260 CPU */
  640. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  641. # define CFG_CACHELINE_SHIFT 5 /* log base 2 of the above value */
  642. #endif
  643. /*-----------------------------------------------------------------------
  644. * HIDx - Hardware Implementation-dependent Registers 2-11
  645. *-----------------------------------------------------------------------
  646. * HID0 also contains cache control - initially enable both caches and
  647. * invalidate contents, then the final state leaves only the instruction
  648. * cache enabled. Note that Power-On and Hard reset invalidate the caches,
  649. * but Soft reset does not.
  650. *
  651. * HID1 has only read-only information - nothing to set.
  652. */
  653. #define CFG_HID0_INIT (HID0_ICE |\
  654. HID0_DCE |\
  655. HID0_ICFI |\
  656. HID0_DCI |\
  657. HID0_IFEM |\
  658. HID0_ABE)
  659. #define CFG_HID0_FINAL (HID0_ICE |\
  660. HID0_IFEM |\
  661. HID0_ABE |\
  662. HID0_EMCP)
  663. #define CFG_HID2 0
  664. /*-----------------------------------------------------------------------
  665. * RMR - Reset Mode Register
  666. *-----------------------------------------------------------------------
  667. */
  668. #define CFG_RMR 0
  669. /*-----------------------------------------------------------------------
  670. * BCR - Bus Configuration 4-25
  671. *-----------------------------------------------------------------------
  672. */
  673. #define CFG_BCR (BCR_ETM)
  674. /*-----------------------------------------------------------------------
  675. * SIUMCR - SIU Module Configuration 4-31
  676. *-----------------------------------------------------------------------
  677. */
  678. #define CFG_SIUMCR (SIUMCR_DPPC11 |\
  679. SIUMCR_L2CPC00 |\
  680. SIUMCR_APPC10 |\
  681. SIUMCR_MMR00)
  682. /*-----------------------------------------------------------------------
  683. * SYPCR - System Protection Control 11-9
  684. * SYPCR can only be written once after reset!
  685. *-----------------------------------------------------------------------
  686. * Watchdog & Bus Monitor Timer max, 60x Bus Monitor enable
  687. */
  688. #if defined(CONFIG_WATCHDOG)
  689. #define CFG_SYPCR (SYPCR_SWTC |\
  690. SYPCR_BMT |\
  691. SYPCR_PBME |\
  692. SYPCR_LBME |\
  693. SYPCR_SWRI |\
  694. SYPCR_SWP |\
  695. SYPCR_SWE)
  696. #else
  697. #define CFG_SYPCR (SYPCR_SWTC |\
  698. SYPCR_BMT |\
  699. SYPCR_PBME |\
  700. SYPCR_LBME |\
  701. SYPCR_SWRI |\
  702. SYPCR_SWP)
  703. #endif /* CONFIG_WATCHDOG */
  704. /*-----------------------------------------------------------------------
  705. * TMCNTSC - Time Counter Status and Control 4-40
  706. *-----------------------------------------------------------------------
  707. * Clear once per Second and Alarm Interrupt Status, Set 32KHz timersclk,
  708. * and enable Time Counter
  709. */
  710. #define CFG_TMCNTSC (TMCNTSC_SEC |\
  711. TMCNTSC_ALR |\
  712. TMCNTSC_TCF |\
  713. TMCNTSC_TCE)
  714. /*-----------------------------------------------------------------------
  715. * PISCR - Periodic Interrupt Status and Control 4-42
  716. *-----------------------------------------------------------------------
  717. * Clear Periodic Interrupt Status, Set 32KHz timersclk, and enable
  718. * Periodic timer
  719. */
  720. #define CFG_PISCR (PISCR_PS |\
  721. PISCR_PTF |\
  722. PISCR_PTE)
  723. /*-----------------------------------------------------------------------
  724. * SCCR - System Clock Control 9-8
  725. *-----------------------------------------------------------------------
  726. */
  727. #define CFG_SCCR 0
  728. /*-----------------------------------------------------------------------
  729. * RCCR - RISC Controller Configuration 13-7
  730. *-----------------------------------------------------------------------
  731. */
  732. #define CFG_RCCR 0
  733. /*
  734. * Initialize Memory Controller:
  735. *
  736. * Bank Bus Machine PortSz Device
  737. * ---- --- ------- ------ ------
  738. * 0 60x GPCM 16 bit FLASH (primary flash - 2MB)
  739. * 1 60x GPCM -- bit (Unused)
  740. * 2 60x SDRAM 64 bit SDRAM (DIMM)
  741. * 3 60x SDRAM 64 bit SDRAM (DIMM)
  742. * 4 60x GPCM -- bit (Unused)
  743. * 5 60x GPCM -- bit (Unused)
  744. * 6 60x GPCM 16 bit FLASH (secondary flash - 2MB)
  745. */
  746. /*-----------------------------------------------------------------------
  747. * BR0,BR1 - Base Register
  748. * Ref: Section 10.3.1 on page 10-14
  749. * OR0,OR1 - Option Register
  750. * Ref: Section 10.3.2 on page 10-18
  751. *-----------------------------------------------------------------------
  752. */
  753. /* Bank 0 - Primary FLASH
  754. */
  755. /* BR0 is configured as follows:
  756. *
  757. * - Base address of 0x40000000
  758. * - 16 bit port size
  759. * - Data errors checking is disabled
  760. * - Read and write access
  761. * - GPCM 60x bus
  762. * - Access are handled by the memory controller according to MSEL
  763. * - Not used for atomic operations
  764. * - No data pipelining is done
  765. * - Valid
  766. */
  767. #define CFG_BR0_PRELIM ((CFG_FLASH0_BASE & BRx_BA_MSK) |\
  768. BRx_PS_16 |\
  769. BRx_MS_GPCM_P |\
  770. BRx_V)
  771. /* OR0 is configured as follows:
  772. *
  773. * - 4 MB
  774. * - *BCTL0 is asserted upon access to the current memory bank
  775. * - *CW / *WE are negated a quarter of a clock earlier
  776. * - *CS is output at the same time as the address lines
  777. * - Uses a clock cycle length of 5
  778. * - *PSDVAL is generated internally by the memory controller
  779. * unless *GTA is asserted earlier externally.
  780. * - Relaxed timing is generated by the GPCM for accesses
  781. * initiated to this memory region.
  782. * - One idle clock is inserted between a read access from the
  783. * current bank and the next access.
  784. */
  785. #define CFG_OR0_PRELIM (MEG_TO_AM(CFG_FLASH0_SIZE) |\
  786. ORxG_CSNT |\
  787. ORxG_ACS_DIV1 |\
  788. ORxG_SCY_5_CLK |\
  789. ORxG_TRLX |\
  790. ORxG_EHTR)
  791. /*-----------------------------------------------------------------------
  792. * BR2,BR3 - Base Register
  793. * Ref: Section 10.3.1 on page 10-14
  794. * OR2,OR3 - Option Register
  795. * Ref: Section 10.3.2 on page 10-16
  796. *-----------------------------------------------------------------------
  797. */
  798. /* Bank 2,3 - SDRAM DIMM
  799. */
  800. /* The BR2 is configured as follows:
  801. *
  802. * - Base address of 0x00000000
  803. * - 64 bit port size (60x bus only)
  804. * - Data errors checking is disabled
  805. * - Read and write access
  806. * - SDRAM 60x bus
  807. * - Access are handled by the memory controller according to MSEL
  808. * - Not used for atomic operations
  809. * - No data pipelining is done
  810. * - Valid
  811. */
  812. #define CFG_BR2_PRELIM ((CFG_SDRAM0_BASE & BRx_BA_MSK) |\
  813. BRx_PS_64 |\
  814. BRx_MS_SDRAM_P |\
  815. BRx_V)
  816. #define CFG_BR3_PRELIM ((CFG_SDRAM0_BASE & BRx_BA_MSK) |\
  817. BRx_PS_64 |\
  818. BRx_MS_SDRAM_P |\
  819. BRx_V)
  820. /* With a 64 MB DIMM, the OR2 is configured as follows:
  821. *
  822. * - 64 MB
  823. * - 4 internal banks per device
  824. * - Row start address bit is A8 with PSDMR[PBI] = 0
  825. * - 12 row address lines
  826. * - Back-to-back page mode
  827. * - Internal bank interleaving within save device enabled
  828. */
  829. #if (CFG_SDRAM0_SIZE == 64)
  830. #define CFG_OR2_PRELIM (MEG_TO_AM(CFG_SDRAM0_SIZE) |\
  831. ORxS_BPD_4 |\
  832. ORxS_ROWST_PBI0_A8 |\
  833. ORxS_NUMR_12)
  834. #else
  835. #error "INVALID SDRAM CONFIGURATION"
  836. #endif
  837. /*-----------------------------------------------------------------------
  838. * PSDMR - 60x Bus SDRAM Mode Register
  839. * Ref: Section 10.3.3 on page 10-21
  840. *-----------------------------------------------------------------------
  841. */
  842. /* Address that the DIMM SPD memory lives at.
  843. */
  844. #define SDRAM_SPD_ADDR 0x50
  845. #if (CFG_SDRAM0_SIZE == 64)
  846. /* With a 64 MB DIMM, the PSDMR is configured as follows:
  847. *
  848. * - Bank Based Interleaving,
  849. * - Refresh Enable,
  850. * - Address Multiplexing where A5 is output on A14 pin
  851. * (A6 on A15, and so on),
  852. * - use address pins A14-A16 as bank select,
  853. * - A9 is output on SDA10 during an ACTIVATE command,
  854. * - earliest timing for ACTIVATE command after REFRESH command is 7 clocks,
  855. * - earliest timing for ACTIVATE or REFRESH command after PRECHARGE command
  856. * is 3 clocks,
  857. * - earliest timing for READ/WRITE command after ACTIVATE command is
  858. * 2 clocks,
  859. * - earliest timing for PRECHARGE after last data was read is 1 clock,
  860. * - earliest timing for PRECHARGE after last data was written is 1 clock,
  861. * - CAS Latency is 2.
  862. */
  863. #define CFG_PSDMR (PSDMR_RFEN |\
  864. PSDMR_SDAM_A14_IS_A5 |\
  865. PSDMR_BSMA_A14_A16 |\
  866. PSDMR_SDA10_PBI0_A9 |\
  867. PSDMR_RFRC_7_CLK |\
  868. PSDMR_PRETOACT_3W |\
  869. PSDMR_ACTTORW_2W |\
  870. PSDMR_LDOTOPRE_1C |\
  871. PSDMR_WRC_1C |\
  872. PSDMR_CL_2)
  873. #else
  874. #error "INVALID SDRAM CONFIGURATION"
  875. #endif
  876. /*
  877. * Shoot for approximately 1MHz on the prescaler.
  878. */
  879. #if (CONFIG_8260_CLKIN >= (60 * 1000 * 1000))
  880. #define CFG_MPTPR MPTPR_PTP_DIV64
  881. #elif (CONFIG_8260_CLKIN >= (30 * 1000 * 1000))
  882. #define CFG_MPTPR MPTPR_PTP_DIV32
  883. #else
  884. #warning "Unconfigured bus clock freq: check CFG_MPTPR and CFG_PSRT are OK"
  885. #define CFG_MPTPR MPTPR_PTP_DIV32
  886. #endif
  887. #define CFG_PSRT 14
  888. /*-----------------------------------------------------------------------
  889. * BR6 - Base Register
  890. * Ref: Section 10.3.1 on page 10-14
  891. * OR6 - Option Register
  892. * Ref: Section 10.3.2 on page 10-18
  893. *-----------------------------------------------------------------------
  894. */
  895. /* Bank 6 - Secondary FLASH
  896. *
  897. * The secondary FLASH is connected to *CS6
  898. */
  899. #if (defined(CFG_FLASH1_BASE) && defined(CFG_FLASH1_SIZE))
  900. /* BR6 is configured as follows:
  901. *
  902. * - Base address of 0x60000000
  903. * - 16 bit port size
  904. * - Data errors checking is disabled
  905. * - Read and write access
  906. * - GPCM 60x bus
  907. * - Access are handled by the memory controller according to MSEL
  908. * - Not used for atomic operations
  909. * - No data pipelining is done
  910. * - Valid
  911. */
  912. # define CFG_BR6_PRELIM ((CFG_FLASH1_BASE & BRx_BA_MSK) |\
  913. BRx_PS_16 |\
  914. BRx_MS_GPCM_P |\
  915. BRx_V)
  916. /* OR6 is configured as follows:
  917. *
  918. * - 2 MB
  919. * - *BCTL0 is asserted upon access to the current memory bank
  920. * - *CW / *WE are negated a quarter of a clock earlier
  921. * - *CS is output at the same time as the address lines
  922. * - Uses a clock cycle length of 5
  923. * - *PSDVAL is generated internally by the memory controller
  924. * unless *GTA is asserted earlier externally.
  925. * - Relaxed timing is generated by the GPCM for accesses
  926. * initiated to this memory region.
  927. * - One idle clock is inserted between a read access from the
  928. * current bank and the next access.
  929. */
  930. # define CFG_OR6_PRELIM (MEG_TO_AM(CFG_FLASH1_SIZE) |\
  931. ORxG_CSNT |\
  932. ORxG_ACS_DIV1 |\
  933. ORxG_SCY_5_CLK |\
  934. ORxG_TRLX |\
  935. ORxG_EHTR)
  936. #endif /* (defined(CFG_FLASH1_BASE) && defined(CFG_FLASH1_SIZE)) */
  937. /*
  938. * Internal Definitions
  939. *
  940. * Boot Flags
  941. */
  942. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  943. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  944. #endif /* __CONFIG_H */