cmd_errata.c 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * Copyright 2010-2011 Freescale Semiconductor, Inc.
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #include <common.h>
  23. #include <command.h>
  24. #include <linux/compiler.h>
  25. #include <asm/processor.h>
  26. static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  27. {
  28. __maybe_unused u32 svr = get_svr();
  29. #if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
  30. if (IS_SVR_REV(svr, 1, 0)) {
  31. switch (SVR_SOC_VER(svr)) {
  32. case SVR_P1013:
  33. case SVR_P1013_E:
  34. case SVR_P1022:
  35. case SVR_P1022_E:
  36. puts("Work-around for Erratum SATA A001 enabled\n");
  37. }
  38. }
  39. #endif
  40. #if defined(CONFIG_SYS_P4080_ERRATUM_SERDES8)
  41. puts("Work-around for Erratum SERDES8 enabled\n");
  42. #endif
  43. #if defined(CONFIG_SYS_P4080_ERRATUM_CPU22)
  44. puts("Work-around for Erratum CPU22 enabled\n");
  45. #endif
  46. #if defined(CONFIG_SYS_FSL_ERRATUM_DDR_MSYNC_IN)
  47. puts("Work-around for DDR MSYNC_IN Erratum enabled\n");
  48. #endif
  49. #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC111)
  50. puts("Work-around for Erratum ESDHC111 enabled\n");
  51. #endif
  52. #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC135)
  53. puts("Work-around for Erratum ESDHC135 enabled\n");
  54. #endif
  55. #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC136)
  56. puts("Work-around for Erratum ESDHC136 enabled\n");
  57. #endif
  58. #ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A002
  59. puts("Work-around for Erratum CPC-A002 enabled\n");
  60. #endif
  61. #ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A003
  62. puts("Work-around for Erratum CPC-A003 enabled\n");
  63. #endif
  64. #ifdef CONFIG_SYS_FSL_ERRATUM_ELBC_A001
  65. puts("Work-around for Erratum ELBC-A001 enabled\n");
  66. #endif
  67. #ifdef CONFIG_SYS_FSL_ERRATUM_DDR_A003
  68. puts("Work-around for Erratum DDR-A003 enabled\n");
  69. #endif
  70. return 0;
  71. }
  72. U_BOOT_CMD(
  73. errata, 1, 0, do_errata,
  74. "Report errata workarounds",
  75. ""
  76. );