York Sun | b195425 | 2013-09-16 12:49:31 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 Freescale Semiconductor, Inc. |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #ifndef _ASM_FSL_ERRATA_H |
| 8 | #define _ASM_FSL_ERRATA_H |
| 9 | |
| 10 | #include <common.h> |
| 11 | #include <asm/processor.h> |
| 12 | |
| 13 | #ifdef CONFIG_SYS_FSL_ERRATUM_A006379 |
| 14 | static inline bool has_erratum_a006379(void) |
| 15 | { |
| 16 | u32 svr = get_svr(); |
| 17 | if (((SVR_SOC_VER(svr) == SVR_T4240) && SVR_MAJ(svr) <= 1) || |
Shengzhou Liu | 64ca4b4 | 2014-01-06 13:23:21 +0800 | [diff] [blame] | 18 | ((SVR_SOC_VER(svr) == SVR_T4160) && SVR_MAJ(svr) <= 1) || |
| 19 | ((SVR_SOC_VER(svr) == SVR_B4860) && SVR_MAJ(svr) <= 2) || |
| 20 | ((SVR_SOC_VER(svr) == SVR_B4420) && SVR_MAJ(svr) <= 2) || |
| 21 | ((SVR_SOC_VER(svr) == SVR_T2080) && SVR_MAJ(svr) <= 1) || |
| 22 | ((SVR_SOC_VER(svr) == SVR_T2081) && SVR_MAJ(svr) <= 1)) |
York Sun | b195425 | 2013-09-16 12:49:31 -0700 | [diff] [blame] | 23 | return true; |
| 24 | |
| 25 | return false; |
| 26 | } |
| 27 | #endif |
| 28 | |
Suresh Gupta | 086f0a7 | 2014-02-26 14:29:12 +0530 | [diff] [blame] | 29 | #ifdef CONFIG_SYS_FSL_ERRATUM_A006261 |
| 30 | static inline bool has_erratum_a006261(void) |
| 31 | { |
| 32 | u32 svr = get_svr(); |
| 33 | u32 soc = SVR_SOC_VER(svr); |
| 34 | |
| 35 | switch (soc) { |
| 36 | case SVR_P1010: |
| 37 | return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0); |
| 38 | case SVR_P2041: |
| 39 | case SVR_P2040: |
| 40 | return IS_SVR_REV(svr, 1, 0) || |
| 41 | IS_SVR_REV(svr, 1, 1) || IS_SVR_REV(svr, 2, 1); |
| 42 | case SVR_P3041: |
| 43 | return IS_SVR_REV(svr, 1, 0) || |
| 44 | IS_SVR_REV(svr, 1, 1) || |
| 45 | IS_SVR_REV(svr, 2, 0) || IS_SVR_REV(svr, 2, 1); |
| 46 | case SVR_P5010: |
| 47 | case SVR_P5020: |
| 48 | case SVR_P5021: |
| 49 | return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0); |
| 50 | case SVR_T4240: |
| 51 | case SVR_T4160: |
| 52 | return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0); |
| 53 | case SVR_T1040: |
| 54 | return IS_SVR_REV(svr, 1, 0); |
| 55 | case SVR_P5040: |
| 56 | return IS_SVR_REV(svr, 1, 0); |
| 57 | } |
| 58 | |
| 59 | return false; |
| 60 | } |
| 61 | #endif |
| 62 | |
York Sun | b195425 | 2013-09-16 12:49:31 -0700 | [diff] [blame] | 63 | #endif |