]> git.ipfire.org Git - people/ms/u-boot.git/blame - board/tcm-bf537/tcm-bf537.c
ARM: OMAP: remove sr32() from OMAP board code
[people/ms/u-boot.git] / board / tcm-bf537 / tcm-bf537.c
CommitLineData
9417d9a2
MF
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 <net.h>
13#include <netdev.h>
14#include <asm/blackfin.h>
15#include <asm/net.h>
71dcc2c2 16#include "../cm-bf537e/gpio_cfi_flash.h"
9417d9a2
MF
17
18DECLARE_GLOBAL_DATA_PTR;
19
20int checkboard(void)
21{
22 printf("Board: Bluetechnix TCM-BF537 board\n");
23 printf(" Support: http://www.bluetechnix.at/\n");
24 return 0;
25}
26
fff18bee 27static void board_init_enetaddr(char *var)
9417d9a2 28{
fff18bee
HK
29 uchar enetaddr[6];
30
31 if (eth_getenv_enetaddr(var, enetaddr))
32 return;
33
34 printf("Warning: %s: generating 'random' MAC address\n", var);
35 bfin_gen_rand_mac(enetaddr);
36 eth_setenv_enetaddr(var, enetaddr);
9417d9a2
MF
37}
38
fff18bee
HK
39#ifndef CONFIG_BFIN_MAC
40# define bfin_EMAC_initialize(x) 1
41#endif
42#ifndef CONFIG_SMC911X
43# define smc911x_initialize(n, x) 1
44#endif
9417d9a2
MF
45int board_eth_init(bd_t *bis)
46{
fff18bee
HK
47 /* return ok if at least 1 eth device works */
48 return bfin_EMAC_initialize(bis) &
49 smc911x_initialize(0, CONFIG_SMC911X_BASE);
9417d9a2 50}
9417d9a2
MF
51
52int misc_init_r(void)
53{
fff18bee
HK
54 board_init_enetaddr("ethaddr");
55 board_init_enetaddr("eth1addr");
9417d9a2
MF
56
57 gpio_cfi_flash_init();
58
59 return 0;
60}