wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 1 | /* |
| 2 | * ml2.c: U-Boot platform support for Xilinx ML2 board |
| 3 | * |
| 4 | * Copyright 2002 Mind NV |
| 5 | * |
| 6 | * http://www.mind.be/ |
| 7 | * |
| 8 | * Author : Peter De Schrijver (p2@mind.be) |
| 9 | * |
| 10 | * Derived from : Other platform support files in this tree |
| 11 | * |
| 12 | * This software may be used and distributed according to the terms of |
| 13 | * the GNU General Public License (GPL) version 2, incorporated herein by |
| 14 | * reference. Drivers based on or derived from this code fall under the GPL |
| 15 | * and must retain the authorship, copyright and this license notice. This |
| 16 | * file is not a complete program and may only be used when the entire |
| 17 | * program is licensed under the GPL. |
| 18 | * |
| 19 | */ |
| 20 | |
| 21 | #include <common.h> |
| 22 | #include <asm/processor.h> |
| 23 | |
| 24 | |
wdenk | da55c6e | 2004-01-20 23:12:12 +0000 | [diff] [blame] | 25 | int board_early_init_f (void) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 26 | { |
| 27 | return 0; |
| 28 | } |
| 29 | |
| 30 | |
| 31 | int checkboard (void) |
| 32 | { |
Wolfgang Denk | 5c1cfee | 2011-05-04 10:32:28 +0000 | [diff] [blame] | 33 | char buf[64]; |
| 34 | int i; |
| 35 | int l = getenv_f("serial#", buf, sizeof(buf)); |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 36 | |
Wolfgang Denk | 5c1cfee | 2011-05-04 10:32:28 +0000 | [diff] [blame] | 37 | if (l < 0 || strncmp(buf, "ML2", 9)) { |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 38 | printf ("### No HW ID - assuming ML2"); |
| 39 | } else { |
Wolfgang Denk | 5c1cfee | 2011-05-04 10:32:28 +0000 | [diff] [blame] | 40 | for (i = 0; i < l; i++) { |
| 41 | if (buf[i] == ' ') |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 42 | break; |
Wolfgang Denk | 5c1cfee | 2011-05-04 10:32:28 +0000 | [diff] [blame] | 43 | putc(buf[i]); |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 44 | } |
| 45 | } |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 46 | putc ('\n'); |
| 47 | |
| 48 | return (0); |
| 49 | } |
| 50 | |
| 51 | |
Becky Bruce | bd99ae7 | 2008-06-09 16:03:40 -0500 | [diff] [blame] | 52 | phys_size_t initdram (int board_type) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 53 | { |
| 54 | return 32 * 1024 * 1024; |
| 55 | } |
| 56 | |
| 57 | int testdram (void) |
| 58 | { |
| 59 | printf ("test: xxx MB - ok\n"); |
| 60 | |
| 61 | return (0); |
| 62 | } |