tqm8260.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  1. /*
  2. * (C) Copyright 2001
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #include <common.h>
  24. #include <ioports.h>
  25. #include <mpc8260.h>
  26. /*
  27. * I/O Port configuration table
  28. *
  29. * if conf is 1, then that port pin will be configured at boot time
  30. * according to the five values podr/pdir/ppar/psor/pdat for that entry
  31. */
  32. const iop_conf_t iop_conf_tab[4][32] = {
  33. /* Port A configuration */
  34. { /* conf ppar psor pdir podr pdat */
  35. /* PA31 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 *ATMTXEN */
  36. /* PA30 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMTCA */
  37. /* PA29 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMTSOC */
  38. /* PA28 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 *ATMRXEN */
  39. /* PA27 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMRSOC */
  40. /* PA26 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMRCA */
  41. /* PA25 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMTXD[0] */
  42. /* PA24 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMTXD[1] */
  43. /* PA23 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMTXD[2] */
  44. /* PA22 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMTXD[3] */
  45. /* PA21 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMTXD[4] */
  46. /* PA20 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMTXD[5] */
  47. /* PA19 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMTXD[6] */
  48. /* PA18 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMTXD[7] */
  49. /* PA17 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMRXD[7] */
  50. /* PA16 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMRXD[6] */
  51. /* PA15 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMRXD[5] */
  52. /* PA14 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMRXD[4] */
  53. /* PA13 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMRXD[3] */
  54. /* PA12 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMRXD[2] */
  55. /* PA11 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMRXD[1] */
  56. /* PA10 */ { 0, 0, 0, 1, 0, 0 }, /* FCC1 ATMRXD[0] */
  57. /* PA9 */ { 1, 1, 0, 1, 0, 0 }, /* SMC2 TXD */
  58. /* PA8 */ { 1, 1, 0, 0, 0, 0 }, /* SMC2 RXD */
  59. /* PA7 */ { 0, 0, 0, 1, 0, 0 }, /* PA7 */
  60. /* PA6 */ { 0, 0, 0, 1, 0, 0 }, /* PA6 */
  61. /* PA5 */ { 0, 0, 0, 1, 0, 0 }, /* PA5 */
  62. /* PA4 */ { 0, 0, 0, 1, 0, 0 }, /* PA4 */
  63. /* PA3 */ { 0, 0, 0, 1, 0, 0 }, /* PA3 */
  64. /* PA2 */ { 0, 0, 0, 1, 0, 0 }, /* PA2 */
  65. /* PA1 */ { 0, 0, 0, 1, 0, 0 }, /* PA1 */
  66. /* PA0 */ { 0, 0, 0, 1, 0, 0 } /* PA0 */
  67. },
  68. /* Port B configuration */
  69. { /* conf ppar psor pdir podr pdat */
  70. /* PB31 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TX_ER */
  71. /* PB30 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_DV */
  72. /* PB29 */ { 1, 1, 1, 1, 0, 0 }, /* FCC2 MII TX_EN */
  73. /* PB28 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_ER */
  74. /* PB27 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII COL */
  75. /* PB26 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII CRS */
  76. /* PB25 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[3] */
  77. /* PB24 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[2] */
  78. /* PB23 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[1] */
  79. /* PB22 */ { 1, 1, 0, 1, 0, 0 }, /* FCC2 MII TxD[0] */
  80. /* PB21 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[0] */
  81. /* PB20 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[1] */
  82. /* PB19 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[2] */
  83. /* PB18 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[3] */
  84. /* PB17 */ { 0, 0, 0, 0, 0, 0 }, /* PB17 */
  85. /* PB16 */ { 0, 0, 0, 0, 0, 0 }, /* PB16 */
  86. /* PB15 */ { 0, 0, 0, 0, 0, 0 }, /* PB15 */
  87. /* PB14 */ { 0, 0, 0, 0, 0, 0 }, /* PB14 */
  88. /* PB13 */ { 0, 0, 0, 0, 0, 0 }, /* PB13 */
  89. /* PB12 */ { 0, 0, 0, 0, 0, 0 }, /* PB12 */
  90. /* PB11 */ { 0, 0, 0, 0, 0, 0 }, /* PB11 */
  91. /* PB10 */ { 0, 0, 0, 0, 0, 0 }, /* PB10 */
  92. /* PB9 */ { 0, 0, 0, 0, 0, 0 }, /* PB9 */
  93. /* PB8 */ { 0, 0, 0, 0, 0, 0 }, /* PB8 */
  94. /* PB7 */ { 0, 0, 0, 0, 0, 0 }, /* PB7 */
  95. /* PB6 */ { 0, 0, 0, 0, 0, 0 }, /* PB6 */
  96. /* PB5 */ { 0, 0, 0, 0, 0, 0 }, /* PB5 */
  97. /* PB4 */ { 0, 0, 0, 0, 0, 0 }, /* PB4 */
  98. /* PB3 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */
  99. /* PB2 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */
  100. /* PB1 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */
  101. /* PB0 */ { 0, 0, 0, 0, 0, 0 } /* pin doesn't exist */
  102. },
  103. /* Port C */
  104. { /* conf ppar psor pdir podr pdat */
  105. /* PC31 */ { 0, 0, 0, 1, 0, 0 }, /* PC31 */
  106. /* PC30 */ { 0, 0, 0, 1, 0, 0 }, /* PC30 */
  107. /* PC29 */ { 1, 1, 1, 0, 0, 0 }, /* SCC1 EN *CLSN */
  108. /* PC28 */ { 0, 0, 0, 1, 0, 0 }, /* PC28 */
  109. /* PC27 */ { 0, 0, 0, 1, 0, 0 }, /* PC27 */
  110. /* PC26 */ { 0, 0, 0, 1, 0, 0 }, /* PC26 */
  111. /* PC25 */ { 0, 0, 0, 1, 0, 0 }, /* PC25 */
  112. /* PC24 */ { 0, 0, 0, 1, 0, 0 }, /* PC24 */
  113. /* PC23 */ { 0, 1, 0, 1, 0, 0 }, /* ATMTFCLK */
  114. /* PC22 */ { 0, 1, 0, 0, 0, 0 }, /* ATMRFCLK */
  115. /* PC21 */ { 1, 1, 0, 0, 0, 0 }, /* SCC1 EN RXCLK */
  116. /* PC20 */ { 1, 1, 0, 0, 0, 0 }, /* SCC1 EN TXCLK */
  117. /* PC19 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_CLK */
  118. /* PC18 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII TX_CLK */
  119. /* PC17 */ { 0, 0, 0, 1, 0, 0 }, /* PC17 */
  120. /* PC16 */ { 0, 0, 0, 1, 0, 0 }, /* PC16 */
  121. /* PC15 */ { 0, 0, 0, 1, 0, 0 }, /* PC15 */
  122. /* PC14 */ { 1, 1, 0, 0, 0, 0 }, /* SCC1 EN *CD */
  123. /* PC13 */ { 0, 0, 0, 1, 0, 0 }, /* PC13 */
  124. /* PC12 */ { 0, 0, 0, 1, 0, 0 }, /* PC12 */
  125. /* PC11 */ { 0, 0, 0, 1, 0, 0 }, /* PC11 */
  126. /* PC10 */ { 0, 0, 0, 1, 0, 0 }, /* FCC2 MDC */
  127. /* PC9 */ { 0, 0, 0, 1, 0, 0 }, /* FCC2 MDIO */
  128. /* PC8 */ { 0, 0, 0, 1, 0, 0 }, /* PC8 */
  129. /* PC7 */ { 0, 0, 0, 1, 0, 0 }, /* PC7 */
  130. /* PC6 */ { 0, 0, 0, 1, 0, 0 }, /* PC6 */
  131. /* PC5 */ { 0, 0, 0, 1, 0, 0 }, /* PC5 */
  132. /* PC4 */ { 0, 0, 0, 1, 0, 0 }, /* PC4 */
  133. /* PC3 */ { 0, 0, 0, 1, 0, 0 }, /* PC3 */
  134. /* PC2 */ { 0, 0, 0, 1, 0, 1 }, /* ENET FDE */
  135. /* PC1 */ { 0, 0, 0, 1, 0, 0 }, /* ENET DSQE */
  136. /* PC0 */ { 0, 0, 0, 1, 0, 0 }, /* ENET LBK */
  137. },
  138. /* Port D */
  139. { /* conf ppar psor pdir podr pdat */
  140. /* PD31 */ { 1, 1, 0, 0, 0, 0 }, /* SCC1 EN RxD */
  141. /* PD30 */ { 1, 1, 1, 1, 0, 0 }, /* SCC1 EN TxD */
  142. /* PD29 */ { 1, 1, 0, 1, 0, 0 }, /* SCC1 EN TENA */
  143. /* PD28 */ { 0, 0, 0, 1, 0, 0 }, /* PD28 */
  144. /* PD27 */ { 0, 0, 0, 1, 0, 0 }, /* PD27 */
  145. /* PD26 */ { 0, 0, 0, 1, 0, 0 }, /* PD26 */
  146. /* PD25 */ { 0, 0, 0, 1, 0, 0 }, /* PD25 */
  147. /* PD24 */ { 0, 0, 0, 1, 0, 0 }, /* PD24 */
  148. /* PD23 */ { 0, 0, 0, 1, 0, 0 }, /* PD23 */
  149. /* PD22 */ { 0, 0, 0, 1, 0, 0 }, /* PD22 */
  150. /* PD21 */ { 0, 0, 0, 1, 0, 0 }, /* PD21 */
  151. /* PD20 */ { 0, 0, 0, 1, 0, 0 }, /* PD20 */
  152. /* PD19 */ { 0, 0, 0, 1, 0, 0 }, /* PD19 */
  153. /* PD18 */ { 0, 0, 0, 1, 0, 0 }, /* PD19 */
  154. /* PD17 */ { 0, 1, 0, 0, 0, 0 }, /* FCC1 ATMRXPRTY */
  155. /* PD16 */ { 0, 1, 0, 1, 0, 0 }, /* FCC1 ATMTXPRTY */
  156. #if defined(CONFIG_SOFT_I2C)
  157. /* PD15 */ { 1, 0, 0, 1, 1, 1 }, /* I2C SDA */
  158. /* PD14 */ { 1, 0, 0, 1, 1, 1 }, /* I2C SCL */
  159. #else
  160. #if defined(CONFIG_HARD_I2C)
  161. /* PD15 */ { 1, 1, 1, 0, 1, 0 }, /* I2C SDA */
  162. /* PD14 */ { 1, 1, 1, 0, 1, 0 }, /* I2C SCL */
  163. #else /* normal I/O port pins */
  164. /* PD15 */ { 0, 1, 1, 0, 1, 0 }, /* I2C SDA */
  165. /* PD14 */ { 0, 1, 1, 0, 1, 0 }, /* I2C SCL */
  166. #endif
  167. #endif
  168. /* PD13 */ { 0, 0, 0, 0, 0, 0 }, /* PD13 */
  169. /* PD12 */ { 0, 0, 0, 0, 0, 0 }, /* PD12 */
  170. /* PD11 */ { 0, 0, 0, 0, 0, 0 }, /* PD11 */
  171. /* PD10 */ { 0, 0, 0, 0, 0, 0 }, /* PD10 */
  172. /* PD9 */ { 1, 1, 0, 1, 0, 0 }, /* SMC1 TXD */
  173. /* PD8 */ { 1, 1, 0, 0, 0, 0 }, /* SMC1 RXD */
  174. /* PD7 */ { 0, 0, 0, 1, 0, 1 }, /* PD7 */
  175. /* PD6 */ { 0, 0, 0, 1, 0, 1 }, /* PD6 */
  176. /* PD5 */ { 0, 0, 0, 1, 0, 1 }, /* PD5 */
  177. /* PD4 */ { 0, 0, 0, 1, 0, 1 }, /* PD4 */
  178. /* PD3 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */
  179. /* PD2 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */
  180. /* PD1 */ { 0, 0, 0, 0, 0, 0 }, /* pin doesn't exist */
  181. /* PD0 */ { 0, 0, 0, 0, 0, 0 } /* pin doesn't exist */
  182. }
  183. };
  184. /* ------------------------------------------------------------------------- */
  185. /* Check Board Identity:
  186. */
  187. int checkboard (void)
  188. {
  189. unsigned char str[64];
  190. int i = getenv_r ("serial#", str, sizeof (str));
  191. puts ("Board: ");
  192. if (!i || strncmp (str, "TQM82", 5)) {
  193. puts ("### No HW ID - assuming TQM8260\n");
  194. return (0);
  195. }
  196. puts (str);
  197. putc ('\n');
  198. return 0;
  199. }
  200. /* ------------------------------------------------------------------------- */
  201. /* Try SDRAM initialization with P/LSDMR=sdmr and ORx=orx
  202. *
  203. * This routine performs standard 8260 initialization sequence
  204. * and calculates the available memory size. It may be called
  205. * several times to try different SDRAM configurations on both
  206. * 60x and local buses.
  207. */
  208. static long int try_init (volatile memctl8260_t * memctl, ulong sdmr,
  209. ulong orx, volatile uchar * base)
  210. {
  211. volatile uchar c = 0xff;
  212. ulong cnt, val;
  213. volatile ulong *addr;
  214. volatile uint *sdmr_ptr;
  215. volatile uint *orx_ptr;
  216. int i;
  217. ulong save[32]; /* to make test non-destructive */
  218. ulong maxsize, size;
  219. /* We must be able to test a location outsize the maximum legal size
  220. * to find out THAT we are outside; but this address still has to be
  221. * mapped by the controller. That means, that the initial mapping has
  222. * to be (at least) twice as large as the maximum expected size.
  223. */
  224. maxsize = (1 + (~orx | 0x7fff)) / 2;
  225. /* Since CFG_SDRAM_BASE is always 0 (??), we assume that
  226. * we are configuring CS1 if base != 0
  227. */
  228. sdmr_ptr = base ? &memctl->memc_lsdmr : &memctl->memc_psdmr;
  229. orx_ptr = base ? &memctl->memc_or2 : &memctl->memc_or1;
  230. *orx_ptr = orx;
  231. /*
  232. * Quote from 8260 UM (10.4.2 SDRAM Power-On Initialization, 10-35):
  233. *
  234. * "At system reset, initialization software must set up the
  235. * programmable parameters in the memory controller banks registers
  236. * (ORx, BRx, P/LSDMR). After all memory parameters are configured,
  237. * system software should execute the following initialization sequence
  238. * for each SDRAM device.
  239. *
  240. * 1. Issue a PRECHARGE-ALL-BANKS command
  241. * 2. Issue eight CBR REFRESH commands
  242. * 3. Issue a MODE-SET command to initialize the mode register
  243. *
  244. * The initial commands are executed by setting P/LSDMR[OP] and
  245. * accessing the SDRAM with a single-byte transaction."
  246. *
  247. * The appropriate BRx/ORx registers have already been set when we
  248. * get here. The SDRAM can be accessed at the address CFG_SDRAM_BASE.
  249. */
  250. *sdmr_ptr = sdmr | PSDMR_OP_PREA;
  251. *base = c;
  252. *sdmr_ptr = sdmr | PSDMR_OP_CBRR;
  253. for (i = 0; i < 8; i++)
  254. *base = c;
  255. *sdmr_ptr = sdmr | PSDMR_OP_MRW;
  256. *(base + CFG_MRS_OFFS) = c; /* setting MR on address lines */
  257. *sdmr_ptr = sdmr | PSDMR_OP_NORM | PSDMR_RFEN;
  258. *base = c;
  259. /*
  260. * Check memory range for valid RAM. A simple memory test determines
  261. * the actually available RAM size between addresses `base' and
  262. * `base + maxsize'. Some (not all) hardware errors are detected:
  263. * - short between address lines
  264. * - short between data lines
  265. */
  266. i = 0;
  267. for (cnt = maxsize / sizeof (long); cnt > 0; cnt >>= 1) {
  268. addr = (volatile ulong *) base + cnt; /* pointer arith! */
  269. save[i++] = *addr;
  270. *addr = ~cnt;
  271. }
  272. addr = (volatile ulong *) base;
  273. save[i] = *addr;
  274. *addr = 0;
  275. if ((val = *addr) != 0) {
  276. /* Restore the original data before leaving the function.
  277. */
  278. *addr = save[i];
  279. for (cnt = 1; cnt <= maxsize / sizeof(long); cnt <<= 1) {
  280. addr = (volatile ulong *) base + cnt;
  281. *addr = save[--i];
  282. }
  283. return (0);
  284. }
  285. for (cnt = 1; cnt <= maxsize / sizeof (long); cnt <<= 1) {
  286. addr = (volatile ulong *) base + cnt; /* pointer arith! */
  287. val = *addr;
  288. *addr = save[--i];
  289. if (val != ~cnt) {
  290. size = cnt * sizeof (long);
  291. /* Restore the original data before leaving the function.
  292. */
  293. for (cnt <<= 1; cnt <= maxsize / sizeof (long); cnt <<= 1) {
  294. addr = (volatile ulong *) base + cnt;
  295. *addr = save[--i];
  296. }
  297. /* Write the actual size to ORx
  298. */
  299. *orx_ptr = orx | ~(size - 1);
  300. return (size);
  301. }
  302. }
  303. return (maxsize);
  304. }
  305. long int initdram (int board_type)
  306. {
  307. volatile immap_t *immap = (immap_t *) CFG_IMMR;
  308. volatile memctl8260_t *memctl = &immap->im_memctl;
  309. #ifndef CFG_RAMBOOT
  310. long size8, size9;
  311. #endif
  312. long psize, lsize;
  313. psize = 16 * 1024 * 1024;
  314. lsize = 0;
  315. memctl->memc_psrt = CFG_PSRT;
  316. memctl->memc_mptpr = CFG_MPTPR;
  317. #if 0 /* Just for debugging */
  318. #define prt_br_or(brX,orX) do { \
  319. ulong start = memctl->memc_ ## brX & 0xFFFF8000; \
  320. ulong sizem = ~memctl->memc_ ## orX | 0x00007FFF; \
  321. printf ("\n" \
  322. #brX " 0x%08x " #orX " 0x%08x " \
  323. "==> 0x%08lx ... 0x%08lx = %ld MB\n", \
  324. memctl->memc_ ## brX, memctl->memc_ ## orX, \
  325. start, start+sizem, (sizem+1)>>20); \
  326. } while (0)
  327. prt_br_or (br0, or0);
  328. prt_br_or (br1, or1);
  329. prt_br_or (br2, or2);
  330. prt_br_or (br3, or3);
  331. #endif
  332. #ifndef CFG_RAMBOOT
  333. /* 60x SDRAM setup:
  334. */
  335. size8 = try_init (memctl, CFG_PSDMR_8COL, CFG_OR1_8COL,
  336. (uchar *) CFG_SDRAM_BASE);
  337. size9 = try_init (memctl, CFG_PSDMR_9COL, CFG_OR1_9COL,
  338. (uchar *) CFG_SDRAM_BASE);
  339. if (size8 < size9) {
  340. psize = size9;
  341. printf ("(60x:9COL - %ld MB, ", psize >> 20);
  342. } else {
  343. psize = try_init (memctl, CFG_PSDMR_8COL, CFG_OR1_8COL,
  344. (uchar *) CFG_SDRAM_BASE);
  345. printf ("(60x:8COL - %ld MB, ", psize >> 20);
  346. }
  347. /* Local SDRAM setup:
  348. */
  349. #ifdef CFG_INIT_LOCAL_SDRAM
  350. memctl->memc_lsrt = CFG_LSRT;
  351. size8 = try_init (memctl, CFG_LSDMR_8COL, CFG_OR2_8COL,
  352. (uchar *) SDRAM_BASE2_PRELIM);
  353. size9 = try_init (memctl, CFG_LSDMR_9COL, CFG_OR2_9COL,
  354. (uchar *) SDRAM_BASE2_PRELIM);
  355. if (size8 < size9) {
  356. lsize = size9;
  357. printf ("Local:9COL - %ld MB) using ", lsize >> 20);
  358. } else {
  359. lsize = try_init (memctl, CFG_LSDMR_8COL, CFG_OR2_8COL,
  360. (uchar *) SDRAM_BASE2_PRELIM);
  361. printf ("Local:8COL - %ld MB) using ", lsize >> 20);
  362. }
  363. #if 0
  364. /* Set up BR2 so that the local SDRAM goes
  365. * right after the 60x SDRAM
  366. */
  367. memctl->memc_br2 = (CFG_BR2_PRELIM & ~BRx_BA_MSK) |
  368. (CFG_SDRAM_BASE + psize);
  369. #endif
  370. #endif /* CFG_INIT_LOCAL_SDRAM */
  371. #endif /* CFG_RAMBOOT */
  372. icache_enable ();
  373. return (psize);
  374. }
  375. /* ------------------------------------------------------------------------- */