sbc8260.h 35 KB

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