blob: 4ed6f50e5cf8f023dd40b235ff8b2d768b77ee3b [file] [log] [blame]
John Schmoller92af65492010-10-22 00:20:24 -05001/*
2 * Copyright 2009 Extreme Engineering Solutions, Inc.
3 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
John Schmoller92af65492010-10-22 00:20:24 -05005 */
6
7#include <common.h>
8#include "fsl_8xxx_misc.h"
9
10int checkboard(void)
11{
12 char name[] = CONFIG_SYS_BOARD_NAME;
Wolfgang Denkf0c0b3a2011-05-04 10:32:28 +000013 char buf[64];
John Schmoller92af65492010-10-22 00:20:24 -050014 char *s;
Wolfgang Denkf0c0b3a2011-05-04 10:32:28 +000015 int i;
John Schmoller92af65492010-10-22 00:20:24 -050016
17#ifdef CONFIG_SYS_FORM_CUSTOM
18 s = "Custom";
19#elif CONFIG_SYS_FORM_6U_CPCI
20 s = "6U CompactPCI";
21#elif CONFIG_SYS_FORM_ATCA_PMC
22 s = "ATCA w/PMC";
23#elif CONFIG_SYS_FORM_ATCA_AMC
24 s = "ATCA w/AMC";
25#elif CONFIG_SYS_FORM_VME
26 s = "VME";
27#elif CONFIG_SYS_FORM_6U_VPX
28 s = "6U VPX";
29#elif CONFIG_SYS_FORM_PMC
30 s = "PMC";
31#elif CONFIG_SYS_FORM_PCI
32 s = "PCI";
33#elif CONFIG_SYS_FORM_3U_CPCI
34 s = "3U CompactPCI";
35#elif CONFIG_SYS_FORM_AMC
36 s = "AdvancedMC";
37#elif CONFIG_SYS_FORM_XMC
38 s = "XMC";
39#elif CONFIG_SYS_FORM_PMC_XMC
40 s = "PMC/XMC";
41#elif CONFIG_SYS_FORM_PCI_EXPRESS
42 s = "PCI Express";
43#elif CONFIG_SYS_FORM_3U_VPX
44 s = "3U VPX";
45#else
46#error "Form factor not defined"
47#endif
48
49 name[strlen(name) - 1] += get_board_derivative();
50 printf("Board: X-ES %s %s SBC\n", name, s);
51
52 /* Display board specific information */
53 puts(" ");
Wolfgang Denkf0c0b3a2011-05-04 10:32:28 +000054 i = getenv_f("board_rev", buf, sizeof(buf));
55 if (i > 0)
56 printf("Rev %s, ", buf);
57 i = getenv_f("serial#", buf, sizeof(buf));
58 if (i > 0)
59 printf("Serial# %s, ", buf);
60 i = getenv_f("board_cfg", buf, sizeof(buf));
61 if (i > 0)
62 printf("Cfg %s", buf);
John Schmoller92af65492010-10-22 00:20:24 -050063 puts("\n");
64
65 return 0;
66}