blob: 5f8af2bd24385120e65e59d0e8dff6583685a3f3 [file] [log] [blame]
wdenk3c2b3d42005-04-05 23:32:21 +00001/*
2 * (C) Copyright 2005 2N TELEKOMUNIKACE, Ladislav Michl
3 *
4 * See file CREDITS for list of people who contributed to this
5 * project.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19 * MA 02111-1307 USA
20 */
21
22#include <common.h>
Ben Warren7194ab82009-10-04 22:37:03 -070023#include <netdev.h>
wdenk3c2b3d42005-04-05 23:32:21 +000024
Wolfgang Denkd87080b2006-03-31 18:32:53 +020025DECLARE_GLOBAL_DATA_PTR;
26
wdenk3c2b3d42005-04-05 23:32:21 +000027int board_init(void)
28{
wdenk3c2b3d42005-04-05 23:32:21 +000029 *((volatile unsigned char *) VOICEBLUE_LED_REG) = 0xaa;
30
31 /* arch number of VoiceBlue board */
Stefan Roese12655812006-10-28 17:12:58 +020032 gd->bd->bi_arch_number = MACH_TYPE_VOICEBLUE;
wdenk3c2b3d42005-04-05 23:32:21 +000033
34 /* adress of boot parameters */
35 gd->bd->bi_boot_params = 0x10000100;
36
37 return 0;
38}
39
40int dram_init(void)
41{
wdenk3c2b3d42005-04-05 23:32:21 +000042 *((volatile unsigned short *) VOICEBLUE_LED_REG) = 0xff;
43
Stefan Roese12655812006-10-28 17:12:58 +020044 /* Take the Ethernet controller out of reset and wait
45 * for the EEPROM load to complete. */
wdenk3c2b3d42005-04-05 23:32:21 +000046 *((volatile unsigned short *) GPIO_DATA_OUTPUT_REG) |= 0x80;
Jean-Christophe PLAGNIOL-VILLARDb54384e2009-05-15 23:47:02 +020047 udelay(10); /* doesn't work before timer_init call */
wdenk3c2b3d42005-04-05 23:32:21 +000048 *((volatile unsigned short *) GPIO_DATA_OUTPUT_REG) &= ~0x80;
49 udelay(500);
50
51 gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
52 gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
53
54 return 0;
55}
56
wdenk3c2b3d42005-04-05 23:32:21 +000057int misc_init_r(void)
58{
59 *((volatile unsigned short *) VOICEBLUE_LED_REG) = 0x55;
60
wdenk3c2b3d42005-04-05 23:32:21 +000061 return 0;
62}
63
64int board_late_init(void)
65{
66 *((volatile unsigned char *) VOICEBLUE_LED_REG) = 0x00;
67
68 return 0;
69}
Ben Warren7194ab82009-10-04 22:37:03 -070070
71#ifdef CONFIG_CMD_NET
72int board_eth_init(bd_t *bis)
73{
74 int rc = 0;
75#ifdef CONFIG_SMC91111
76 rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
77#endif
78 return rc;
79}
80#endif