board.c 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. #include <common.h>
  10. #include "fsl_8xxx_misc.h"
  11. int checkboard(void)
  12. {
  13. char name[] = CONFIG_SYS_BOARD_NAME;
  14. char *s;
  15. #ifdef CONFIG_SYS_FORM_CUSTOM
  16. s = "Custom";
  17. #elif CONFIG_SYS_FORM_6U_CPCI
  18. s = "6U CompactPCI";
  19. #elif CONFIG_SYS_FORM_ATCA_PMC
  20. s = "ATCA w/PMC";
  21. #elif CONFIG_SYS_FORM_ATCA_AMC
  22. s = "ATCA w/AMC";
  23. #elif CONFIG_SYS_FORM_VME
  24. s = "VME";
  25. #elif CONFIG_SYS_FORM_6U_VPX
  26. s = "6U VPX";
  27. #elif CONFIG_SYS_FORM_PMC
  28. s = "PMC";
  29. #elif CONFIG_SYS_FORM_PCI
  30. s = "PCI";
  31. #elif CONFIG_SYS_FORM_3U_CPCI
  32. s = "3U CompactPCI";
  33. #elif CONFIG_SYS_FORM_AMC
  34. s = "AdvancedMC";
  35. #elif CONFIG_SYS_FORM_XMC
  36. s = "XMC";
  37. #elif CONFIG_SYS_FORM_PMC_XMC
  38. s = "PMC/XMC";
  39. #elif CONFIG_SYS_FORM_PCI_EXPRESS
  40. s = "PCI Express";
  41. #elif CONFIG_SYS_FORM_3U_VPX
  42. s = "3U VPX";
  43. #else
  44. #error "Form factor not defined"
  45. #endif
  46. name[strlen(name) - 1] += get_board_derivative();
  47. printf("Board: X-ES %s %s SBC\n", name, s);
  48. /* Display board specific information */
  49. puts(" ");
  50. if ((s = getenv("board_rev")))
  51. printf("Rev %s, ", s);
  52. if ((s = getenv("serial#")))
  53. printf("Serial# %s, ", s);
  54. if ((s = getenv("board_cfg")))
  55. printf("Cfg %s", s);
  56. puts("\n");
  57. return 0;
  58. }