wdenk | 281e00a | 2004-08-01 22:48:16 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2004 Sascha Hauer, Synertronixx GmbH |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation; either version 2 of |
| 7 | * the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 17 | * MA 02111-1307 USA |
| 18 | * |
| 19 | */ |
| 20 | |
| 21 | #include <common.h> |
Remy Bohmer | 60f61e6 | 2009-05-02 21:49:18 +0200 | [diff] [blame] | 22 | #include <netdev.h> |
wdenk | 281e00a | 2004-08-01 22:48:16 +0000 | [diff] [blame] | 23 | |
Wolfgang Denk | d87080b | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 24 | DECLARE_GLOBAL_DATA_PTR; |
| 25 | |
wdenk | 281e00a | 2004-08-01 22:48:16 +0000 | [diff] [blame] | 26 | #ifdef CONFIG_SHOW_BOOT_PROGRESS |
| 27 | # define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg) |
| 28 | #else |
| 29 | # define SHOW_BOOT_PROGRESS(arg) |
| 30 | #endif |
| 31 | |
Wolfgang Denk | d87080b | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 32 | int board_init (void) |
| 33 | { |
| 34 | gd->bd->bi_arch_number = MACH_TYPE_SCB9328; |
| 35 | gd->bd->bi_boot_params = 0x08000100; |
wdenk | 281e00a | 2004-08-01 22:48:16 +0000 | [diff] [blame] | 36 | |
Wolfgang Denk | d87080b | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 37 | return 0; |
wdenk | 281e00a | 2004-08-01 22:48:16 +0000 | [diff] [blame] | 38 | } |
| 39 | |
Wolfgang Denk | d87080b | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 40 | int dram_init (void) |
| 41 | { |
wdenk | 281e00a | 2004-08-01 22:48:16 +0000 | [diff] [blame] | 42 | #if ( CONFIG_NR_DRAM_BANKS > 0 ) |
Wolfgang Denk | d87080b | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 43 | gd->bd->bi_dram[0].start = SCB9328_SDRAM_1; |
| 44 | gd->bd->bi_dram[0].size = SCB9328_SDRAM_1_SIZE; |
wdenk | 281e00a | 2004-08-01 22:48:16 +0000 | [diff] [blame] | 45 | #endif |
| 46 | #if ( CONFIG_NR_DRAM_BANKS > 1 ) |
Wolfgang Denk | d87080b | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 47 | gd->bd->bi_dram[1].start = SCB9328_SDRAM_2; |
| 48 | gd->bd->bi_dram[1].size = SCB9328_SDRAM_2_SIZE; |
wdenk | 281e00a | 2004-08-01 22:48:16 +0000 | [diff] [blame] | 49 | #endif |
| 50 | #if ( CONFIG_NR_DRAM_BANKS > 2 ) |
Wolfgang Denk | d87080b | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 51 | gd->bd->bi_dram[2].start = SCB9328_SDRAM_3; |
| 52 | gd->bd->bi_dram[2].size = SCB9328_SDRAM_3_SIZE; |
wdenk | 281e00a | 2004-08-01 22:48:16 +0000 | [diff] [blame] | 53 | #endif |
| 54 | #if ( CONFIG_NR_DRAM_BANKS > 3 ) |
Wolfgang Denk | d87080b | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 55 | gd->bd->bi_dram[3].start = SCB9328_SDRAM_4; |
| 56 | gd->bd->bi_dram[3].size = SCB9328_SDRAM_4_SIZE; |
wdenk | 281e00a | 2004-08-01 22:48:16 +0000 | [diff] [blame] | 57 | #endif |
Wolfgang Denk | d87080b | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 58 | return 0; |
wdenk | 281e00a | 2004-08-01 22:48:16 +0000 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | /** |
| 62 | * show_boot_progress: - indicate state of the boot process |
| 63 | * |
| 64 | * @param status: Status number - see README for details. |
| 65 | * |
| 66 | * The CSB226 does only have 3 LEDs, so we switch them on at the most |
| 67 | * important states (1, 5, 15). |
| 68 | */ |
| 69 | |
| 70 | void show_boot_progress (int status) |
| 71 | { |
| 72 | return; |
| 73 | } |
Remy Bohmer | 60f61e6 | 2009-05-02 21:49:18 +0200 | [diff] [blame] | 74 | |
| 75 | #ifdef CONFIG_DRIVER_DM9000 |
| 76 | int board_eth_init(bd_t *bis) |
| 77 | { |
| 78 | return dm9000_initialize(bis); |
| 79 | } |
| 80 | #endif |