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