wdenk | e085e5b | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 1 | /* |
| 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> |
| 23 | |
Wolfgang Denk | 6405a15 | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 24 | DECLARE_GLOBAL_DATA_PTR; |
| 25 | |
wdenk | e085e5b | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 26 | int board_init(void) |
| 27 | { |
wdenk | e085e5b | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 28 | *((volatile unsigned char *) VOICEBLUE_LED_REG) = 0xaa; |
| 29 | |
| 30 | /* arch number of VoiceBlue board */ |
Stefan Roese | 9052786 | 2006-10-28 17:12:58 +0200 | [diff] [blame] | 31 | gd->bd->bi_arch_number = MACH_TYPE_VOICEBLUE; |
wdenk | e085e5b | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 32 | |
| 33 | /* adress of boot parameters */ |
| 34 | gd->bd->bi_boot_params = 0x10000100; |
| 35 | |
| 36 | return 0; |
| 37 | } |
| 38 | |
| 39 | int dram_init(void) |
| 40 | { |
wdenk | e085e5b | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 41 | *((volatile unsigned short *) VOICEBLUE_LED_REG) = 0xff; |
| 42 | |
Stefan Roese | 9052786 | 2006-10-28 17:12:58 +0200 | [diff] [blame] | 43 | /* Take the Ethernet controller out of reset and wait |
| 44 | * for the EEPROM load to complete. */ |
wdenk | e085e5b | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 45 | *((volatile unsigned short *) GPIO_DATA_OUTPUT_REG) |= 0x80; |
Jean-Christophe PLAGNIOL-VILLARD | 8c9fc00 | 2009-05-15 23:47:02 +0200 | [diff] [blame^] | 46 | udelay(10); /* doesn't work before timer_init call */ |
wdenk | e085e5b | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 47 | *((volatile unsigned short *) GPIO_DATA_OUTPUT_REG) &= ~0x80; |
| 48 | udelay(500); |
| 49 | |
| 50 | gd->bd->bi_dram[0].start = PHYS_SDRAM_1; |
| 51 | gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; |
| 52 | |
| 53 | return 0; |
| 54 | } |
| 55 | |
wdenk | e085e5b | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 56 | int misc_init_r(void) |
| 57 | { |
| 58 | *((volatile unsigned short *) VOICEBLUE_LED_REG) = 0x55; |
| 59 | |
wdenk | e085e5b | 2005-04-05 23:32:21 +0000 | [diff] [blame] | 60 | return 0; |
| 61 | } |
| 62 | |
| 63 | int board_late_init(void) |
| 64 | { |
| 65 | *((volatile unsigned char *) VOICEBLUE_LED_REG) = 0x00; |
| 66 | |
| 67 | return 0; |
| 68 | } |