public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] powerpc/mpc85xx: modify erratum A007186
Date: Fri, 26 Sep 2014 09:10:28 -0700	[thread overview]
Message-ID: <54258FF4.80801@freescale.com> (raw)
In-Reply-To: <1411706256-33037-1-git-send-email-B45475@freescale.com>

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@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

      parent reply	other threads:[~2014-09-26 16:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26  4:37 [U-Boot] [PATCH 1/2] powerpc/mpc85xx: modify erratum A007186 Zhao Qiang
2014-09-26  4:37 ` [U-Boot] [PATCH 2/2] powerpc/mpc85xx: modify erratum A007212 Zhao Qiang
2014-09-26  5:00   ` York Sun
2014-09-26  5:55     ` qiang.zhao at freescale.com
2014-09-26 16:02       ` York Sun
2014-09-28  1:56         ` qiang.zhao at freescale.com
2014-09-28  3:07           ` York Sun
2014-09-26 16:10 ` York Sun [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54258FF4.80801@freescale.com \
    --to=yorksun@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox