~ubuntu-branches/ubuntu/maverick/uboot-imx/maverick

« back to all changes in this revision

Viewing changes to board/bf537-srv1/bf537-srv1.c

  • Committer: Bazaar Package Importer
  • Author(s): Oliver Grawert
  • Date: 2010-01-20 15:41:26 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100120154126-7bha1jeyjegu7xm5
Tags: 2009.08+really2009.01-0ubuntu1
* revert to the 2009.01 upstream version, 2009.08 has still to 
  many work in progress items in the freescale patchset (MMC and NIC
  dont work at all)
* add the latest patchset from freescale for 2009.01
* add 1002_enable_hush_shell_and_ext2.patch to enable hush shell and ext2 
* add 1003_fix_board_revision_numbers to make sure babbage 2.5 boards have 
  revision 51120 and babbage 3.0 boards have revision 51130 properly set in 
  their cpuinfo

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
 
#include <asm/net.h>
16
 
 
17
 
DECLARE_GLOBAL_DATA_PTR;
18
 
 
19
 
int checkboard(void)
20
 
{
21
 
        printf("Board: Surveyor SRV1 board\n");
22
 
        printf("       Support: http://www.surveyor.com/\n");
23
 
        return 0;
24
 
}
25
 
 
26
 
phys_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
34
 
static 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
 
 
41
 
int board_eth_init(bd_t *bis)
42
 
{
43
 
        return bfin_EMAC_initialize(bis);
44
 
}
45
 
#endif
46
 
 
47
 
int 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
 
}