2010-10-22 05:20:24 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2009 Extreme Engineering Solutions, Inc.
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2010-10-22 05:20:24 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include "fsl_8xxx_misc.h"
|
|
|
|
|
|
|
|
int checkboard(void)
|
|
|
|
{
|
|
|
|
char name[] = CONFIG_SYS_BOARD_NAME;
|
2011-05-04 10:32:28 +00:00
|
|
|
char buf[64];
|
2010-10-22 05:20:24 +00:00
|
|
|
char *s;
|
2011-05-04 10:32:28 +00:00
|
|
|
int i;
|
2010-10-22 05:20:24 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_SYS_FORM_CUSTOM
|
|
|
|
s = "Custom";
|
|
|
|
#elif CONFIG_SYS_FORM_6U_CPCI
|
|
|
|
s = "6U CompactPCI";
|
|
|
|
#elif CONFIG_SYS_FORM_ATCA_PMC
|
|
|
|
s = "ATCA w/PMC";
|
|
|
|
#elif CONFIG_SYS_FORM_ATCA_AMC
|
|
|
|
s = "ATCA w/AMC";
|
|
|
|
#elif CONFIG_SYS_FORM_VME
|
|
|
|
s = "VME";
|
|
|
|
#elif CONFIG_SYS_FORM_6U_VPX
|
|
|
|
s = "6U VPX";
|
|
|
|
#elif CONFIG_SYS_FORM_PMC
|
|
|
|
s = "PMC";
|
|
|
|
#elif CONFIG_SYS_FORM_PCI
|
|
|
|
s = "PCI";
|
|
|
|
#elif CONFIG_SYS_FORM_3U_CPCI
|
|
|
|
s = "3U CompactPCI";
|
|
|
|
#elif CONFIG_SYS_FORM_AMC
|
|
|
|
s = "AdvancedMC";
|
|
|
|
#elif CONFIG_SYS_FORM_XMC
|
|
|
|
s = "XMC";
|
|
|
|
#elif CONFIG_SYS_FORM_PMC_XMC
|
|
|
|
s = "PMC/XMC";
|
|
|
|
#elif CONFIG_SYS_FORM_PCI_EXPRESS
|
|
|
|
s = "PCI Express";
|
|
|
|
#elif CONFIG_SYS_FORM_3U_VPX
|
|
|
|
s = "3U VPX";
|
|
|
|
#else
|
|
|
|
#error "Form factor not defined"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
name[strlen(name) - 1] += get_board_derivative();
|
|
|
|
printf("Board: X-ES %s %s SBC\n", name, s);
|
|
|
|
|
|
|
|
/* Display board specific information */
|
|
|
|
puts(" ");
|
2017-08-03 18:22:12 +00:00
|
|
|
i = env_get_f("board_rev", buf, sizeof(buf));
|
2011-05-04 10:32:28 +00:00
|
|
|
if (i > 0)
|
|
|
|
printf("Rev %s, ", buf);
|
2017-08-03 18:22:12 +00:00
|
|
|
i = env_get_f("serial#", buf, sizeof(buf));
|
2011-05-04 10:32:28 +00:00
|
|
|
if (i > 0)
|
|
|
|
printf("Serial# %s, ", buf);
|
2017-08-03 18:22:12 +00:00
|
|
|
i = env_get_f("board_cfg", buf, sizeof(buf));
|
2011-05-04 10:32:28 +00:00
|
|
|
if (i > 0)
|
|
|
|
printf("Cfg %s", buf);
|
2010-10-22 05:20:24 +00:00
|
|
|
puts("\n");
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|