blob: 92e1cfb75f3c365009ffe2f3c5451016a5b7839d [file] [log] [blame]
Georg Schardt3ce59a12008-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 Denkd79de1d2013-07-08 09:37:19 +02009 * SPDX-License-Identifier: GPL-2.0+
Georg Schardt3ce59a12008-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 Denk5c1cfee2011-05-04 10:32:28 +000018 char buf[64];
19 int i;
20 int l = getenv_f("serial#", buf, sizeof(buf));
Georg Schardt3ce59a12008-10-24 13:51:52 +020021
Wolfgang Denk5c1cfee2011-05-04 10:32:28 +000022 if (l < 0) {
Georg Schardt3ce59a12008-10-24 13:51:52 +020023 printf("Avnet Virtex4 FX12 with no serial #");
24 } else {
Wolfgang Denk5c1cfee2011-05-04 10:32:28 +000025 printf("Avnet Virtex4 FX12 Minimodul # ");
26 for (i = 0; i < l; ++i) {
27 if (buf[i] == ' ')
Georg Schardt3ce59a12008-10-24 13:51:52 +020028 break;
Wolfgang Denk5c1cfee2011-05-04 10:32:28 +000029 putc(buf[i]);
Georg Schardt3ce59a12008-10-24 13:51:52 +020030 }
Georg Schardt3ce59a12008-10-24 13:51:52 +020031 }
32 putc('\n');
33 return 0;
34}