sacsng.h 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072
  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_I2C | \
  448. CFG_CMD_SPI | \
  449. CFG_CMD_SDRAM | \
  450. CFG_CMD_REGINFO | \
  451. CFG_CMD_IMMAP | \
  452. CFG_CMD_IRQ | \
  453. CFG_CMD_PING | \
  454. CFG_CMD_MII )
  455. #else
  456. # define CONFIG_COMMANDS (((CONFIG_CMD_DFL & ~(CFG_CMD_KGDB))) | \
  457. CFG_CMD_ELF | \
  458. CFG_CMD_ASKENV | \
  459. CFG_CMD_I2C | \
  460. CFG_CMD_SPI | \
  461. CFG_CMD_SDRAM | \
  462. CFG_CMD_REGINFO | \
  463. CFG_CMD_IMMAP | \
  464. CFG_CMD_IRQ | \
  465. CFG_CMD_PING )
  466. #endif /* CONFIG_ETHER_ON_FCC */
  467. /* Where do the internal registers live? */
  468. #define CFG_IMMR 0xF0000000
  469. #undef CONFIG_WATCHDOG /* disable the watchdog */
  470. /*****************************************************************************
  471. *
  472. * You should not have to modify any of the following settings
  473. *
  474. *****************************************************************************/
  475. #define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
  476. #define CONFIG_SBC8260 1 /* on an EST SBC8260 Board */
  477. #define CONFIG_SACSng 1 /* munged for the SACSng */
  478. #define CONFIG_CPM2 1 /* Has a CPM2 */
  479. /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
  480. #include <cmd_confdefs.h>
  481. /*
  482. * Miscellaneous configurable options
  483. */
  484. #define CFG_BOOTM_HEADER_QUIET 1 /* Suppress the image header dump */
  485. /* in the bootm command. */
  486. #define CFG_BOOTM_PROGESS_QUIET 1 /* Suppress the progress displays, */
  487. /* "## <message>" from the bootm cmd */
  488. #define CFG_BOOTP_CHECK_HOSTNAME 1 /* If checkhostname environment is */
  489. /* defined, then the hostname param */
  490. /* validated against checkhostname. */
  491. #define CFG_BOOTP_RETRY_COUNT 0x40000000 /* # of timeouts before giving up */
  492. #define CFG_BOOTP_SHORT_RANDOM_DELAY 1 /* Use a short random delay value */
  493. /* (limited to maximum of 1024 msec) */
  494. #define CFG_CHK_FOR_ABORT_AT_LEAST_ONCE 1
  495. /* Check for abort key presses */
  496. /* at least once in dependent of the */
  497. /* CONFIG_BOOTDELAY value. */
  498. #define CFG_CONSOLE_INFO_QUIET 1 /* Don't print console @ startup */
  499. #define CFG_FAULT_ECHO_LINK_DOWN 1 /* Echo the inverted Ethernet link */
  500. /* state to the fault LED. */
  501. #define CFG_FAULT_MII_ADDR 0x02 /* MII addr of the PHY to check for */
  502. /* the Ethernet link state. */
  503. #define CFG_STATUS_FLASH_UNTIL_TFTP_OK 1 /* Keeping the status LED flashing */
  504. /* until the TFTP is successful. */
  505. #define CFG_STATUS_OFF_AFTER_NETBOOT 1 /* After a successful netboot, */
  506. /* turn off the STATUS LEDs. */
  507. #define CFG_TFTP_BLINK_STATUS_ON_DATA_IN 1 /* Blink status LED based on */
  508. /* incoming data. */
  509. #define CFG_TFTP_BLOCKS_PER_HASH 100 /* For every XX blocks, output a '#' */
  510. /* to signify that tftp is moving. */
  511. #define CFG_TFTP_HASHES_PER_FLASH 200 /* For every '#' hashes, */
  512. /* flash the status LED. */
  513. #define CFG_TFTP_HASHES_PER_LINE 65 /* Only output XX '#'s per line */
  514. /* during the tftp file transfer. */
  515. #define CFG_TFTP_PROGESS_QUIET 1 /* Suppress the progress displays */
  516. /* '#'s from the tftp command. */
  517. #define CFG_TFTP_STATUS_QUIET 1 /* Suppress the status displays */
  518. /* issued during the tftp command. */
  519. #define CFG_TFTP_TIMEOUT_COUNT 5 /* How many timeouts TFTP will allow */
  520. /* before it gives up. */
  521. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  522. # define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
  523. #else
  524. # define CFG_CBSIZE 256 /* Console I/O Buffer Size */
  525. #endif
  526. /* Print Buffer Size */
  527. #define CFG_PBSIZE (CFG_CBSIZE + sizeof(CFG_PROMPT)+16)
  528. #define CFG_MAXARGS 32 /* max number of command args */
  529. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  530. #define CFG_LOAD_ADDR 0x400000 /* default load address */
  531. #define CFG_HZ 1000 /* decrementer freq: 1 ms ticks */
  532. #define CFG_ALT_MEMTEST /* Select full-featured memory test */
  533. #define CFG_MEMTEST_START 0x2000 /* memtest works from the end of */
  534. /* the exception vector table */
  535. /* to the end of the DRAM */
  536. /* less monitor and malloc area */
  537. #define CFG_STACK_USAGE 0x10000 /* Reserve 64k for the stack usage */
  538. #define CFG_MEM_END_USAGE ( CFG_MONITOR_LEN \
  539. + CFG_MALLOC_LEN \
  540. + CFG_ENV_SECT_SIZE \
  541. + CFG_STACK_USAGE )
  542. #define CFG_MEMTEST_END ( CFG_SDRAM_SIZE * 1024 * 1024 \
  543. - CFG_MEM_END_USAGE )
  544. /* valid baudrates */
  545. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  546. /*
  547. * Low Level Configuration Settings
  548. * (address mappings, register initial values, etc.)
  549. * You should know what you are doing if you make changes here.
  550. */
  551. #define CFG_FLASH_BASE CFG_FLASH0_BASE
  552. #define CFG_FLASH_SIZE CFG_FLASH0_SIZE
  553. #define CFG_SDRAM_BASE CFG_SDRAM0_BASE
  554. #define CFG_SDRAM_SIZE CFG_SDRAM0_SIZE
  555. /*-----------------------------------------------------------------------
  556. * Hard Reset Configuration Words
  557. */
  558. #if defined(CFG_SBC_BOOT_LOW)
  559. # define CFG_SBC_HRCW_BOOT_FLAGS (HRCW_CIP | HRCW_BMS)
  560. #else
  561. # define CFG_SBC_HRCW_BOOT_FLAGS (0)
  562. #endif /* defined(CFG_SBC_BOOT_LOW) */
  563. /* get the HRCW ISB field from CFG_IMMR */
  564. #define CFG_SBC_HRCW_IMMR ( ((CFG_IMMR & 0x10000000) >> 10) | \
  565. ((CFG_IMMR & 0x01000000) >> 7) | \
  566. ((CFG_IMMR & 0x00100000) >> 4) )
  567. #define CFG_HRCW_MASTER ( HRCW_BPS10 | \
  568. HRCW_DPPC11 | \
  569. CFG_SBC_HRCW_IMMR | \
  570. HRCW_MMR00 | \
  571. HRCW_LBPC11 | \
  572. HRCW_APPC10 | \
  573. HRCW_CS10PC00 | \
  574. (CFG_SBC_MODCK_H & HRCW_MODCK_H1111) | \
  575. CFG_SBC_HRCW_BOOT_FLAGS )
  576. /* no slaves */
  577. #define CFG_HRCW_SLAVE1 0
  578. #define CFG_HRCW_SLAVE2 0
  579. #define CFG_HRCW_SLAVE3 0
  580. #define CFG_HRCW_SLAVE4 0
  581. #define CFG_HRCW_SLAVE5 0
  582. #define CFG_HRCW_SLAVE6 0
  583. #define CFG_HRCW_SLAVE7 0
  584. /*-----------------------------------------------------------------------
  585. * Definitions for initial stack pointer and data area (in DPRAM)
  586. */
  587. #define CFG_INIT_RAM_ADDR CFG_IMMR
  588. #define CFG_INIT_RAM_END 0x4000 /* End of used area in DPRAM */
  589. #define CFG_GBL_DATA_SIZE 128 /* bytes reserved for initial data */
  590. #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
  591. #define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
  592. /*-----------------------------------------------------------------------
  593. * Start addresses for the final memory configuration
  594. * (Set up by the startup code)
  595. * Please note that CFG_SDRAM_BASE _must_ start at 0
  596. * Note also that the logic that sets CFG_RAMBOOT is platform dependent.
  597. */
  598. #define CFG_MONITOR_BASE CFG_FLASH0_BASE
  599. #if (CFG_MONITOR_BASE < CFG_FLASH_BASE)
  600. # define CFG_RAMBOOT
  601. #endif
  602. #define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
  603. #define CFG_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
  604. /*
  605. * For booting Linux, the board info and command line data
  606. * have to be in the first 8 MB of memory, since this is
  607. * the maximum mapped by the Linux kernel during initialization.
  608. */
  609. #define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
  610. /*-----------------------------------------------------------------------
  611. * FLASH and environment organization
  612. */
  613. #define CFG_FLASH_CFI 1 /* Flash is CFI conformant */
  614. #undef CFG_FLASH_PROTECTION /* use hardware protection */
  615. #define CFG_MAX_FLASH_BANKS 2 /* max number of memory banks */
  616. #define CFG_MAX_FLASH_SECT (64+4) /* max number of sectors on one chip */
  617. #define CFG_FLASH_ERASE_TOUT 8000 /* Timeout for Flash Erase (in ms) */
  618. #define CFG_FLASH_WRITE_TOUT 1 /* Timeout for Flash Write (in ms) */
  619. #ifndef CFG_RAMBOOT
  620. # define CFG_ENV_IS_IN_FLASH 1
  621. # ifdef CFG_ENV_IN_OWN_SECT
  622. # define CFG_ENV_ADDR (CFG_MONITOR_BASE + CFG_MONITOR_LEN)
  623. # define CFG_ENV_SECT_SIZE 0x10000
  624. # else
  625. # define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_MONITOR_LEN - CFG_ENV_SECT_SIZE)
  626. # define CFG_ENV_SIZE 0x1000 /* Total Size of Environment Sector */
  627. # define CFG_ENV_SECT_SIZE 0x10000 /* see README - env sect real size */
  628. # endif /* CFG_ENV_IN_OWN_SECT */
  629. #else
  630. # define CFG_ENV_IS_IN_NVRAM 1
  631. # define CFG_ENV_ADDR (CFG_MONITOR_BASE - 0x1000)
  632. # define CFG_ENV_SIZE 0x200
  633. #endif /* CFG_RAMBOOT */
  634. /*-----------------------------------------------------------------------
  635. * Cache Configuration
  636. */
  637. #define CFG_CACHELINE_SIZE 32 /* For MPC8260 CPU */
  638. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  639. # define CFG_CACHELINE_SHIFT 5 /* log base 2 of the above value */
  640. #endif
  641. /*-----------------------------------------------------------------------
  642. * HIDx - Hardware Implementation-dependent Registers 2-11
  643. *-----------------------------------------------------------------------
  644. * HID0 also contains cache control - initially enable both caches and
  645. * invalidate contents, then the final state leaves only the instruction
  646. * cache enabled. Note that Power-On and Hard reset invalidate the caches,
  647. * but Soft reset does not.
  648. *
  649. * HID1 has only read-only information - nothing to set.
  650. */
  651. #define CFG_HID0_INIT (HID0_ICE |\
  652. HID0_DCE |\
  653. HID0_ICFI |\
  654. HID0_DCI |\
  655. HID0_IFEM |\
  656. HID0_ABE)
  657. #define CFG_HID0_FINAL (HID0_ICE |\
  658. HID0_IFEM |\
  659. HID0_ABE |\
  660. HID0_EMCP)
  661. #define CFG_HID2 0
  662. /*-----------------------------------------------------------------------
  663. * RMR - Reset Mode Register
  664. *-----------------------------------------------------------------------
  665. */
  666. #define CFG_RMR 0
  667. /*-----------------------------------------------------------------------
  668. * BCR - Bus Configuration 4-25
  669. *-----------------------------------------------------------------------
  670. */
  671. #define CFG_BCR (BCR_ETM)
  672. /*-----------------------------------------------------------------------
  673. * SIUMCR - SIU Module Configuration 4-31
  674. *-----------------------------------------------------------------------
  675. */
  676. #define CFG_SIUMCR (SIUMCR_DPPC11 |\
  677. SIUMCR_L2CPC00 |\
  678. SIUMCR_APPC10 |\
  679. SIUMCR_MMR00)
  680. /*-----------------------------------------------------------------------
  681. * SYPCR - System Protection Control 11-9
  682. * SYPCR can only be written once after reset!
  683. *-----------------------------------------------------------------------
  684. * Watchdog & Bus Monitor Timer max, 60x Bus Monitor enable
  685. */
  686. #if defined(CONFIG_WATCHDOG)
  687. #define CFG_SYPCR (SYPCR_SWTC |\
  688. SYPCR_BMT |\
  689. SYPCR_PBME |\
  690. SYPCR_LBME |\
  691. SYPCR_SWRI |\
  692. SYPCR_SWP |\
  693. SYPCR_SWE)
  694. #else
  695. #define CFG_SYPCR (SYPCR_SWTC |\
  696. SYPCR_BMT |\
  697. SYPCR_PBME |\
  698. SYPCR_LBME |\
  699. SYPCR_SWRI |\
  700. SYPCR_SWP)
  701. #endif /* CONFIG_WATCHDOG */
  702. /*-----------------------------------------------------------------------
  703. * TMCNTSC - Time Counter Status and Control 4-40
  704. *-----------------------------------------------------------------------
  705. * Clear once per Second and Alarm Interrupt Status, Set 32KHz timersclk,
  706. * and enable Time Counter
  707. */
  708. #define CFG_TMCNTSC (TMCNTSC_SEC |\
  709. TMCNTSC_ALR |\
  710. TMCNTSC_TCF |\
  711. TMCNTSC_TCE)
  712. /*-----------------------------------------------------------------------
  713. * PISCR - Periodic Interrupt Status and Control 4-42
  714. *-----------------------------------------------------------------------
  715. * Clear Periodic Interrupt Status, Set 32KHz timersclk, and enable
  716. * Periodic timer
  717. */
  718. #define CFG_PISCR (PISCR_PS |\
  719. PISCR_PTF |\
  720. PISCR_PTE)
  721. /*-----------------------------------------------------------------------
  722. * SCCR - System Clock Control 9-8
  723. *-----------------------------------------------------------------------
  724. */
  725. #define CFG_SCCR 0
  726. /*-----------------------------------------------------------------------
  727. * RCCR - RISC Controller Configuration 13-7
  728. *-----------------------------------------------------------------------
  729. */
  730. #define CFG_RCCR 0
  731. /*
  732. * Initialize Memory Controller:
  733. *
  734. * Bank Bus Machine PortSz Device
  735. * ---- --- ------- ------ ------
  736. * 0 60x GPCM 16 bit FLASH (primary flash - 2MB)
  737. * 1 60x GPCM -- bit (Unused)
  738. * 2 60x SDRAM 64 bit SDRAM (DIMM)
  739. * 3 60x SDRAM 64 bit SDRAM (DIMM)
  740. * 4 60x GPCM -- bit (Unused)
  741. * 5 60x GPCM -- bit (Unused)
  742. * 6 60x GPCM 16 bit FLASH (secondary flash - 2MB)
  743. */
  744. /*-----------------------------------------------------------------------
  745. * BR0,BR1 - Base Register
  746. * Ref: Section 10.3.1 on page 10-14
  747. * OR0,OR1 - Option Register
  748. * Ref: Section 10.3.2 on page 10-18
  749. *-----------------------------------------------------------------------
  750. */
  751. /* Bank 0 - Primary FLASH
  752. */
  753. /* BR0 is configured as follows:
  754. *
  755. * - Base address of 0x40000000
  756. * - 16 bit port size
  757. * - Data errors checking is disabled
  758. * - Read and write access
  759. * - GPCM 60x bus
  760. * - Access are handled by the memory controller according to MSEL
  761. * - Not used for atomic operations
  762. * - No data pipelining is done
  763. * - Valid
  764. */
  765. #define CFG_BR0_PRELIM ((CFG_FLASH0_BASE & BRx_BA_MSK) |\
  766. BRx_PS_16 |\
  767. BRx_MS_GPCM_P |\
  768. BRx_V)
  769. /* OR0 is configured as follows:
  770. *
  771. * - 4 MB
  772. * - *BCTL0 is asserted upon access to the current memory bank
  773. * - *CW / *WE are negated a quarter of a clock earlier
  774. * - *CS is output at the same time as the address lines
  775. * - Uses a clock cycle length of 5
  776. * - *PSDVAL is generated internally by the memory controller
  777. * unless *GTA is asserted earlier externally.
  778. * - Relaxed timing is generated by the GPCM for accesses
  779. * initiated to this memory region.
  780. * - One idle clock is inserted between a read access from the
  781. * current bank and the next access.
  782. */
  783. #define CFG_OR0_PRELIM (MEG_TO_AM(CFG_FLASH0_SIZE) |\
  784. ORxG_CSNT |\
  785. ORxG_ACS_DIV1 |\
  786. ORxG_SCY_5_CLK |\
  787. ORxG_TRLX |\
  788. ORxG_EHTR)
  789. /*-----------------------------------------------------------------------
  790. * BR2,BR3 - Base Register
  791. * Ref: Section 10.3.1 on page 10-14
  792. * OR2,OR3 - Option Register
  793. * Ref: Section 10.3.2 on page 10-16
  794. *-----------------------------------------------------------------------
  795. */
  796. /* Bank 2,3 - SDRAM DIMM
  797. */
  798. /* The BR2 is configured as follows:
  799. *
  800. * - Base address of 0x00000000
  801. * - 64 bit port size (60x bus only)
  802. * - Data errors checking is disabled
  803. * - Read and write access
  804. * - SDRAM 60x bus
  805. * - Access are handled by the memory controller according to MSEL
  806. * - Not used for atomic operations
  807. * - No data pipelining is done
  808. * - Valid
  809. */
  810. #define CFG_BR2_PRELIM ((CFG_SDRAM0_BASE & BRx_BA_MSK) |\
  811. BRx_PS_64 |\
  812. BRx_MS_SDRAM_P |\
  813. BRx_V)
  814. #define CFG_BR3_PRELIM ((CFG_SDRAM0_BASE & BRx_BA_MSK) |\
  815. BRx_PS_64 |\
  816. BRx_MS_SDRAM_P |\
  817. BRx_V)
  818. /* With a 64 MB DIMM, the OR2 is configured as follows:
  819. *
  820. * - 64 MB
  821. * - 4 internal banks per device
  822. * - Row start address bit is A8 with PSDMR[PBI] = 0
  823. * - 12 row address lines
  824. * - Back-to-back page mode
  825. * - Internal bank interleaving within save device enabled
  826. */
  827. #if (CFG_SDRAM0_SIZE == 64)
  828. #define CFG_OR2_PRELIM (MEG_TO_AM(CFG_SDRAM0_SIZE) |\
  829. ORxS_BPD_4 |\
  830. ORxS_ROWST_PBI0_A8 |\
  831. ORxS_NUMR_12)
  832. #else
  833. #error "INVALID SDRAM CONFIGURATION"
  834. #endif
  835. /*-----------------------------------------------------------------------
  836. * PSDMR - 60x Bus SDRAM Mode Register
  837. * Ref: Section 10.3.3 on page 10-21
  838. *-----------------------------------------------------------------------
  839. */
  840. /* Address that the DIMM SPD memory lives at.
  841. */
  842. #define SDRAM_SPD_ADDR 0x50
  843. #if (CFG_SDRAM0_SIZE == 64)
  844. /* With a 64 MB DIMM, the PSDMR is configured as follows:
  845. *
  846. * - Bank Based Interleaving,
  847. * - Refresh Enable,
  848. * - Address Multiplexing where A5 is output on A14 pin
  849. * (A6 on A15, and so on),
  850. * - use address pins A14-A16 as bank select,
  851. * - A9 is output on SDA10 during an ACTIVATE command,
  852. * - earliest timing for ACTIVATE command after REFRESH command is 7 clocks,
  853. * - earliest timing for ACTIVATE or REFRESH command after PRECHARGE command
  854. * is 3 clocks,
  855. * - earliest timing for READ/WRITE command after ACTIVATE command is
  856. * 2 clocks,
  857. * - earliest timing for PRECHARGE after last data was read is 1 clock,
  858. * - earliest timing for PRECHARGE after last data was written is 1 clock,
  859. * - CAS Latency is 2.
  860. */
  861. #define CFG_PSDMR (PSDMR_RFEN |\
  862. PSDMR_SDAM_A14_IS_A5 |\
  863. PSDMR_BSMA_A14_A16 |\
  864. PSDMR_SDA10_PBI0_A9 |\
  865. PSDMR_RFRC_7_CLK |\
  866. PSDMR_PRETOACT_3W |\
  867. PSDMR_ACTTORW_2W |\
  868. PSDMR_LDOTOPRE_1C |\
  869. PSDMR_WRC_1C |\
  870. PSDMR_CL_2)
  871. #else
  872. #error "INVALID SDRAM CONFIGURATION"
  873. #endif
  874. /*
  875. * Shoot for approximately 1MHz on the prescaler.
  876. */
  877. #if (CONFIG_8260_CLKIN >= (60 * 1000 * 1000))
  878. #define CFG_MPTPR MPTPR_PTP_DIV64
  879. #elif (CONFIG_8260_CLKIN >= (30 * 1000 * 1000))
  880. #define CFG_MPTPR MPTPR_PTP_DIV32
  881. #else
  882. #warning "Unconfigured bus clock freq: check CFG_MPTPR and CFG_PSRT are OK"
  883. #define CFG_MPTPR MPTPR_PTP_DIV32
  884. #endif
  885. #define CFG_PSRT 14
  886. /*-----------------------------------------------------------------------
  887. * BR6 - Base Register
  888. * Ref: Section 10.3.1 on page 10-14
  889. * OR6 - Option Register
  890. * Ref: Section 10.3.2 on page 10-18
  891. *-----------------------------------------------------------------------
  892. */
  893. /* Bank 6 - Secondary FLASH
  894. *
  895. * The secondary FLASH is connected to *CS6
  896. */
  897. #if (defined(CFG_FLASH1_BASE) && defined(CFG_FLASH1_SIZE))
  898. /* BR6 is configured as follows:
  899. *
  900. * - Base address of 0x60000000
  901. * - 16 bit port size
  902. * - Data errors checking is disabled
  903. * - Read and write access
  904. * - GPCM 60x bus
  905. * - Access are handled by the memory controller according to MSEL
  906. * - Not used for atomic operations
  907. * - No data pipelining is done
  908. * - Valid
  909. */
  910. # define CFG_BR6_PRELIM ((CFG_FLASH1_BASE & BRx_BA_MSK) |\
  911. BRx_PS_16 |\
  912. BRx_MS_GPCM_P |\
  913. BRx_V)
  914. /* OR6 is configured as follows:
  915. *
  916. * - 2 MB
  917. * - *BCTL0 is asserted upon access to the current memory bank
  918. * - *CW / *WE are negated a quarter of a clock earlier
  919. * - *CS is output at the same time as the address lines
  920. * - Uses a clock cycle length of 5
  921. * - *PSDVAL is generated internally by the memory controller
  922. * unless *GTA is asserted earlier externally.
  923. * - Relaxed timing is generated by the GPCM for accesses
  924. * initiated to this memory region.
  925. * - One idle clock is inserted between a read access from the
  926. * current bank and the next access.
  927. */
  928. # define CFG_OR6_PRELIM (MEG_TO_AM(CFG_FLASH1_SIZE) |\
  929. ORxG_CSNT |\
  930. ORxG_ACS_DIV1 |\
  931. ORxG_SCY_5_CLK |\
  932. ORxG_TRLX |\
  933. ORxG_EHTR)
  934. #endif /* (defined(CFG_FLASH1_BASE) && defined(CFG_FLASH1_SIZE)) */
  935. /*
  936. * Internal Definitions
  937. *
  938. * Boot Flags
  939. */
  940. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  941. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  942. #endif /* __CONFIG_H */