~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/u-boot/board/bf537-srv1/bf537-srv1.c

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
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
 
 
16
DECLARE_GLOBAL_DATA_PTR;
 
17
 
 
18
int checkboard(void)
 
19
{
 
20
        printf("Board: Surveyor SRV1 board\n");
 
21
        printf("       Support: http://www.surveyor.com/\n");
 
22
        return 0;
 
23
}
 
24
 
 
25
#ifdef CONFIG_BFIN_MAC
 
26
static void board_init_enetaddr(uchar *mac_addr)
 
27
{
 
28
        puts("Warning: Generating 'random' MAC address\n");
 
29
        eth_random_addr(mac_addr);
 
30
        eth_setenv_enetaddr("ethaddr", mac_addr);
 
31
}
 
32
 
 
33
int board_eth_init(bd_t *bis)
 
34
{
 
35
        return bfin_EMAC_initialize(bis);
 
36
}
 
37
#endif
 
38
 
 
39
int misc_init_r(void)
 
40
{
 
41
#ifdef CONFIG_BFIN_MAC
 
42
        uchar enetaddr[6];
 
43
        if (!eth_getenv_enetaddr("ethaddr", enetaddr))
 
44
                board_init_enetaddr(enetaddr);
 
45
#endif
 
46
 
 
47
        return 0;
 
48
}