- int i;
-
- for (i = 0; i < words; i++)
- *(sect_buf + i) = *(addr);
- SSYNC();
-}
-
-void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words)
-{
- int i;
-
- for (i = 0; i < words; i++)
- *(addr) = *(sect_buf + i);
- SSYNC();
-}
-#endif /* CONFIG_BFIN_IDE */
-
-phys_size_t initdram(int board_type)
-{
-#ifdef DEBUG
- int brate;
- char *tmp = getenv("baudrate");
- brate = simple_strtoul(tmp, NULL, 16);
- printf("Serial Port initialized with Baud rate = %x\n", brate);
- printf("SDRAM attributes:\n");
- printf("tRCD %d SCLK Cycles,tRP %d SCLK Cycles,tRAS %d SCLK Cycles"
- "tWR %d SCLK Cycles,CAS Latency %d SCLK cycles \n",
- 3, 3, 6, 2, 3);
- printf("SDRAM Begin: 0x%x\n", CFG_SDRAM_BASE);
- printf("Bank size = %d MB\n", CFG_MAX_RAM_SIZE >> 20);
-#endif
- gd->bd->bi_memstart = CFG_SDRAM_BASE;
- gd->bd->bi_memsize = CFG_MAX_RAM_SIZE;
- return CFG_MAX_RAM_SIZE;
-}
-
-#if defined(CONFIG_MISC_INIT_R)
-/* miscellaneous platform dependent initialisations */
-int misc_init_r(void)
-{
-#if defined(CONFIG_CMD_NET)
- char nid[32];
- unsigned char *pMACaddr = (unsigned char *)0x203F0000;
-
- /* The 0xFF check here is to make sure we don't use the address
- * in flash if it's simply been erased (aka all 0xFF values) */
- if (getenv("ethaddr") == NULL && is_valid_ether_addr(pMACaddr)) {
- sprintf(nid, "%02x:%02x:%02x:%02x:%02x:%02x",
- pMACaddr[0], pMACaddr[1],
- pMACaddr[2], pMACaddr[3], pMACaddr[4], pMACaddr[5]);
- setenv("ethaddr", nid);
+#ifdef CONFIG_MTD_NOR_FLASH
+ /* we cram the MAC in the last flash sector */
+ uchar *board_mac_addr = (uchar *)0x203F0000;
+ if (is_valid_ethaddr(board_mac_addr)) {
+ memcpy(mac_addr, board_mac_addr, 6);
+ eth_setenv_enetaddr("ethaddr", mac_addr);