blob: 4861e3bf8d74e45b76ad916052f4da7ce4857c46 [file] [log] [blame]
York Sun133fbfa2013-09-16 12:49:31 -07001/*
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
14static 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 Liu842eaa12014-01-06 13:23:21 +080018 ((SVR_SOC_VER(svr) == SVR_T4160) && SVR_MAJ(svr) <= 1) ||
Shengzhou Liu5122dfa2014-04-25 16:31:22 +080019 ((SVR_SOC_VER(svr) == SVR_T4080) && SVR_MAJ(svr) <= 1) ||
Shengzhou Liu842eaa12014-01-06 13:23:21 +080020 ((SVR_SOC_VER(svr) == SVR_B4860) && SVR_MAJ(svr) <= 2) ||
21 ((SVR_SOC_VER(svr) == SVR_B4420) && SVR_MAJ(svr) <= 2) ||
22 ((SVR_SOC_VER(svr) == SVR_T2080) && SVR_MAJ(svr) <= 1) ||
23 ((SVR_SOC_VER(svr) == SVR_T2081) && SVR_MAJ(svr) <= 1))
York Sun133fbfa2013-09-16 12:49:31 -070024 return true;
25
26 return false;
27}
28#endif
York Sun133fbfa2013-09-16 12:49:31 -070029#endif
Zhao Qiange7f533c2014-10-30 14:07:39 +080030
31#ifdef CONFIG_SYS_FSL_ERRATUM_A007186
32static inline bool has_erratum_a007186(void)
33{
34 u32 svr = get_svr();
35 u32 soc = SVR_SOC_VER(svr);
36
37 switch (soc) {
38 case SVR_T4240:
39 return IS_SVR_REV(svr, 2, 0);
40 case SVR_T4160:
41 return IS_SVR_REV(svr, 2, 0);
42 case SVR_B4860:
43 return IS_SVR_REV(svr, 2, 0);
44 case SVR_B4420:
45 return IS_SVR_REV(svr, 2, 0);
46 case SVR_T2081:
47 case SVR_T2080:
Shengzhou Liu9ca0d352015-03-09 17:12:22 +080048 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
Zhao Qiange7f533c2014-10-30 14:07:39 +080049 }
50
51 return false;
52}
53#endif