[U-Boot] [PATCH 1/2] powerpc/mpc85xx: modify erratum A007186

York Sun yorksun at freescale.com
Fri Sep 26 18:10:28 CEST 2014


On 09/25/2014 09:37 PM, Zhao Qiang wrote:
> T2080 v1.0 has this errata while v1.1 has fixed
> this errata by hardware, add a new function to
> check the SVR_SOC_VER, SVR_MAJ and SVR_MIN first,
> if the cpu is T2080 and version is not v1.0, doesn't
> run the a007186 errata_workaround.
> 
> Signed-off-by: Zhao Qiang <B45475 at freescale.com>
> ---
>  arch/powerpc/cpu/mpc85xx/cmd_errata.c          |   3 +-
>  arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c | 210 ++++++++++++++-----------
>  arch/powerpc/include/asm/fsl_errata.h          |  14 ++
>  3 files changed, 130 insertions(+), 97 deletions(-)
> 
> diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
> index 3a04a89..741eb63 100644
> --- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c
> +++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
> @@ -270,7 +270,8 @@ static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>  	puts("Work-around for Erratum USB14 enabled\n");
>  #endif
>  #ifdef CONFIG_SYS_FSL_ERRATUM_A007186
> -	puts("Work-around for Erratum A007186 enabled\n");
> +	if (!not_has_erratum_a007186())
> +		puts("Work-around for Erratum A007186 enabled\n");

Please use positive logic.


>  #endif
>  #ifdef CONFIG_SYS_FSL_ERRATUM_A006593
>  	puts("Work-around for Erratum A006593 enabled\n");
> diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
> index d1fc76a..9b0a538 100644
> --- a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
> +++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
> @@ -11,6 +11,7 @@
>  #include <asm/processor.h>
>  #include <asm/fsl_law.h>
>  #include <asm/errno.h>
> +#include <asm/fsl_errata.h>
>  #include "fsl_corenet2_serdes.h"
>  
>  #ifdef CONFIG_SYS_FSL_SRDS_1
> @@ -203,108 +204,125 @@ u64 serdes_init(u32 sd, u32 sd_addr, u32 sd_prctl_mask, u32 sd_prctl_shift)
>   * This workaround for the protocols and rates that only have the Ring VCO.
>   */
>  #ifdef CONFIG_SYS_FSL_ERRATUM_A007186
> -	sfp_spfr0 = in_be32(&sfp_regs->fsl_spfr0);
> -	debug("A007186: sfp_spfr0= %x\n", sfp_spfr0);
> +	if (!not_has_erratum_a007186()) {
> +		sfp_spfr0 = in_be32(&sfp_regs->fsl_spfr0);
> +		debug("A007186: sfp_spfr0= %x\n", sfp_spfr0);
>  
> -	sel = (sfp_spfr0 >> FUSE_VAL_SHIFT) & FUSE_VAL_MASK;
> +		sel = (sfp_spfr0 >> FUSE_VAL_SHIFT) & FUSE_VAL_MASK;
>  
> -	if (sel == 0x01 || sel == 0x02) {

Can you put the checking of has_erratum_a007186() here? You may be able to avoid
the indentation change below.

York



More information about the U-Boot mailing list