blob: 71b452a4f88825f625e4ba15796f910365da9c12 [file] [log] [blame]
Mike Frysingerd7fdc142008-10-12 23:16:52 -04001/*
2 * U-boot - main board file
3 *
4 * Copyright (c) 2005-2009 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#include <common.h>
10#include <config.h>
11#include <command.h>
12#include <netdev.h>
13#include <net.h>
14#include <asm/blackfin.h>
15#include <asm/net.h>
16
17DECLARE_GLOBAL_DATA_PTR;
18
19int checkboard(void)
20{
21 printf("Board: CSP BF537 Minotaur board\n");
22 printf(" Support: http://www.camsig.co.uk/\n");
23 return 0;
24}
25
26phys_size_t initdram(int board_type)
27{
28 gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
29 gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
30 return gd->bd->bi_memsize;
31}
32
33#ifdef CONFIG_BFIN_MAC
34static void board_init_enetaddr(uchar *mac_addr)
35{
36 puts("Warning: Generating 'random' MAC address\n");
37 bfin_gen_rand_mac(mac_addr);
38 eth_setenv_enetaddr("ethaddr", mac_addr);
39}
40
41int board_eth_init(bd_t *bis)
42{
43 return bfin_EMAC_initialize(bis);
44}
45#endif
46
47int misc_init_r(void)
48{
49#ifdef CONFIG_BFIN_MAC
50 uchar enetaddr[6];
51 if (!eth_getenv_enetaddr("ethaddr", enetaddr))
52 board_init_enetaddr(enetaddr);
53#endif
54
55 return 0;
56}