sacsng.h 35 KB

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