summaryrefslogtreecommitdiff
path: root/board/tqm8540/tqm8540.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2005-08-31 12:55:50 +0200
committerStefan Roese <sr@denx.de>2005-08-31 12:55:50 +0200
commit9d2a873bdf72a7c615c9c7ac55357085d0299716 (patch)
tree6aab5d3254576cc613e1f044399137aba48cab41 /board/tqm8540/tqm8540.c
parent77f6580cc078fea22c2b1348f5b177edcd63885f (diff)
downloadu-boot-imx-9d2a873bdf72a7c615c9c7ac55357085d0299716.zip
u-boot-imx-9d2a873bdf72a7c615c9c7ac55357085d0299716.tar.gz
u-boot-imx-9d2a873bdf72a7c615c9c7ac55357085d0299716.tar.bz2
Add I2C support to TQM8540 and TQM8560 boards (EEPROM, RTC, LM75-DTT).
Removed CFG_CMD_DISPLAY from default commands. Fixed compiler warning in net.c. Patch by Stefan Roese, 31 Aug 2005
Diffstat (limited to 'board/tqm8540/tqm8540.c')
-rw-r--r--board/tqm8540/tqm8540.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/board/tqm8540/tqm8540.c b/board/tqm8540/tqm8540.c
index ee10d00..970c684 100644
--- a/board/tqm8540/tqm8540.c
+++ b/board/tqm8540/tqm8540.c
@@ -74,15 +74,26 @@ long int initdram (int board_type)
#if defined(CONFIG_DDR_DLL)
{
- volatile ccsr_gur_t *gur = &immap->im_gur;
- uint temp_ddrdll = 0;
+ volatile ccsr_gur_t *gur= &immap->im_gur;
+ int i,x;
+
+ x = 10;
/*
* Work around to stabilize DDR DLL
*/
- temp_ddrdll = gur->ddrdllcr;
- gur->ddrdllcr = ((temp_ddrdll & 0xff) << 16) | 0x80000000;
- asm ("sync;isync;msync");
+ gur->ddrdllcr = 0x81000000;
+ asm("sync;isync;msync");
+ udelay (200);
+ while (gur->ddrdllcr != 0x81000100) {
+ gur->devdisr = gur->devdisr | 0x00010000;
+ asm("sync;isync;msync");
+ for (i=0; i<x; i++)
+ ;
+ gur->devdisr = gur->devdisr & 0xfff7ffff;
+ asm("sync;isync;msync");
+ x++;
+ }
}
#endif