sbc8260.h 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084
  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. /* Enable debug prints */
  37. #undef DEBUG_BOOTP_EXT /* Debug received vendor fields */
  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 (66 * 1000 * 1000)
  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/sbc8260/config.mk
  81. * The main FLASH is whichever is connected to *CS0. U-Boot expects
  82. * this to be the SIMM.
  83. */
  84. #define CONFIG_SYS_FLASH0_BASE 0x40000000
  85. #define CONFIG_SYS_FLASH0_SIZE 4
  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. U-Boot expects this to be the on board FLASH. If you don't
  89. * want it enabled, don't define these constants.
  90. */
  91. #define CONFIG_SYS_FLASH1_BASE 0x60000000
  92. #define CONFIG_SYS_FLASH1_SIZE 2
  93. /* What should be the base address of SDRAM DIMM and how big is
  94. * it (in Mbytes)?
  95. */
  96. #define CONFIG_SYS_SDRAM0_BASE 0x00000000
  97. #define CONFIG_SYS_SDRAM0_SIZE 64
  98. /* What should be the base address of the LEDs and switch S0?
  99. * If you don't want them enabled, don't define this.
  100. */
  101. #define CONFIG_SYS_LED_BASE 0xa0000000
  102. /*
  103. * SBC8260 with 16 MB DIMM:
  104. *
  105. * 0x0000 0000 Exception Vector code, 8k
  106. * :
  107. * 0x0000 1FFF
  108. * 0x0000 2000 Free for Application Use
  109. * :
  110. * :
  111. *
  112. * :
  113. * :
  114. * 0x00F5 FF30 Monitor Stack (Growing downward)
  115. * Monitor Stack Buffer (0x80)
  116. * 0x00F5 FFB0 Board Info Data
  117. * 0x00F6 0000 Malloc Arena
  118. * : CONFIG_ENV_SECT_SIZE, 256k
  119. * : CONFIG_SYS_MALLOC_LEN, 128k
  120. * 0x00FC 0000 RAM Copy of Monitor Code
  121. * : CONFIG_SYS_MONITOR_LEN, 256k
  122. * 0x00FF FFFF [End of RAM], CONFIG_SYS_SDRAM_SIZE - 1
  123. */
  124. /*
  125. * SBC8260 with 64 MB DIMM:
  126. *
  127. * 0x0000 0000 Exception Vector code, 8k
  128. * :
  129. * 0x0000 1FFF
  130. * 0x0000 2000 Free for Application Use
  131. * :
  132. * :
  133. *
  134. * :
  135. * :
  136. * 0x03F5 FF30 Monitor Stack (Growing downward)
  137. * Monitor Stack Buffer (0x80)
  138. * 0x03F5 FFB0 Board Info Data
  139. * 0x03F6 0000 Malloc Arena
  140. * : CONFIG_ENV_SECT_SIZE, 256k
  141. * : CONFIG_SYS_MALLOC_LEN, 128k
  142. * 0x03FC 0000 RAM Copy of Monitor Code
  143. * : CONFIG_SYS_MONITOR_LEN, 256k
  144. * 0x03FF FFFF [End of RAM], CONFIG_SYS_SDRAM_SIZE - 1
  145. */
  146. /*
  147. * select serial console configuration
  148. *
  149. * if either CONFIG_CONS_ON_SMC or CONFIG_CONS_ON_SCC is selected, then
  150. * CONFIG_CONS_INDEX must be set to the channel number (1-2 for SMC, 1-4
  151. * for SCC).
  152. *
  153. * if CONFIG_CONS_NONE is defined, then the serial console routines must
  154. * defined elsewhere.
  155. */
  156. #define CONFIG_CONS_ON_SMC 1 /* define if console on SMC */
  157. #undef CONFIG_CONS_ON_SCC /* define if console on SCC */
  158. #undef CONFIG_CONS_NONE /* define if console on neither */
  159. #define CONFIG_CONS_INDEX 1 /* which SMC/SCC channel for console */
  160. /*
  161. * select ethernet configuration
  162. *
  163. * if either CONFIG_ETHER_ON_SCC or CONFIG_ETHER_ON_FCC is selected, then
  164. * CONFIG_ETHER_INDEX must be set to the channel number (1-4 for SCC, 1-3
  165. * for FCC)
  166. *
  167. * if CONFIG_ETHER_NONE is defined, then either the ethernet routines must be
  168. * defined elsewhere (as for the console), or CONFIG_CMD_NET must be unset.
  169. */
  170. #undef CONFIG_ETHER_ON_SCC
  171. #define CONFIG_ETHER_ON_FCC
  172. #undef CONFIG_ETHER_NONE /* define if ethernet on neither */
  173. #ifdef CONFIG_ETHER_ON_SCC
  174. #define CONFIG_ETHER_INDEX 1 /* which SCC/FCC channel for ethernet */
  175. #endif /* CONFIG_ETHER_ON_SCC */
  176. #ifdef CONFIG_ETHER_ON_FCC
  177. #define CONFIG_ETHER_INDEX 2 /* which SCC/FCC channel for ethernet */
  178. #undef CONFIG_ETHER_LOOPBACK_TEST /* Ethernet external loopback test */
  179. #define CONFIG_MII /* MII PHY management */
  180. #define CONFIG_BITBANGMII /* bit-bang MII PHY management */
  181. /*
  182. * Port pins used for bit-banged MII communictions (if applicable).
  183. */
  184. #define MDIO_PORT 2 /* Port C */
  185. #define MDIO_ACTIVE (iop->pdir |= 0x00400000)
  186. #define MDIO_TRISTATE (iop->pdir &= ~0x00400000)
  187. #define MDIO_READ ((iop->pdat & 0x00400000) != 0)
  188. #define MDIO(bit) if(bit) iop->pdat |= 0x00400000; \
  189. else iop->pdat &= ~0x00400000
  190. #define MDC(bit) if(bit) iop->pdat |= 0x00200000; \
  191. else iop->pdat &= ~0x00200000
  192. #define MIIDELAY udelay(1)
  193. #endif /* CONFIG_ETHER_ON_FCC */
  194. #if defined(CONFIG_ETHER_ON_SCC) && (CONFIG_ETHER_INDEX == 1)
  195. /*
  196. * - RX clk is CLK11
  197. * - TX clk is CLK12
  198. */
  199. # define CONFIG_SYS_CMXSCR_VALUE (CMXSCR_RS1CS_CLK11 | CMXSCR_TS1CS_CLK12)
  200. #elif defined(CONFIG_ETHER_ON_FCC) && (CONFIG_ETHER_INDEX == 2)
  201. /*
  202. * - Rx-CLK is CLK13
  203. * - Tx-CLK is CLK14
  204. * - Select bus for bd/buffers (see 28-13)
  205. * - Enable Full Duplex in FSMR
  206. */
  207. # define CONFIG_SYS_CMXFCR_MASK (CMXFCR_FC2|CMXFCR_RF2CS_MSK|CMXFCR_TF2CS_MSK)
  208. # define CONFIG_SYS_CMXFCR_VALUE (CMXFCR_RF2CS_CLK13|CMXFCR_TF2CS_CLK14)
  209. # define CONFIG_SYS_CPMFCR_RAMTYPE 0
  210. # define CONFIG_SYS_FCC_PSMR (FCC_PSMR_FDE | FCC_PSMR_LPB)
  211. #endif /* CONFIG_ETHER_ON_FCC, CONFIG_ETHER_INDEX */
  212. /*
  213. * Select SPI support configuration
  214. */
  215. #undef CONFIG_SPI /* Disable SPI driver */
  216. /*
  217. * Select i2c support configuration
  218. *
  219. * Supported configurations are {none, software, hardware} drivers.
  220. * If the software driver is chosen, there are some additional
  221. * configuration items that the driver uses to drive the port pins.
  222. */
  223. #undef CONFIG_HARD_I2C /* I2C with hardware support */
  224. #define CONFIG_SOFT_I2C 1 /* I2C bit-banged */
  225. #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
  226. #define CONFIG_SYS_I2C_SLAVE 0x7F
  227. /*
  228. * Software (bit-bang) I2C driver configuration
  229. */
  230. #ifdef CONFIG_SOFT_I2C
  231. #define I2C_PORT 3 /* Port A=0, B=1, C=2, D=3 */
  232. #define I2C_ACTIVE (iop->pdir |= 0x00010000)
  233. #define I2C_TRISTATE (iop->pdir &= ~0x00010000)
  234. #define I2C_READ ((iop->pdat & 0x00010000) != 0)
  235. #define I2C_SDA(bit) if(bit) iop->pdat |= 0x00010000; \
  236. else iop->pdat &= ~0x00010000
  237. #define I2C_SCL(bit) if(bit) iop->pdat |= 0x00020000; \
  238. else iop->pdat &= ~0x00020000
  239. #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */
  240. #endif /* CONFIG_SOFT_I2C */
  241. /* Define this to reserve an entire FLASH sector (256 KB) for
  242. * environment variables. Otherwise, the environment will be
  243. * put in the same sector as U-Boot, and changing variables
  244. * will erase U-Boot temporarily
  245. */
  246. #define CONFIG_ENV_IN_OWN_SECT 1
  247. /* Define to allow the user to overwrite serial and ethaddr */
  248. #define CONFIG_ENV_OVERWRITE
  249. /* What should the console's baud rate be? */
  250. #define CONFIG_BAUDRATE 9600
  251. /* Ethernet MAC address
  252. * Note: We are using the EST Corporation OUI (00:a0:1e:xx:xx:xx)
  253. * http://standards.ieee.org/regauth/oui/index.shtml
  254. */
  255. #define CONFIG_ETHADDR 00:a0:1e:a8:7b:cb
  256. /*
  257. * Define this to set the last octet of the ethernet address from the
  258. * DS0-DS7 switch and light the LEDs with the result. The DS0-DS7
  259. * switch and the LEDs are backwards with respect to each other. DS7
  260. * is on the board edge side of both the LED strip and the DS0-DS7
  261. * switch.
  262. */
  263. #undef CONFIG_MISC_INIT_R
  264. /* Set to a positive value to delay for running BOOTCOMMAND */
  265. #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
  266. /* Be selective on what keys can delay or stop the autoboot process
  267. * To stop use: " "
  268. */
  269. #undef CONFIG_AUTOBOOT_KEYED
  270. #ifdef CONFIG_AUTOBOOT_KEYED
  271. # define CONFIG_AUTOBOOT_PROMPT \
  272. "Autobooting in %d seconds, press \" \" to stop\n", bootdelay
  273. # define CONFIG_AUTOBOOT_STOP_STR " "
  274. # undef CONFIG_AUTOBOOT_DELAY_STR
  275. # define DEBUG_BOOTKEYS 0
  276. #endif
  277. /* Define this to contain any number of null terminated strings that
  278. * will be part of the default enviroment compiled into the boot image.
  279. *
  280. * Variable Usage
  281. * -------------- -------------------------------------------------------
  282. * serverip server IP address
  283. * ipaddr my IP address
  284. * reprog Reload flash with a new copy of U-Boot
  285. * zapenv Erase the environment area in flash
  286. * root-on-initrd Set the bootcmd variable to allow booting of an initial
  287. * ram disk.
  288. * root-on-nfs Set the bootcmd variable to allow booting of a NFS
  289. * mounted root filesystem.
  290. * boot-hook Convenient stub to do something useful before the
  291. * bootm command is executed.
  292. *
  293. * Example usage of root-on-initrd and root-on-nfs :
  294. *
  295. * Note: The lines have been wrapped to improved its readability.
  296. *
  297. * => printenv bootcmd
  298. * bootcmd=version;echo;bootp;setenv bootargs root=/dev/nfs rw
  299. * nfsroot=${serverip}:${rootpath}
  300. * ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;run boot-hook;bootm
  301. *
  302. * => run root-on-initrd
  303. * => printenv bootcmd
  304. * bootcmd=version;echo;bootp;setenv bootargs root=/dev/ram0 rw
  305. * ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;run boot-hook;bootm
  306. *
  307. * => run root-on-nfs
  308. * => printenv bootcmd
  309. * bootcmd=version;echo;bootp;setenv bootargs root=/dev/nfs rw
  310. * nfsroot=${serverip}:${rootpath}
  311. * ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;run boot-hook;bootm
  312. *
  313. */
  314. #define CONFIG_EXTRA_ENV_SETTINGS \
  315. "serverip=192.168.123.205\0" \
  316. "ipaddr=192.168.123.213\0" \
  317. "reprog="\
  318. "bootp;" \
  319. "tftpboot 0x140000 /bdi2000/u-boot.bin;" \
  320. "protect off 1:0;" \
  321. "erase 1:0;" \
  322. "cp.b 140000 40000000 ${filesize};" \
  323. "protect on 1:0\0" \
  324. "zapenv="\
  325. "protect off 1:1;" \
  326. "erase 1:1;" \
  327. "protect on 1:1\0" \
  328. "root-on-initrd="\
  329. "setenv bootcmd "\
  330. "version;" \
  331. "echo;" \
  332. "bootp;" \
  333. "setenv bootargs root=/dev/ram0 rw " \
  334. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \
  335. "run boot-hook;" \
  336. "bootm\0" \
  337. "root-on-nfs="\
  338. "setenv bootcmd "\
  339. "version;" \
  340. "echo;" \
  341. "bootp;" \
  342. "setenv bootargs root=/dev/nfs rw " \
  343. "nfsroot=${serverip}:${rootpath} " \
  344. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \
  345. "run boot-hook;" \
  346. "bootm\0" \
  347. "boot-hook=echo\0"
  348. /* Define a command string that is automatically executed when no character
  349. * is read on the console interface withing "Boot Delay" after reset.
  350. */
  351. #undef CONFIG_BOOT_ROOT_INITRD /* Use ram disk for the root file system */
  352. #define CONFIG_BOOT_ROOT_NFS /* Use a NFS mounted root file system */
  353. #ifdef CONFIG_BOOT_ROOT_INITRD
  354. #define CONFIG_BOOTCOMMAND \
  355. "version;" \
  356. "echo;" \
  357. "bootp;" \
  358. "setenv bootargs root=/dev/ram0 rw " \
  359. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \
  360. "bootm"
  361. #endif /* CONFIG_BOOT_ROOT_INITRD */
  362. #ifdef CONFIG_BOOT_ROOT_NFS
  363. #define CONFIG_BOOTCOMMAND \
  364. "version;" \
  365. "echo;" \
  366. "bootp;" \
  367. "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} " \
  368. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \
  369. "bootm"
  370. #endif /* CONFIG_BOOT_ROOT_NFS */
  371. /*
  372. * BOOTP options
  373. */
  374. #define CONFIG_BOOTP_SUBNETMASK
  375. #define CONFIG_BOOTP_GATEWAY
  376. #define CONFIG_BOOTP_HOSTNAME
  377. #define CONFIG_BOOTP_BOOTPATH
  378. #define CONFIG_BOOTP_BOOTFILESIZE
  379. #define CONFIG_BOOTP_DNS
  380. #define CONFIG_BOOTP_DNS2
  381. #define CONFIG_BOOTP_SEND_HOSTNAME
  382. /* undef this to save memory */
  383. #define CONFIG_SYS_LONGHELP
  384. /* Monitor Command Prompt */
  385. #define CONFIG_SYS_PROMPT "=> "
  386. #undef CONFIG_SYS_HUSH_PARSER
  387. #ifdef CONFIG_SYS_HUSH_PARSER
  388. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  389. #endif
  390. /* When CONFIG_TIMESTAMP is selected, the timestamp (date and time)
  391. * of an image is printed by image commands like bootm or iminfo.
  392. */
  393. #define CONFIG_TIMESTAMP
  394. /* If this variable is defined, an environment variable named "ver"
  395. * is created by U-Boot showing the U-Boot version.
  396. */
  397. #define CONFIG_VERSION_VARIABLE
  398. /*
  399. * Command line configuration.
  400. */
  401. #include <config_cmd_default.h>
  402. #define CONFIG_CMD_ASKENV
  403. #define CONFIG_CMD_ELF
  404. #define CONFIG_CMD_I2C
  405. #define CONFIG_CMD_IMMAP
  406. #define CONFIG_CMD_PING
  407. #define CONFIG_CMD_REGINFO
  408. #define CONFIG_CMD_SDRAM
  409. #undef CONFIG_CMD_KGDB
  410. #if defined(CONFIG_ETHER_ON_FCC)
  411. #define CONFIG_CMD_CMD_MII
  412. #endif
  413. #undef CONFIG_WATCHDOG /* disable the watchdog */
  414. /* Where do the internal registers live? */
  415. #define CONFIG_SYS_IMMR 0xF0000000
  416. /*****************************************************************************
  417. *
  418. * You should not have to modify any of the following settings
  419. *
  420. *****************************************************************************/
  421. #define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
  422. #define CONFIG_SBC8260 1 /* on an EST SBC8260 Board */
  423. #define CONFIG_CPM2 1 /* Has a CPM2 */
  424. /*
  425. * Miscellaneous configurable options
  426. */
  427. #if defined(CONFIG_CMD_KGDB)
  428. # define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  429. #else
  430. # define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  431. #endif
  432. /* Print Buffer Size */
  433. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT)+16)
  434. #define CONFIG_SYS_MAXARGS 32 /* max number of command args */
  435. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
  436. #define CONFIG_SYS_LOAD_ADDR 0x400000 /* default load address */
  437. #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */
  438. #define CONFIG_SYS_ALT_MEMTEST /* Select full-featured memory test */
  439. #define CONFIG_SYS_MEMTEST_START 0x2000 /* memtest works from the end of */
  440. /* the exception vector table */
  441. /* to the end of the DRAM */
  442. /* less monitor and malloc area */
  443. #define CONFIG_SYS_STACK_USAGE 0x10000 /* Reserve 64k for the stack usage */
  444. #define CONFIG_SYS_MEM_END_USAGE ( CONFIG_SYS_MONITOR_LEN \
  445. + CONFIG_SYS_MALLOC_LEN \
  446. + CONFIG_ENV_SECT_SIZE \
  447. + CONFIG_SYS_STACK_USAGE )
  448. #define CONFIG_SYS_MEMTEST_END ( CONFIG_SYS_SDRAM_SIZE * 1024 * 1024 \
  449. - CONFIG_SYS_MEM_END_USAGE )
  450. /* valid baudrates */
  451. #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  452. /*
  453. * Low Level Configuration Settings
  454. * (address mappings, register initial values, etc.)
  455. * You should know what you are doing if you make changes here.
  456. */
  457. #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_FLASH0_BASE
  458. #define CONFIG_SYS_FLASH_SIZE CONFIG_SYS_FLASH0_SIZE
  459. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_SDRAM0_BASE
  460. #define CONFIG_SYS_SDRAM_SIZE CONFIG_SYS_SDRAM0_SIZE
  461. /*-----------------------------------------------------------------------
  462. * Hard Reset Configuration Words
  463. */
  464. #if defined(CONFIG_SYS_SBC_BOOT_LOW)
  465. # define CONFIG_SYS_SBC_HRCW_BOOT_FLAGS (HRCW_CIP | HRCW_BMS)
  466. #else
  467. # define CONFIG_SYS_SBC_HRCW_BOOT_FLAGS (0)
  468. #endif /* defined(CONFIG_SYS_SBC_BOOT_LOW) */
  469. /* get the HRCW ISB field from CONFIG_SYS_IMMR */
  470. #define CONFIG_SYS_SBC_HRCW_IMMR ( ((CONFIG_SYS_IMMR & 0x10000000) >> 10) | \
  471. ((CONFIG_SYS_IMMR & 0x01000000) >> 7) | \
  472. ((CONFIG_SYS_IMMR & 0x00100000) >> 4) )
  473. #define CONFIG_SYS_HRCW_MASTER ( HRCW_BPS11 | \
  474. HRCW_DPPC11 | \
  475. CONFIG_SYS_SBC_HRCW_IMMR | \
  476. HRCW_MMR00 | \
  477. HRCW_LBPC11 | \
  478. HRCW_APPC10 | \
  479. HRCW_CS10PC00 | \
  480. (CONFIG_SYS_SBC_MODCK_H & HRCW_MODCK_H1111) | \
  481. CONFIG_SYS_SBC_HRCW_BOOT_FLAGS )
  482. /* no slaves */
  483. #define CONFIG_SYS_HRCW_SLAVE1 0
  484. #define CONFIG_SYS_HRCW_SLAVE2 0
  485. #define CONFIG_SYS_HRCW_SLAVE3 0
  486. #define CONFIG_SYS_HRCW_SLAVE4 0
  487. #define CONFIG_SYS_HRCW_SLAVE5 0
  488. #define CONFIG_SYS_HRCW_SLAVE6 0
  489. #define CONFIG_SYS_HRCW_SLAVE7 0
  490. /*-----------------------------------------------------------------------
  491. * Definitions for initial stack pointer and data area (in DPRAM)
  492. */
  493. #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR
  494. #define CONFIG_SYS_INIT_RAM_END 0x4000 /* End of used area in DPRAM */
  495. #define CONFIG_SYS_GBL_DATA_SIZE 128 /* bytes reserved for initial data */
  496. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
  497. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  498. /*-----------------------------------------------------------------------
  499. * Start addresses for the final memory configuration
  500. * (Set up by the startup code)
  501. * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
  502. * Note also that the logic that sets CONFIG_SYS_RAMBOOT is platform dependent.
  503. */
  504. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH0_BASE
  505. #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
  506. # define CONFIG_SYS_RAMBOOT
  507. #endif
  508. #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
  509. #define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
  510. /*
  511. * For booting Linux, the board info and command line data
  512. * have to be in the first 8 MB of memory, since this is
  513. * the maximum mapped by the Linux kernel during initialization.
  514. */
  515. #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
  516. /*-----------------------------------------------------------------------
  517. * FLASH and environment organization
  518. */
  519. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
  520. #define CONFIG_SYS_MAX_FLASH_SECT 16 /* max number of sectors on one chip */
  521. #define CONFIG_SYS_FLASH_ERASE_TOUT 8000 /* Timeout for Flash Erase (in ms) */
  522. #define CONFIG_SYS_FLASH_WRITE_TOUT 1 /* Timeout for Flash Write (in ms) */
  523. #ifndef CONFIG_SYS_RAMBOOT
  524. # define CONFIG_ENV_IS_IN_FLASH 1
  525. # ifdef CONFIG_ENV_IN_OWN_SECT
  526. # define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x40000)
  527. # define CONFIG_ENV_SECT_SIZE 0x40000
  528. # else
  529. # define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN - CONFIG_ENV_SECT_SIZE)
  530. # define CONFIG_ENV_SIZE 0x1000 /* Total Size of Environment Sector */
  531. # define CONFIG_ENV_SECT_SIZE 0x10000 /* see README - env sect real size */
  532. # endif /* CONFIG_ENV_IN_OWN_SECT */
  533. #else
  534. # define CONFIG_ENV_IS_IN_NVRAM 1
  535. # define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
  536. # define CONFIG_ENV_SIZE 0x200
  537. #endif /* CONFIG_SYS_RAMBOOT */
  538. /*-----------------------------------------------------------------------
  539. * Cache Configuration
  540. */
  541. #define CONFIG_SYS_CACHELINE_SIZE 32 /* For MPC8260 CPU */
  542. #if defined(CONFIG_CMD_KGDB)
  543. # define CONFIG_SYS_CACHELINE_SHIFT 5 /* log base 2 of the above value */
  544. #endif
  545. /*-----------------------------------------------------------------------
  546. * HIDx - Hardware Implementation-dependent Registers 2-11
  547. *-----------------------------------------------------------------------
  548. * HID0 also contains cache control - initially enable both caches and
  549. * invalidate contents, then the final state leaves only the instruction
  550. * cache enabled. Note that Power-On and Hard reset invalidate the caches,
  551. * but Soft reset does not.
  552. *
  553. * HID1 has only read-only information - nothing to set.
  554. */
  555. #define CONFIG_SYS_HID0_INIT (HID0_ICE |\
  556. HID0_DCE |\
  557. HID0_ICFI |\
  558. HID0_DCI |\
  559. HID0_IFEM |\
  560. HID0_ABE)
  561. #define CONFIG_SYS_HID0_FINAL (HID0_ICE |\
  562. HID0_IFEM |\
  563. HID0_ABE |\
  564. HID0_EMCP)
  565. #define CONFIG_SYS_HID2 0
  566. /*-----------------------------------------------------------------------
  567. * RMR - Reset Mode Register
  568. *-----------------------------------------------------------------------
  569. */
  570. #define CONFIG_SYS_RMR 0
  571. /*-----------------------------------------------------------------------
  572. * BCR - Bus Configuration 4-25
  573. *-----------------------------------------------------------------------
  574. */
  575. #define CONFIG_SYS_BCR (BCR_ETM)
  576. /*-----------------------------------------------------------------------
  577. * SIUMCR - SIU Module Configuration 4-31
  578. *-----------------------------------------------------------------------
  579. */
  580. #define CONFIG_SYS_SIUMCR (SIUMCR_DPPC11 |\
  581. SIUMCR_L2CPC00 |\
  582. SIUMCR_APPC10 |\
  583. SIUMCR_MMR00)
  584. /*-----------------------------------------------------------------------
  585. * SYPCR - System Protection Control 11-9
  586. * SYPCR can only be written once after reset!
  587. *-----------------------------------------------------------------------
  588. * Watchdog & Bus Monitor Timer max, 60x Bus Monitor enable
  589. */
  590. #if defined(CONFIG_WATCHDOG)
  591. #define CONFIG_SYS_SYPCR (SYPCR_SWTC |\
  592. SYPCR_BMT |\
  593. SYPCR_PBME |\
  594. SYPCR_LBME |\
  595. SYPCR_SWRI |\
  596. SYPCR_SWP |\
  597. SYPCR_SWE)
  598. #else
  599. #define CONFIG_SYS_SYPCR (SYPCR_SWTC |\
  600. SYPCR_BMT |\
  601. SYPCR_PBME |\
  602. SYPCR_LBME |\
  603. SYPCR_SWRI |\
  604. SYPCR_SWP)
  605. #endif /* CONFIG_WATCHDOG */
  606. /*-----------------------------------------------------------------------
  607. * TMCNTSC - Time Counter Status and Control 4-40
  608. *-----------------------------------------------------------------------
  609. * Clear once per Second and Alarm Interrupt Status, Set 32KHz timersclk,
  610. * and enable Time Counter
  611. */
  612. #define CONFIG_SYS_TMCNTSC (TMCNTSC_SEC |\
  613. TMCNTSC_ALR |\
  614. TMCNTSC_TCF |\
  615. TMCNTSC_TCE)
  616. /*-----------------------------------------------------------------------
  617. * PISCR - Periodic Interrupt Status and Control 4-42
  618. *-----------------------------------------------------------------------
  619. * Clear Periodic Interrupt Status, Set 32KHz timersclk, and enable
  620. * Periodic timer
  621. */
  622. #define CONFIG_SYS_PISCR (PISCR_PS |\
  623. PISCR_PTF |\
  624. PISCR_PTE)
  625. /*-----------------------------------------------------------------------
  626. * SCCR - System Clock Control 9-8
  627. *-----------------------------------------------------------------------
  628. */
  629. #define CONFIG_SYS_SCCR 0
  630. /*-----------------------------------------------------------------------
  631. * RCCR - RISC Controller Configuration 13-7
  632. *-----------------------------------------------------------------------
  633. */
  634. #define CONFIG_SYS_RCCR 0
  635. /*
  636. * Initialize Memory Controller:
  637. *
  638. * Bank Bus Machine PortSz Device
  639. * ---- --- ------- ------ ------
  640. * 0 60x GPCM 32 bit FLASH (SIMM - 4MB) *
  641. * 1 60x GPCM 32 bit FLASH (SIMM - Unused)
  642. * 2 60x SDRAM 64 bit SDRAM (DIMM - 16MB or 64MB)
  643. * 3 60x SDRAM 64 bit SDRAM (DIMM - Unused)
  644. * 4 Local SDRAM 32 bit SDRAM (on board - 4MB)
  645. * 5 60x GPCM 8 bit EEPROM (8KB)
  646. * 6 60x GPCM 8 bit FLASH (on board - 2MB) *
  647. * 7 60x GPCM 8 bit LEDs, switches
  648. *
  649. * (*) This configuration requires the SBC8260 be configured
  650. * so that *CS0 goes to the FLASH SIMM, and *CS6 goes to
  651. * the on board FLASH. In other words, JP24 should have
  652. * pins 1 and 2 jumpered and pins 3 and 4 jumpered.
  653. *
  654. */
  655. /*-----------------------------------------------------------------------
  656. * BR0,BR1 - Base Register
  657. * Ref: Section 10.3.1 on page 10-14
  658. * OR0,OR1 - Option Register
  659. * Ref: Section 10.3.2 on page 10-18
  660. *-----------------------------------------------------------------------
  661. */
  662. /* Bank 0,1 - FLASH SIMM
  663. *
  664. * This expects the FLASH SIMM to be connected to *CS0
  665. * It consists of 4 AM29F080B parts.
  666. *
  667. * Note: For the 4 MB SIMM, *CS1 is unused.
  668. */
  669. /* BR0 is configured as follows:
  670. *
  671. * - Base address of 0x40000000
  672. * - 32 bit port size
  673. * - Data errors checking is disabled
  674. * - Read and write access
  675. * - GPCM 60x bus
  676. * - Access are handled by the memory controller according to MSEL
  677. * - Not used for atomic operations
  678. * - No data pipelining is done
  679. * - Valid
  680. */
  681. #define CONFIG_SYS_BR0_PRELIM ((CONFIG_SYS_FLASH0_BASE & BRx_BA_MSK) |\
  682. BRx_PS_32 |\
  683. BRx_MS_GPCM_P |\
  684. BRx_V)
  685. /* OR0 is configured as follows:
  686. *
  687. * - 4 MB
  688. * - *BCTL0 is asserted upon access to the current memory bank
  689. * - *CW / *WE are negated a quarter of a clock earlier
  690. * - *CS is output at the same time as the address lines
  691. * - Uses a clock cycle length of 5
  692. * - *PSDVAL is generated internally by the memory controller
  693. * unless *GTA is asserted earlier externally.
  694. * - Relaxed timing is generated by the GPCM for accesses
  695. * initiated to this memory region.
  696. * - One idle clock is inserted between a read access from the
  697. * current bank and the next access.
  698. */
  699. #define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH0_SIZE) |\
  700. ORxG_CSNT |\
  701. ORxG_ACS_DIV1 |\
  702. ORxG_SCY_5_CLK |\
  703. ORxG_TRLX |\
  704. ORxG_EHTR)
  705. /*-----------------------------------------------------------------------
  706. * BR2,BR3 - Base Register
  707. * Ref: Section 10.3.1 on page 10-14
  708. * OR2,OR3 - Option Register
  709. * Ref: Section 10.3.2 on page 10-16
  710. *-----------------------------------------------------------------------
  711. */
  712. /* Bank 2,3 - SDRAM DIMM
  713. *
  714. * 16MB DIMM: P/N
  715. * 64MB DIMM: P/N 1W-8864X8-4-P1-EST
  716. *
  717. * Note: *CS3 is unused for this DIMM
  718. */
  719. /* With a 16 MB or 64 MB DIMM, the BR2 is configured as follows:
  720. *
  721. * - Base address of 0x00000000
  722. * - 64 bit port size (60x bus only)
  723. * - Data errors checking is disabled
  724. * - Read and write access
  725. * - SDRAM 60x bus
  726. * - Access are handled by the memory controller according to MSEL
  727. * - Not used for atomic operations
  728. * - No data pipelining is done
  729. * - Valid
  730. */
  731. #define CONFIG_SYS_BR2_PRELIM ((CONFIG_SYS_SDRAM0_BASE & BRx_BA_MSK) |\
  732. BRx_PS_64 |\
  733. BRx_MS_SDRAM_P |\
  734. BRx_V)
  735. #define CONFIG_SYS_BR3_PRELIM ((CONFIG_SYS_SDRAM0_BASE & BRx_BA_MSK) |\
  736. BRx_PS_64 |\
  737. BRx_MS_SDRAM_P |\
  738. BRx_V)
  739. /* With a 16 MB DIMM, the OR2 is configured as follows:
  740. *
  741. * - 16 MB
  742. * - 2 internal banks per device
  743. * - Row start address bit is A9 with PSDMR[PBI] = 0
  744. * - 11 row address lines
  745. * - Back-to-back page mode
  746. * - Internal bank interleaving within save device enabled
  747. */
  748. #if (CONFIG_SYS_SDRAM0_SIZE == 16)
  749. #define CONFIG_SYS_OR2_PRELIM (MEG_TO_AM(CONFIG_SYS_SDRAM0_SIZE) |\
  750. ORxS_BPD_2 |\
  751. ORxS_ROWST_PBI0_A9 |\
  752. ORxS_NUMR_11)
  753. #endif
  754. /* With a 64 MB DIMM, the OR2 is configured as follows:
  755. *
  756. * - 64 MB
  757. * - 4 internal banks per device
  758. * - Row start address bit is A8 with PSDMR[PBI] = 0
  759. * - 12 row address lines
  760. * - Back-to-back page mode
  761. * - Internal bank interleaving within save device enabled
  762. */
  763. #if (CONFIG_SYS_SDRAM0_SIZE == 64)
  764. #define CONFIG_SYS_OR2_PRELIM (MEG_TO_AM(CONFIG_SYS_SDRAM0_SIZE) |\
  765. ORxS_BPD_4 |\
  766. ORxS_ROWST_PBI0_A8 |\
  767. ORxS_NUMR_12)
  768. #endif
  769. /*-----------------------------------------------------------------------
  770. * PSDMR - 60x Bus SDRAM Mode Register
  771. * Ref: Section 10.3.3 on page 10-21
  772. *-----------------------------------------------------------------------
  773. */
  774. /* Address that the DIMM SPD memory lives at.
  775. */
  776. #define SDRAM_SPD_ADDR 0x54
  777. #if (CONFIG_SYS_SDRAM0_SIZE == 16)
  778. /* With a 16 MB DIMM, the PSDMR is configured as follows:
  779. *
  780. * - Bank Based Interleaving,
  781. * - Refresh Enable,
  782. * - Address Multiplexing where A5 is output on A14 pin
  783. * (A6 on A15, and so on),
  784. * - use address pins A16-A18 as bank select,
  785. * - A9 is output on SDA10 during an ACTIVATE command,
  786. * - earliest timing for ACTIVATE command after REFRESH command is 7 clocks,
  787. * - earliest timing for ACTIVATE or REFRESH command after PRECHARGE command
  788. * is 3 clocks,
  789. * - earliest timing for READ/WRITE command after ACTIVATE command is
  790. * 2 clocks,
  791. * - earliest timing for PRECHARGE after last data was read is 1 clock,
  792. * - earliest timing for PRECHARGE after last data was written is 1 clock,
  793. * - CAS Latency is 2.
  794. */
  795. #define CONFIG_SYS_PSDMR (PSDMR_RFEN |\
  796. PSDMR_SDAM_A14_IS_A5 |\
  797. PSDMR_BSMA_A16_A18 |\
  798. PSDMR_SDA10_PBI0_A9 |\
  799. PSDMR_RFRC_7_CLK |\
  800. PSDMR_PRETOACT_3W |\
  801. PSDMR_ACTTORW_2W |\
  802. PSDMR_LDOTOPRE_1C |\
  803. PSDMR_WRC_1C |\
  804. PSDMR_CL_2)
  805. #endif
  806. #if (CONFIG_SYS_SDRAM0_SIZE == 64)
  807. /* With a 64 MB DIMM, the PSDMR is configured as follows:
  808. *
  809. * - Bank Based Interleaving,
  810. * - Refresh Enable,
  811. * - Address Multiplexing where A5 is output on A14 pin
  812. * (A6 on A15, and so on),
  813. * - use address pins A14-A16 as bank select,
  814. * - A9 is output on SDA10 during an ACTIVATE command,
  815. * - earliest timing for ACTIVATE command after REFRESH command is 7 clocks,
  816. * - earliest timing for ACTIVATE or REFRESH command after PRECHARGE command
  817. * is 3 clocks,
  818. * - earliest timing for READ/WRITE command after ACTIVATE command is
  819. * 2 clocks,
  820. * - earliest timing for PRECHARGE after last data was read is 1 clock,
  821. * - earliest timing for PRECHARGE after last data was written is 1 clock,
  822. * - CAS Latency is 2.
  823. */
  824. #define CONFIG_SYS_PSDMR (PSDMR_RFEN |\
  825. PSDMR_SDAM_A14_IS_A5 |\
  826. PSDMR_BSMA_A14_A16 |\
  827. PSDMR_SDA10_PBI0_A9 |\
  828. PSDMR_RFRC_7_CLK |\
  829. PSDMR_PRETOACT_3W |\
  830. PSDMR_ACTTORW_2W |\
  831. PSDMR_LDOTOPRE_1C |\
  832. PSDMR_WRC_1C |\
  833. PSDMR_CL_2)
  834. #endif
  835. /*
  836. * Shoot for approximately 1MHz on the prescaler.
  837. */
  838. #if (CONFIG_8260_CLKIN == (66 * 1000 * 1000))
  839. #define CONFIG_SYS_MPTPR MPTPR_PTP_DIV64
  840. #elif (CONFIG_8260_CLKIN == (33 * 1000 * 1000))
  841. #define CONFIG_SYS_MPTPR MPTPR_PTP_DIV32
  842. #else
  843. #warning "Unconfigured bus clock freq: check CONFIG_SYS_MPTPR and CONFIG_SYS_PSRT are OK"
  844. #define CONFIG_SYS_MPTPR MPTPR_PTP_DIV32
  845. #endif
  846. #define CONFIG_SYS_PSRT 14
  847. /* Bank 4 - On board SDRAM
  848. *
  849. * This is not implemented yet.
  850. */
  851. /*-----------------------------------------------------------------------
  852. * BR6 - Base Register
  853. * Ref: Section 10.3.1 on page 10-14
  854. * OR6 - Option Register
  855. * Ref: Section 10.3.2 on page 10-18
  856. *-----------------------------------------------------------------------
  857. */
  858. /* Bank 6 - On board FLASH
  859. *
  860. * This expects the on board FLASH SIMM to be connected to *CS6
  861. * It consists of 1 AM29F016A part.
  862. */
  863. #if (defined(CONFIG_SYS_FLASH1_BASE) && defined(CONFIG_SYS_FLASH1_SIZE))
  864. /* BR6 is configured as follows:
  865. *
  866. * - Base address of 0x60000000
  867. * - 8 bit port size
  868. * - Data errors checking is disabled
  869. * - Read and write access
  870. * - GPCM 60x bus
  871. * - Access are handled by the memory controller according to MSEL
  872. * - Not used for atomic operations
  873. * - No data pipelining is done
  874. * - Valid
  875. */
  876. # define CONFIG_SYS_BR6_PRELIM ((CONFIG_SYS_FLASH1_BASE & BRx_BA_MSK) |\
  877. BRx_PS_8 |\
  878. BRx_MS_GPCM_P |\
  879. BRx_V)
  880. /* OR6 is configured as follows:
  881. *
  882. * - 2 MB
  883. * - *BCTL0 is asserted upon access to the current memory bank
  884. * - *CW / *WE are negated a quarter of a clock earlier
  885. * - *CS is output at the same time as the address lines
  886. * - Uses a clock cycle length of 5
  887. * - *PSDVAL is generated internally by the memory controller
  888. * unless *GTA is asserted earlier externally.
  889. * - Relaxed timing is generated by the GPCM for accesses
  890. * initiated to this memory region.
  891. * - One idle clock is inserted between a read access from the
  892. * current bank and the next access.
  893. */
  894. # define CONFIG_SYS_OR6_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH1_SIZE) |\
  895. ORxG_CSNT |\
  896. ORxG_ACS_DIV1 |\
  897. ORxG_SCY_5_CLK |\
  898. ORxG_TRLX |\
  899. ORxG_EHTR)
  900. #endif /* (defined(CONFIG_SYS_FLASH1_BASE) && defined(CONFIG_SYS_FLASH1_SIZE)) */
  901. /*-----------------------------------------------------------------------
  902. * BR7 - Base Register
  903. * Ref: Section 10.3.1 on page 10-14
  904. * OR7 - Option Register
  905. * Ref: Section 10.3.2 on page 10-18
  906. *-----------------------------------------------------------------------
  907. */
  908. /* Bank 7 - LEDs and switches
  909. *
  910. * LEDs are at 0x00001 (write only)
  911. * switches are at 0x00001 (read only)
  912. */
  913. #ifdef CONFIG_SYS_LED_BASE
  914. /* BR7 is configured as follows:
  915. *
  916. * - Base address of 0xA0000000
  917. * - 8 bit port size
  918. * - Data errors checking is disabled
  919. * - Read and write access
  920. * - GPCM 60x bus
  921. * - Access are handled by the memory controller according to MSEL
  922. * - Not used for atomic operations
  923. * - No data pipelining is done
  924. * - Valid
  925. */
  926. # define CONFIG_SYS_BR7_PRELIM ((CONFIG_SYS_LED_BASE & BRx_BA_MSK) |\
  927. BRx_PS_8 |\
  928. BRx_MS_GPCM_P |\
  929. BRx_V)
  930. /* OR7 is configured as follows:
  931. *
  932. * - 1 byte
  933. * - *BCTL0 is asserted upon access to the current memory bank
  934. * - *CW / *WE are negated a quarter of a clock earlier
  935. * - *CS is output at the same time as the address lines
  936. * - Uses a clock cycle length of 15
  937. * - *PSDVAL is generated internally by the memory controller
  938. * unless *GTA is asserted earlier externally.
  939. * - Relaxed timing is generated by the GPCM for accesses
  940. * initiated to this memory region.
  941. * - One idle clock is inserted between a read access from the
  942. * current bank and the next access.
  943. */
  944. # define CONFIG_SYS_OR7_PRELIM (ORxG_AM_MSK |\
  945. ORxG_CSNT |\
  946. ORxG_ACS_DIV1 |\
  947. ORxG_SCY_15_CLK |\
  948. ORxG_TRLX |\
  949. ORxG_EHTR)
  950. #endif /* CONFIG_SYS_LED_BASE */
  951. /*
  952. * Internal Definitions
  953. *
  954. * Boot Flags
  955. */
  956. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  957. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  958. #endif /* __CONFIG_H */