#include <asm/processor.h>
#include <spd_sdram.h>
#include <i2c.h>
+#include <net.h>
DECLARE_GLOBAL_DATA_PTR;
/*--------------------------------------------------------------------
* Setup the external bus controller/chip selects
*-------------------------------------------------------------------*/
-
- /* set the bus controller */
- mtebc (pb0ap, 0x04055200); /* FLASH/SRAM */
- mtebc (pb0cr, 0xfff18000); /* BAS=0xfff 1MB R/W 8-bit */
- mtebc (pb1ap, 0x04055200); /* FLASH/SRAM */
- mtebc (pb1cr, 0xfe098000); /* BAS=0xff8 16MB R/W 8-bit */
+ mtebc (pb0ap, 0x04055200); /* 16MB Strata FLASH */
+ mtebc (pb0cr, 0xff098000); /* BAS=0xff0 16MB R/W 8-bit */
+ mtebc (pb1ap, 0x04055200); /* 512KB Socketed AMD FLASH */
+ mtebc (pb1cr, 0xfe018000); /* BAS=0xfe0 1MB R/W 8-bit */
/*--------------------------------------------------------------------
* Setup the interrupt controller polarities, triggers, etc.
return dram_size;
}
-
-#if defined(CONFIG_SYS_DRAM_TEST)
-int testdram (void)
-{
- uint *pstart = (uint *) 0x00000000;
- uint *pend = (uint *) 0x08000000;
- uint *p;
-
- for (p = pstart; p < pend; p++)
- *p = 0xaaaaaaaa;
-
- for (p = pstart; p < pend; p++) {
- if (*p != 0xaaaaaaaa) {
- printf ("SDRAM test fails at: %08x\n", (uint) p);
- return 1;
- }
- }
-
- for (p = pstart; p < pend; p++)
- *p = 0x55555555;
-
- for (p = pstart; p < pend; p++) {
- if (*p != 0x55555555) {
- printf ("SDRAM test fails at: %08x\n", (uint) p);
- return 1;
- }
- }
- return 0;
-}
-#endif
-
#if !defined(CONFIG_SPD_EEPROM)
/*************************************************************************
* fixed sdram init -- doesn't use serial presence detect.
if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
board_get_enetaddr(i2c_enetaddr);
- eth_putenv_enetaddr("ethaddr", i2c_enetaddr);
+ eth_setenv_enetaddr("ethaddr", i2c_enetaddr);
}
#ifdef CONFIG_HAS_ETH1
if (!eth_getenv_enetaddr("eth1addr", enetaddr)) {
board_get_enetaddr(i2c_enetaddr);
- eth_putenv_enetaddr("eth1addr", i2c_enetaddr);
+ eth_setenv_enetaddr("eth1addr", i2c_enetaddr);
}
#endif
#ifdef CONFIG_HAS_ETH2
if (!eth_getenv_enetaddr("eth2addr", enetaddr)) {
board_get_enetaddr(i2c_enetaddr);
- eth_putenv_enetaddr("eth2addr", i2c_enetaddr);
+ eth_setenv_enetaddr("eth2addr", i2c_enetaddr);
}
#endif
#ifdef CONFIG_HAS_ETH3
if (!eth_getenv_enetaddr("eth3addr", enetaddr)) {
board_get_enetaddr(i2c_enetaddr);
- eth_putenv_enetaddr("eth3addr", i2c_enetaddr);
+ eth_setenv_enetaddr("eth3addr", i2c_enetaddr);
}
#endif