Georg Schardt | 3ce59a1 | 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 | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 9 | * SPDX-License-Identifier: GPL-2.0+ |
Georg Schardt | 3ce59a1 | 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 | 5c1cfee | 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 | 3ce59a1 | 2008-10-24 13:51:52 +0200 | [diff] [blame] | 21 | |
Wolfgang Denk | 5c1cfee | 2011-05-04 10:32:28 +0000 | [diff] [blame] | 22 | if (l < 0) { |
Georg Schardt | 3ce59a1 | 2008-10-24 13:51:52 +0200 | [diff] [blame] | 23 | printf("Avnet Virtex4 FX12 with no serial #"); |
| 24 | } else { |
Wolfgang Denk | 5c1cfee | 2011-05-04 10:32:28 +0000 | [diff] [blame] | 25 | printf("Avnet Virtex4 FX12 Minimodul # "); |
| 26 | for (i = 0; i < l; ++i) { |
| 27 | if (buf[i] == ' ') |
Georg Schardt | 3ce59a1 | 2008-10-24 13:51:52 +0200 | [diff] [blame] | 28 | break; |
Wolfgang Denk | 5c1cfee | 2011-05-04 10:32:28 +0000 | [diff] [blame] | 29 | putc(buf[i]); |
Georg Schardt | 3ce59a1 | 2008-10-24 13:51:52 +0200 | [diff] [blame] | 30 | } |
Georg Schardt | 3ce59a1 | 2008-10-24 13:51:52 +0200 | [diff] [blame] | 31 | } |
| 32 | putc('\n'); |
| 33 | return 0; |
| 34 | } |