sacsng.h 35 KB

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