cmd_errata.c 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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_P1022:
  34. puts("Work-around for Erratum SATA A001 enabled\n");
  35. }
  36. }
  37. #endif
  38. #if defined(CONFIG_SYS_P4080_ERRATUM_SERDES8)
  39. puts("Work-around for Erratum SERDES8 enabled\n");
  40. #endif
  41. #if defined(CONFIG_SYS_P4080_ERRATUM_SERDES9)
  42. puts("Work-around for Erratum SERDES9 enabled\n");
  43. #endif
  44. #if defined(CONFIG_SYS_P4080_ERRATUM_SERDES_A005)
  45. puts("Work-around for Erratum SERDES-A005 enabled\n");
  46. #endif
  47. #if defined(CONFIG_SYS_P4080_ERRATUM_CPU22)
  48. if (SVR_MAJ(svr) < 3)
  49. puts("Work-around for Erratum CPU22 enabled\n");
  50. #endif
  51. #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
  52. /*
  53. * NMG_CPU_A011 applies to P4080 rev 1.0, 2.0, fixed in 3.0
  54. * also applies to P3041 rev 1.0, 1.1, P2041 rev 1.0, 1.1
  55. */
  56. if (SVR_SOC_VER(svr) != SVR_P4080 || SVR_MAJ(svr) < 3)
  57. puts("Work-around for Erratum CPU-A011 enabled\n");
  58. #endif
  59. #if defined(CONFIG_SYS_FSL_ERRATUM_CPU_A003999)
  60. puts("Work-around for Erratum CPU-A003999 enabled\n");
  61. #endif
  62. #if defined(CONFIG_SYS_FSL_ERRATUM_DDR_A003474)
  63. puts("Work-around for Erratum DDR-A003473 enabled\n");
  64. #endif
  65. #if defined(CONFIG_SYS_FSL_ERRATUM_DDR_MSYNC_IN)
  66. puts("Work-around for DDR MSYNC_IN Erratum enabled\n");
  67. #endif
  68. #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC111)
  69. puts("Work-around for Erratum ESDHC111 enabled\n");
  70. #endif
  71. #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC135)
  72. puts("Work-around for Erratum ESDHC135 enabled\n");
  73. #endif
  74. #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC136)
  75. puts("Work-around for Erratum ESDHC136 enabled\n");
  76. #endif
  77. #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC_A001)
  78. puts("Work-around for Erratum ESDHC-A001 enabled\n");
  79. #endif
  80. #ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A002
  81. puts("Work-around for Erratum CPC-A002 enabled\n");
  82. #endif
  83. #ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A003
  84. puts("Work-around for Erratum CPC-A003 enabled\n");
  85. #endif
  86. #ifdef CONFIG_SYS_FSL_ERRATUM_ELBC_A001
  87. puts("Work-around for Erratum ELBC-A001 enabled\n");
  88. #endif
  89. #ifdef CONFIG_SYS_FSL_ERRATUM_DDR_A003
  90. puts("Work-around for Erratum DDR-A003 enabled\n");
  91. #endif
  92. #ifdef CONFIG_SYS_FSL_ERRATUM_DDR_115
  93. puts("Work-around for Erratum DDR115 enabled\n");
  94. #endif
  95. #ifdef CONFIG_SYS_FSL_ERRATUM_DDR111_DDR134
  96. puts("Work-around for Erratum DDR111 enabled\n");
  97. puts("Work-around for Erratum DDR134 enabled\n");
  98. #endif
  99. #ifdef CONFIG_SYS_FSL_ERRATUM_IFC_A002769
  100. puts("Work-around for Erratum IFC-A002769 enabled\n");
  101. #endif
  102. #ifdef CONFIG_SYS_FSL_ERRATUM_P1010_A003549
  103. puts("Work-around for Erratum P1010-A003549 enabled\n");
  104. #endif
  105. #ifdef CONFIG_SYS_FSL_ERRATUM_IFC_A003399
  106. puts("Work-around for Erratum IFC A-003399 enabled\n");
  107. #endif
  108. #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_DDR120
  109. if ((SVR_MAJ(svr) == 1) || IS_SVR_REV(svr, 2, 0))
  110. puts("Work-around for Erratum NMG DDR120 enabled\n");
  111. #endif
  112. #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_LBC103
  113. puts("Work-around for Erratum NMG_LBC103 enabled\n");
  114. #endif
  115. #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_ETSEC129
  116. if ((SVR_MAJ(svr) == 1) || IS_SVR_REV(svr, 2, 0))
  117. puts("Work-around for Erratum NMG ETSEC129 enabled\n");
  118. #endif
  119. return 0;
  120. }
  121. U_BOOT_CMD(
  122. errata, 1, 0, do_errata,
  123. "Report errata workarounds",
  124. ""
  125. );