sacsng.h 34 KB

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