sacsng.h 35 KB

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