John Schmoller | d9c2dd5 | 2010-10-22 00:20:24 -0500 | [diff] [blame] | 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; |
Wolfgang Denk | 5c1cfee | 2011-05-04 10:32:28 +0000 | [diff] [blame] | 16 | char buf[64]; |
John Schmoller | d9c2dd5 | 2010-10-22 00:20:24 -0500 | [diff] [blame] | 17 | char *s; |
Wolfgang Denk | 5c1cfee | 2011-05-04 10:32:28 +0000 | [diff] [blame] | 18 | int i; |
John Schmoller | d9c2dd5 | 2010-10-22 00:20:24 -0500 | [diff] [blame] | 19 | |
| 20 | #ifdef CONFIG_SYS_FORM_CUSTOM |
| 21 | s = "Custom"; |
| 22 | #elif CONFIG_SYS_FORM_6U_CPCI |
| 23 | s = "6U CompactPCI"; |
| 24 | #elif CONFIG_SYS_FORM_ATCA_PMC |
| 25 | s = "ATCA w/PMC"; |
| 26 | #elif CONFIG_SYS_FORM_ATCA_AMC |
| 27 | s = "ATCA w/AMC"; |
| 28 | #elif CONFIG_SYS_FORM_VME |
| 29 | s = "VME"; |
| 30 | #elif CONFIG_SYS_FORM_6U_VPX |
| 31 | s = "6U VPX"; |
| 32 | #elif CONFIG_SYS_FORM_PMC |
| 33 | s = "PMC"; |
| 34 | #elif CONFIG_SYS_FORM_PCI |
| 35 | s = "PCI"; |
| 36 | #elif CONFIG_SYS_FORM_3U_CPCI |
| 37 | s = "3U CompactPCI"; |
| 38 | #elif CONFIG_SYS_FORM_AMC |
| 39 | s = "AdvancedMC"; |
| 40 | #elif CONFIG_SYS_FORM_XMC |
| 41 | s = "XMC"; |
| 42 | #elif CONFIG_SYS_FORM_PMC_XMC |
| 43 | s = "PMC/XMC"; |
| 44 | #elif CONFIG_SYS_FORM_PCI_EXPRESS |
| 45 | s = "PCI Express"; |
| 46 | #elif CONFIG_SYS_FORM_3U_VPX |
| 47 | s = "3U VPX"; |
| 48 | #else |
| 49 | #error "Form factor not defined" |
| 50 | #endif |
| 51 | |
| 52 | name[strlen(name) - 1] += get_board_derivative(); |
| 53 | printf("Board: X-ES %s %s SBC\n", name, s); |
| 54 | |
| 55 | /* Display board specific information */ |
| 56 | puts(" "); |
Wolfgang Denk | 5c1cfee | 2011-05-04 10:32:28 +0000 | [diff] [blame] | 57 | i = getenv_f("board_rev", buf, sizeof(buf)); |
| 58 | if (i > 0) |
| 59 | printf("Rev %s, ", buf); |
| 60 | i = getenv_f("serial#", buf, sizeof(buf)); |
| 61 | if (i > 0) |
| 62 | printf("Serial# %s, ", buf); |
| 63 | i = getenv_f("board_cfg", buf, sizeof(buf)); |
| 64 | if (i > 0) |
| 65 | printf("Cfg %s", buf); |
John Schmoller | d9c2dd5 | 2010-10-22 00:20:24 -0500 | [diff] [blame] | 66 | puts("\n"); |
| 67 | |
| 68 | return 0; |
| 69 | } |