Georg Schardt | 5deb802 | 2008-10-24 13:51:52 +0200 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2008 |
| 3 | * |
| 4 | * Author: Xilinx Inc. |
| 5 | * |
| 6 | * Modified by: |
| 7 | * Georg Schardt <schardt@team-ctech.de> |
| 8 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 9 | * SPDX-License-Identifier: GPL-2.0+ |
Georg Schardt | 5deb802 | 2008-10-24 13:51:52 +0200 | [diff] [blame] | 10 | */ |
| 11 | |
| 12 | #include <config.h> |
| 13 | #include <common.h> |
| 14 | #include <asm/processor.h> |
| 15 | |
| 16 | int checkboard(void) |
| 17 | { |
Wolfgang Denk | f0c0b3a | 2011-05-04 10:32:28 +0000 | [diff] [blame] | 18 | char buf[64]; |
| 19 | int i; |
| 20 | int l = getenv_f("serial#", buf, sizeof(buf)); |
Georg Schardt | 5deb802 | 2008-10-24 13:51:52 +0200 | [diff] [blame] | 21 | |
Wolfgang Denk | f0c0b3a | 2011-05-04 10:32:28 +0000 | [diff] [blame] | 22 | if (l < 0) { |
Georg Schardt | 5deb802 | 2008-10-24 13:51:52 +0200 | [diff] [blame] | 23 | printf("Avnet Virtex4 FX12 with no serial #"); |
| 24 | } else { |
Georg Schardt | 5deb802 | 2008-10-24 13:51:52 +0200 | [diff] [blame] | 25 | printf("Avnet Virtex4 FX12 Minimodul # "); |
Wolfgang Denk | f0c0b3a | 2011-05-04 10:32:28 +0000 | [diff] [blame] | 26 | for (i = 0; i < l; ++i) { |
| 27 | if (buf[i] == ' ') |
| 28 | break; |
| 29 | putc(buf[i]); |
| 30 | } |
Georg Schardt | 5deb802 | 2008-10-24 13:51:52 +0200 | [diff] [blame] | 31 | } |
| 32 | putc('\n'); |
| 33 | return 0; |
| 34 | } |