diff mbox

[U-Boot] driver/ddr/fsl: Force enabling parity for A-009803

Message ID 1463731546-15232-1-git-send-email-Shengzhou.Liu@nxp.com
State Superseded
Headers show

Commit Message

Shengzhou Liu May 20, 2016, 8:05 a.m. UTC
Default address parity is disabled for DDR4 UDIMM for considing
performance, it needs to enable parity for A-009803 workaround.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
---
 drivers/ddr/fsl/options.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

York Sun May 20, 2016, 3:29 p.m. UTC | #1
On 05/20/2016 01:15 AM, Shengzhou Liu wrote:
> Default address parity is disabled for DDR4 UDIMM for considing
> performance, it needs to enable parity for A-009803 workaround.
> 
> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
> ---
>  drivers/ddr/fsl/options.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/ddr/fsl/options.c b/drivers/ddr/fsl/options.c
> index d0075ff..dcef0bb 100644
> --- a/drivers/ddr/fsl/options.c
> +++ b/drivers/ddr/fsl/options.c
> @@ -1016,6 +1016,9 @@ unsigned int populate_memctl_options(const common_timing_params_t *common_dimm,
>  		}
>  	}
>  
> +#ifdef CONFIG_SYS_FSL_ERRATUM_A009803
> +	popts->ap_en = 1;
> +#endif
>  	/*
>  	 * BSTTOPRE precharge interval
>  	 *
> 

Shengzhou,

It looks backward. You should detect if the condition is right before applying
the workaround, not by forcing the condition.

York
Shengzhou Liu May 23, 2016, 9:18 a.m. UTC | #2
> -----Original Message-----
> From: York Sun [mailto:york.sun@nxp.com]
> Sent: Friday, May 20, 2016 11:29 PM
> To: Shengzhou Liu <shengzhou.liu@nxp.com>; u-boot@lists.denx.de
> Subject: Re: [PATCH] driver/ddr/fsl: Force enabling parity for A-009803
> >
> 
> Shengzhou,
> 
> It looks backward. You should detect if the condition is right before
> applying the workaround, not by forcing the condition.
> 
> York

If ERRATUM_A009803 is defined, ap_en should always be enabled whatever user configures parity=on in hwconfig.
As ERRATUM_A009803 is enabled only in arch-fsl-layerscape/config.h for LS2 SoC, I don't think we need to check anything other.
What condition do you mean? 

-Shengzhou
York Sun May 23, 2016, 3:33 p.m. UTC | #3
On 05/23/2016 02:18 AM, Shengzhou Liu wrote:
>> -----Original Message-----
>> From: York Sun [mailto:york.sun@nxp.com]
>> Sent: Friday, May 20, 2016 11:29 PM
>> To: Shengzhou Liu <shengzhou.liu@nxp.com>; u-boot@lists.denx.de
>> Subject: Re: [PATCH] driver/ddr/fsl: Force enabling parity for A-009803
>>>
>>
>> Shengzhou,
>>
>> It looks backward. You should detect if the condition is right before
>> applying the workaround, not by forcing the condition.
>>
>> York
> 
> If ERRATUM_A009803 is defined, ap_en should always be enabled whatever user configures parity=on in hwconfig.
> As ERRATUM_A009803 is enabled only in arch-fsl-layerscape/config.h for LS2 SoC, I don't think we need to check anything other.
> What condition do you mean? 
> 

Shengzhou,

My point is you should force ap=1. Do you mean if ERRATUM_A009803 is enabled,
users are forced to use address parity? That doesn't sound right. We have been
running UDIMM without address parity for a long time.

York
Shengzhou Liu May 24, 2016, 5:15 a.m. UTC | #4
> -----Original Message-----
> From: York Sun [mailto:york.sun@nxp.com]
> Sent: Monday, May 23, 2016 11:33 PM
> To: Shengzhou Liu <shengzhou.liu@nxp.com>; u-boot@lists.denx.de
> Subject: Re: [PATCH] driver/ddr/fsl: Force enabling parity for A-009803
> Shengzhou,
> 
> My point is you should force ap=1. Do you mean if ERRATUM_A009803 is
> enabled, users are forced to use address parity? That doesn't sound right.
> We have been running UDIMM without address parity for a long time.
> 
> York
> 
York,
My understanding is that ERRATUM_A009803 may still happen whatever ap_en is enabled or disabled. 
To apply the workaround of A009803, it requires ap_en is enabled. Is your understanding that if we
disable ap_en, ERRATUM_A009803 will never happen?  The CE document doesn't explain clearly this.
In last mail, did you mean we should force ap_en = 0 in case of A-009803?

Shengzhou
York Sun May 24, 2016, 4:13 p.m. UTC | #5
On 05/23/2016 10:15 PM, Shengzhou Liu wrote:
> 
>> -----Original Message-----
>> From: York Sun [mailto:york.sun@nxp.com]
>> Sent: Monday, May 23, 2016 11:33 PM
>> To: Shengzhou Liu <shengzhou.liu@nxp.com>; u-boot@lists.denx.de
>> Subject: Re: [PATCH] driver/ddr/fsl: Force enabling parity for A-009803
>> Shengzhou,
>>
>> My point is you should force ap=1. Do you mean if ERRATUM_A009803 is
>> enabled, users are forced to use address parity? That doesn't sound right.
>> We have been running UDIMM without address parity for a long time.
>>
>> York
>>
> York,
> My understanding is that ERRATUM_A009803 may still happen whatever ap_en is enabled or disabled. 
> To apply the workaround of A009803, it requires ap_en is enabled. Is your understanding that if we
> disable ap_en, ERRATUM_A009803 will never happen?  The CE document doesn't explain clearly this.
> In last mail, did you mean we should force ap_en = 0 in case of A-009803?
> 

Sorry I had a typo. I meant you should NOT force ap=1. Let me explain.
The erratum tells you _if_ address parity is used, for either UDIMM or RDIMM,
you need to implement the workaround, as step 1, 2, 3, ... We understand users
don't have a choice for RDIMM, the address parity is always enabled. But for
UDIMM, users can choose not to enable it. Your _this_ patch forces the address
parity to be true, regardless of user's choice. I think this is wrong.

The erratum always applies to affected SoCs, but the address parity is not
always enabled. That's what I meant for "condition".

York
diff mbox

Patch

diff --git a/drivers/ddr/fsl/options.c b/drivers/ddr/fsl/options.c
index d0075ff..dcef0bb 100644
--- a/drivers/ddr/fsl/options.c
+++ b/drivers/ddr/fsl/options.c
@@ -1016,6 +1016,9 @@  unsigned int populate_memctl_options(const common_timing_params_t *common_dimm,
 		}
 	}
 
+#ifdef CONFIG_SYS_FSL_ERRATUM_A009803
+	popts->ap_en = 1;
+#endif
 	/*
 	 * BSTTOPRE precharge interval
 	 *