sacsng.h 35 KB

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