/* ------------------------------------------------------------------------- */
-/* 40x2MHz tables */
+#define _not_used_ 0xffffffff
+
const uint sdram_table[]=
-{ 0x0e06fc04, 0x11acfc04, 0xefa98c00, 0x1ff77c47,
- 0xeeeabc35, 0x11b57fff, 0xffffffff, 0xffffffff,
- 0x0e06fc04, 0x10adfc00, 0xf0affc00, 0xf0affc00,
- 0xe1bbfc00, 0x1ff77c47, 0xffffffff, 0xffffffff,
-#if 0
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
-#else
- 0xffffffff, 0xeffbbc04, 0x1ff77c34, 0xefeabc34,
- 0x1fb57c35, 0xffffffff, 0xffffffff, 0xffffffff,
-#endif
- 0x0e26bc04, 0x01b93c00, 0x1ff77c47, 0xffffffff,
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
- 0x0e06bc04, 0x10ad7c00, 0xf0affc00, 0xf0affc00,
- 0xe1bbbc04, 0x1ff77c47, 0xffffffff, 0xffffffff,
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
- 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffc04,
- 0x0ee27c04, 0x10a0fc84, 0xf0a0fc04, 0xf0a0fc84,
- 0xf1b5fc07, 0xffffffff, 0xffffffff, 0xffffffff,
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
- 0xfffffc07, 0xffffffff, 0xffffffff, 0xffffffff };
-
-#define MAMR_VALUE 0x27904111
-#define MCR_INIT 0x8000222f
-#define MAR_VALUE 0x00000088
-#define MCR_L_M_R 0x80002105
-#define MPTPR_VALUE 0x0200
-
-#define OR1_VALUE 0xfe000900
-#define BR1_VALUE 0x00000081
+{
+ /* single read. (offset 0 in upm RAM) */
+ 0x1f07fc04, 0xeeaefc04, 0x11adfc04, 0xefbbbc00,
+ 0x1ff77c47,
-/* ------------------------------------------------------------------------- */
+ /* MRS initialization (offset 5) */
+
+ 0x1ff77c34, 0xefeabc34, 0x1fb57c35,
+
+ /* burst read. (offset 8 in upm RAM) */
+ 0x1f07fc04, 0xeeaefc04, 0x10adfc04, 0xf0affc00,
+ 0xf0affc00, 0xf1affc00, 0xefbbbc00, 0x1ff77c47,
+ _not_used_, _not_used_, _not_used_, _not_used_,
+ _not_used_, _not_used_, _not_used_, _not_used_,
+
+ /* single write. (offset 18 in upm RAM) */
+ 0x1f27fc04, 0xeeaebc00, 0x01b93c04, 0x1ff77c47,
+ _not_used_, _not_used_, _not_used_, _not_used_,
+ /* burst write. (offset 20 in upm RAM) */
+ 0x1f07fc04, 0xeeaebc00, 0x10ad7c00, 0xf0affc00,
+ 0xf0affc00, 0xe1bbbc04, 0x1ff77c47, _not_used_,
+ _not_used_, _not_used_, _not_used_, _not_used_,
+ _not_used_, _not_used_, _not_used_, _not_used_,
+
+ /* refresh. (offset 30 in upm RAM) */
+ 0x1ff5fc84, 0xfffffc04, 0xfffffc04, 0xfffffc04,
+ 0xfffffc84, 0xfffffc07, _not_used_, _not_used_,
+ _not_used_, _not_used_, _not_used_, _not_used_,
+
+ /* exception. (offset 3c in upm RAM) */
+ 0x7ffffc07, _not_used_, _not_used_, _not_used_ };
+
+/* ------------------------------------------------------------------------- */
/*
* Check Board Identity:
/* perform SDRAM initializsation sequence */
- memctl->memc_mcr = 0x80002111; /* SDRAM bank 0 */
- udelay(1);
+ memctl->memc_mcr = 0x80002105; /* SDRAM bank 0 */
+ udelay(200);
memctl->memc_mcr = 0x80002230; /* SDRAM bank 0 - execute twice */
- udelay(1);
+ udelay(200);
memctl->memc_mamr |= MAMR_PTAE; /* enable refresh */