summaryrefslogtreecommitdiff
path: root/board/fads/fads.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-12-07 21:39:28 +0000
committerwdenk <wdenk>2003-12-07 21:39:28 +0000
commitb028f7151379c5bb6814099fbbccb31d8b07b891 (patch)
tree6b96f658b7b8f2f3ecd21b0e102b01aea1998d74 /board/fads/fads.c
parentb4676a25e2feb15826d960f4a216c3c429d2de75 (diff)
downloadu-boot-imx-b028f7151379c5bb6814099fbbccb31d8b07b891.zip
u-boot-imx-b028f7151379c5bb6814099fbbccb31d8b07b891.tar.gz
u-boot-imx-b028f7151379c5bb6814099fbbccb31d8b07b891.tar.bz2
* Patch by Yuli Barcohen, 3 Dec 2003:
"revive" U-Boot support for old Motorola MPC860ADS board * Patch by Cam(ilo?), 03 Dec 2003: make examples build even with broken Montavista objcopy * Patch by Pavel Bartusek, 27 Nov 2003: fix conversion problem with "bootretry" evironment variable
Diffstat (limited to 'board/fads/fads.c')
-rw-r--r--board/fads/fads.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/board/fads/fads.c b/board/fads/fads.c
index 3856b45..aca7b28 100644
--- a/board/fads/fads.c
+++ b/board/fads/fads.c
@@ -360,7 +360,11 @@ static int _draminit (uint base, uint noMbytes, uint edo, uint delay)
switch (noMbytes) {
case 4: /* 4 Mbyte uses only CS2 */
+#ifdef CONFIG_ADS
+ memctl->memc_mamr = 0xc0a21114;
+#else
memctl->memc_mamr = 0x13a01114; /* PTA 0x13 AMA 010 */
+#endif
memctl->memc_or2 = 0xffc00800; /* 4M */
break;
@@ -393,17 +397,18 @@ static int _draminit (uint base, uint noMbytes, uint edo, uint delay)
memctl->memc_br2 = 0x81 + base; /* use upma */
+ *((uint *) BCSR1) &= ~BCSR1_DRAM_EN; /* enable dram */
+
/* if no dimm is inserted, noMbytes is still detected as 8m, so
* sanity check top and bottom of memory */
- *((uint *) BCSR1) &= ~BCSR1_DRAM_EN; /* enable dram */
-
/* check bytes / 2 because dram_size tests at base+bytes, which
* is not mapped */
- if (dram_size ((long *) base, noMbytes << 19) != noMbytes << 19) {
- *((uint *) BCSR1) |= BCSR1_DRAM_EN; /* disable dram */
- return -1;
- }
+ if (noMbytes == 8)
+ if (dram_size ((long *) base, noMbytes << 19) != noMbytes << 19) {
+ *((uint *) BCSR1) |= BCSR1_DRAM_EN; /* disable dram */
+ return -1;
+ }
return 0;
}