summaryrefslogtreecommitdiff
path: root/board/tqm8540
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2005-09-06 22:17:16 +0200
committerWolfgang Denk <wd@pollux.denx.de>2005-09-06 22:17:16 +0200
commit5d244ea128819d78b208c3e53d4b464e4ce2df0f (patch)
tree8d71aa79620f2ec6de1dc3cbb6b3b9172c008e04 /board/tqm8540
parentc44ffb9efa9be8b8ae35ccf2b4729d63bdab6dc7 (diff)
parent9d2a873bdf72a7c615c9c7ac55357085d0299716 (diff)
downloadu-boot-imx-5d244ea128819d78b208c3e53d4b464e4ce2df0f.zip
u-boot-imx-5d244ea128819d78b208c3e53d4b464e4ce2df0f.tar.gz
u-boot-imx-5d244ea128819d78b208c3e53d4b464e4ce2df0f.tar.bz2
Merge with /home/sr/git/u-boot:
Add I2C support for TQM85xx
Diffstat (limited to 'board/tqm8540')
-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