blob: 92e1cfb75f3c365009ffe2f3c5451016a5b7839d [file] [log] [blame]
Georg Schardt5deb8022008-10-24 13:51:52 +02001/*
2 * (C) Copyright 2008
3 *
4 * Author: Xilinx Inc.
5 *
6 * Modified by:
7 * Georg Schardt <schardt@team-ctech.de>
8 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02009 * SPDX-License-Identifier: GPL-2.0+
Georg Schardt5deb8022008-10-24 13:51:52 +020010 */
11
12#include <config.h>
13#include <common.h>
14#include <asm/processor.h>
15
16int checkboard(void)
17{
Wolfgang Denkf0c0b3a2011-05-04 10:32:28 +000018 char buf[64];
19 int i;
20 int l = getenv_f("serial#", buf, sizeof(buf));
Georg Schardt5deb8022008-10-24 13:51:52 +020021
Wolfgang Denkf0c0b3a2011-05-04 10:32:28 +000022 if (l < 0) {
Georg Schardt5deb8022008-10-24 13:51:52 +020023 printf("Avnet Virtex4 FX12 with no serial #");
24 } else {
Georg Schardt5deb8022008-10-24 13:51:52 +020025 printf("Avnet Virtex4 FX12 Minimodul # ");
Wolfgang Denkf0c0b3a2011-05-04 10:32:28 +000026 for (i = 0; i < l; ++i) {
27 if (buf[i] == ' ')
28 break;
29 putc(buf[i]);
30 }
Georg Schardt5deb8022008-10-24 13:51:52 +020031 }
32 putc('\n');
33 return 0;
34}