udelay (1); /* 0x80006106 */
memctl->memc_mcr = MCR_OP_RUN | MCR_MB_CS3 | MCR_MLCF (1) | MCR_MAD (0x06);
- memctl->memc_mamr |= MAMR_PTBE; /* refresh enabled */
+ memctl->memc_mamr |= MAMR_PTAE; /* refresh enabled */
udelay (200);
if (size8 < size9) { /* leave configuration at 9 columns */
size_b0 = size9;
- memctl->memc_mamr = CFG_MAMR_9COL | MAMR_PTBE;
+ memctl->memc_mamr = CFG_MAMR_9COL | MAMR_PTAE;
udelay (500);
} else { /* back to 8 columns */
size_b0 = size8;
- memctl->memc_mamr = CFG_MAMR_8COL | MAMR_PTBE;
+ memctl->memc_mamr = CFG_MAMR_8COL | MAMR_PTAE;
udelay (500);
}
{
volatile immap_t *immr = (immap_t *) CFG_IMMR;
volatile memctl8xx_t *memctl = &immr->im_memctl;
- volatile long int *addr;
- ulong cnt, val;
- ulong save[32]; /* to make test non-destructive */
- unsigned char i = 0;
memctl->memc_mamr = mamr_value;
- for (cnt = maxsize / sizeof (long); cnt > 0; cnt >>= 1) {
- addr = base + cnt; /* pointer arith! */
-
- save[i++] = *addr;
- *addr = ~cnt;
- }
-
- /* write 0 to base address */
- addr = base;
- save[i] = *addr;
- *addr = 0;
-
- /* check at base address */
- if ((val = *addr) != 0) {
- *addr = save[i];
- return (0);
- }
-
- for (cnt = 1; cnt <= maxsize / sizeof (long); cnt <<= 1) {
- addr = base + cnt; /* pointer arith! */
-
- val = *addr;
- *addr = save[--i];
-
- if (val != (~cnt)) {
- return (cnt * sizeof (long));
- }
- }
- return (maxsize);
+ return (get_ram_size(base, maxsize));
}
/* ------------------------------------------------------------------------- */
#endif
/***********************************************************************
-F* Function: int board_pre_init (void) P*A*Z*
+F* Function: int board_early_init_f (void) P*A*Z*
*
P* Parameters: none
P*
P* Returnvalue: int
P* - 0 is always returned.
*
-Z* Intention: This function is the board_pre_init() method implementation
+Z* Intention: This function is the board_early_init_f() method implementation
Z* for the lwmon board.
Z* Disable Ethernet TENA on Port B.
*
C* Coding: wd@denx.de
V* Verification: dzu@denx.de
***********************************************************************/
-int board_pre_init (void)
+int board_early_init_f (void)
{
volatile immap_t *immr = (immap_t *) CFG_IMMR;
#endif /* CONFIG_MODEM_SUPPORT */
#ifdef CONFIG_POST
-/*
+/*
* Returns 1 if keys pressed to start the power-on long-running tests
* Called from board_init_f().
*/
-int post_hotkeys_pressed(gd_t *gd)
+int post_hotkeys_pressed(void)
{
uchar kbd_data[KEYBD_DATALEN];
uchar val;