diff mbox

[U-Boot,6/7] powerpc/mpc8xxx: Adding fallback to raw timing on supported boards

Message ID 1306452353-11611-6-git-send-email-yorksun@freescale.com
State Accepted
Delegated to: Kumar Gala
Headers show

Commit Message

York Sun May 26, 2011, 11:25 p.m. UTC
In case of empty SPD or checksum error, fallback to raw timing on
supported boards.

Signed-off-by: York Sun <yorksun@freescale.com>
---
 arch/powerpc/cpu/mpc8xxx/ddr/main.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

Comments

Kumar Gala June 3, 2011, 7:46 a.m. UTC | #1
On May 26, 2011, at 6:25 PM, York Sun wrote:

> In case of empty SPD or checksum error, fallback to raw timing on
> supported boards.
> 
> Signed-off-by: York Sun <yorksun@freescale.com>
> ---
> arch/powerpc/cpu/mpc8xxx/ddr/main.c |    8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/main.c b/arch/powerpc/cpu/mpc8xxx/ddr/main.c
> index db7cf11..2e43da6 100644
> --- a/arch/powerpc/cpu/mpc8xxx/ddr/main.c
> +++ b/arch/powerpc/cpu/mpc8xxx/ddr/main.c
> @@ -343,12 +343,20 @@ fsl_ddr_compute(fsl_ddr_info_t *pinfo, unsigned int start_step,
> 					&(pinfo->dimm_params[i][j]);
> 
> 				retval = compute_dimm_parameters(spd, pdimm, i);
> +#ifdef CONFIG_DDR_RAW_TIMING

Should this be CONFIG_SYS_DDR_RAW_TIMING??

We need this added to README at a minimum for what DDR_RAW_TIMING means.


> +				if (retval != 0) {
> +					printf("SPD error! Trying fallback to "
> +					"raw timing calculation\n");
> +					fsl_ddr_get_dimm_params(pdimm, i, j);
> +				}
> +#else
> 				if (retval == 2) {
> 					printf("Error: compute_dimm_parameters"
> 					" non-zero returned FATAL value "
> 					"for memctl=%u dimm=%u\n", i, j);
> 					return 0;
> 				}
> +#endif
> 				if (retval) {
> 					debug("Warning: compute_dimm_parameters"
> 					" non-zero return value for memctl=%u "
> -- 
> 1.7.0.4
> 
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
York Sun June 3, 2011, 8:10 a.m. UTC | #2
On Fri, 2011-06-03 at 02:46 -0500, Kumar Gala wrote:
> On May 26, 2011, at 6:25 PM, York Sun wrote:
> 
> > In case of empty SPD or checksum error, fallback to raw timing on
> > supported boards.
> > 
> > Signed-off-by: York Sun <yorksun@freescale.com>
> > ---
> > arch/powerpc/cpu/mpc8xxx/ddr/main.c |    8 ++++++++
> > 1 files changed, 8 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/main.c b/arch/powerpc/cpu/mpc8xxx/ddr/main.c
> > index db7cf11..2e43da6 100644
> > --- a/arch/powerpc/cpu/mpc8xxx/ddr/main.c
> > +++ b/arch/powerpc/cpu/mpc8xxx/ddr/main.c
> > @@ -343,12 +343,20 @@ fsl_ddr_compute(fsl_ddr_info_t *pinfo, unsigned int start_step,
> > 					&(pinfo->dimm_params[i][j]);
> > 
> > 				retval = compute_dimm_parameters(spd, pdimm, i);
> > +#ifdef CONFIG_DDR_RAW_TIMING
> 
> Should this be CONFIG_SYS_DDR_RAW_TIMING??
> 
> We need this added to README at a minimum for what DDR_RAW_TIMING means.
> 

Will do.

York
Kumar Gala June 3, 2011, 1:11 p.m. UTC | #3
On Jun 3, 2011, at 3:10 AM, York Sun wrote:

> On Fri, 2011-06-03 at 02:46 -0500, Kumar Gala wrote:
>> On May 26, 2011, at 6:25 PM, York Sun wrote:
>> 
>>> In case of empty SPD or checksum error, fallback to raw timing on
>>> supported boards.
>>> 
>>> Signed-off-by: York Sun <yorksun@freescale.com>
>>> ---
>>> arch/powerpc/cpu/mpc8xxx/ddr/main.c |    8 ++++++++
>>> 1 files changed, 8 insertions(+), 0 deletions(-)
>>> 
>>> diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/main.c b/arch/powerpc/cpu/mpc8xxx/ddr/main.c
>>> index db7cf11..2e43da6 100644
>>> --- a/arch/powerpc/cpu/mpc8xxx/ddr/main.c
>>> +++ b/arch/powerpc/cpu/mpc8xxx/ddr/main.c
>>> @@ -343,12 +343,20 @@ fsl_ddr_compute(fsl_ddr_info_t *pinfo, unsigned int start_step,
>>> 					&(pinfo->dimm_params[i][j]);
>>> 
>>> 				retval = compute_dimm_parameters(spd, pdimm, i);
>>> +#ifdef CONFIG_DDR_RAW_TIMING
>> 
>> Should this be CONFIG_SYS_DDR_RAW_TIMING??
>> 
>> We need this added to README at a minimum for what DDR_RAW_TIMING means.
>> 
> 
> Will do.
> 
> York

thanks.  Might be good to do it in patch 3/7.

Just repost 3/7, 6/7, 7/7 against 'next' branch of git://git.denx.de/u-boot-mpc85xx.git

- k
diff mbox

Patch

diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/main.c b/arch/powerpc/cpu/mpc8xxx/ddr/main.c
index db7cf11..2e43da6 100644
--- a/arch/powerpc/cpu/mpc8xxx/ddr/main.c
+++ b/arch/powerpc/cpu/mpc8xxx/ddr/main.c
@@ -343,12 +343,20 @@  fsl_ddr_compute(fsl_ddr_info_t *pinfo, unsigned int start_step,
 					&(pinfo->dimm_params[i][j]);
 
 				retval = compute_dimm_parameters(spd, pdimm, i);
+#ifdef CONFIG_DDR_RAW_TIMING
+				if (retval != 0) {
+					printf("SPD error! Trying fallback to "
+					"raw timing calculation\n");
+					fsl_ddr_get_dimm_params(pdimm, i, j);
+				}
+#else
 				if (retval == 2) {
 					printf("Error: compute_dimm_parameters"
 					" non-zero returned FATAL value "
 					"for memctl=%u dimm=%u\n", i, j);
 					return 0;
 				}
+#endif
 				if (retval) {
 					debug("Warning: compute_dimm_parameters"
 					" non-zero return value for memctl=%u "