1 /* 2 * Copyright 2009 Extreme Engineering Solutions, Inc. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License as 6 * published by the Free Software Foundation; either version 2 of 7 * the License, or (at your option) any later version. 8 */ 9 10 #include <common.h> 11 #include "fsl_8xxx_misc.h" 12 13 int checkboard(void) 14 { 15 char name[] = CONFIG_SYS_BOARD_NAME; 16 char *s; 17 18 #ifdef CONFIG_SYS_FORM_CUSTOM 19 s = "Custom"; 20 #elif CONFIG_SYS_FORM_6U_CPCI 21 s = "6U CompactPCI"; 22 #elif CONFIG_SYS_FORM_ATCA_PMC 23 s = "ATCA w/PMC"; 24 #elif CONFIG_SYS_FORM_ATCA_AMC 25 s = "ATCA w/AMC"; 26 #elif CONFIG_SYS_FORM_VME 27 s = "VME"; 28 #elif CONFIG_SYS_FORM_6U_VPX 29 s = "6U VPX"; 30 #elif CONFIG_SYS_FORM_PMC 31 s = "PMC"; 32 #elif CONFIG_SYS_FORM_PCI 33 s = "PCI"; 34 #elif CONFIG_SYS_FORM_3U_CPCI 35 s = "3U CompactPCI"; 36 #elif CONFIG_SYS_FORM_AMC 37 s = "AdvancedMC"; 38 #elif CONFIG_SYS_FORM_XMC 39 s = "XMC"; 40 #elif CONFIG_SYS_FORM_PMC_XMC 41 s = "PMC/XMC"; 42 #elif CONFIG_SYS_FORM_PCI_EXPRESS 43 s = "PCI Express"; 44 #elif CONFIG_SYS_FORM_3U_VPX 45 s = "3U VPX"; 46 #else 47 #error "Form factor not defined" 48 #endif 49 50 name[strlen(name) - 1] += get_board_derivative(); 51 printf("Board: X-ES %s %s SBC\n", name, s); 52 53 /* Display board specific information */ 54 puts(" "); 55 if ((s = getenv("board_rev"))) 56 printf("Rev %s, ", s); 57 if ((s = getenv("serial#"))) 58 printf("Serial# %s, ", s); 59 if ((s = getenv("board_cfg"))) 60 printf("Cfg %s", s); 61 puts("\n"); 62 63 return 0; 64 } 65