Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"
PATCH 1/1 Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"
From: Biwen Li <[email protected]>
This reverts commit 2a5d5d27edfbdb0e02a7fcf05569f92c02ae44ee. After applied this patch, failed to boot to uboot(hang in ddr init) on P3041DS, P4080DS and so on.
--- drivers/ddr/fsl/mpc85xx_ddr_gen3.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/ddr/fsl/mpc85xx_ddr_gen3.c +7 -6
@@ -370,8 +370,6 @@ step2:debug ("Setting DEBUG_3[21] to 0x%08x\n" ,in_be32 (&ddr->debug[2 ]));#endif /* part 1 of the workaound */ -/* Always start in self-refresh, clear after MEM_EN */ -setbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR );/* * 500 painful micro-seconds must elapse between
@@ -384,6 +382,8 @@ step2:#ifdef CONFIG_DEEP_SLEEP if (is_warm_boot ()) { +/* enter self-refresh */ +setbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR );/* do board specific memory setup */ board_mem_sleep_setup (); temp_sdram_cfg = (in_be32 (&ddr->sdram_cfg) |SDRAM_CFG_BI );
@@ -395,10 +395,6 @@ step2:out_be32 (&ddr->sdram_cfg, temp_sdram_cfg |SDRAM_CFG_MEM_EN ); asmvolatile ("sync;isync" ); -/* Exit self-refresh after DDR conf as some ddr memories can fail. */ -clrbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR ); - asmvolatile ("sync;isync" ); - total_gb_size_per_controller =0 ;for (i =0 ; i <CONFIG_CHIP_SELECTS_PER_CTRL ; i++) {if (!(regs->cs[i].config &0x80000000 ))
@@ -548,4 +544,9 @@ step2: clrbits_be32(&ddr->sdram_cfg, 0x2); }#endif /* CONFIG_SYS_FSL_ERRATUM_DDR111_DDR134 */ +#ifdef CONFIG_DEEP_SLEEP +if (is_warm_boot ()) +/* exit self-refresh */ +clrbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR ); +#endif }
Signature · 1 line
2.17.1
PATCH 1/1 Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"
On Thu, 2020-04-09 at 20:44 +0800, Biwen Li wrote:
This revert will bring back another bug, can you try finding out why it does work? May there are some minor tweaks needed ?
Jocke
Quoted 56 lines
From: Biwen Li <[email protected]>
This reverts commit
2a5d5d27edfbdb0e02a7fcf05569f92c02ae44ee. After applied this patch, failed to boot to uboot(hang in ddr init) on P3041DS, P4080DS and so on.--- drivers/ddr/fsl/mpc85xx_ddr_gen3.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)drivers/ddr/fsl/mpc85xx_ddr_gen3.c +7
-7@@ -370,8 +370,6 @@ step2:debug ("Setting DEBUG_3[21] to 0x%08x\n" ,in_be32 (&ddr->debug[2 ]));#endif /* part 1 of the workaound */ -/* Always start in self-refresh, clear after MEM_EN */ -setbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR );/* * 500 painful micro-seconds must elapse between @@ -384,6 +382,8 @@ step2:#ifdef CONFIG_DEEP_SLEEP if (is_warm_boot ()) { +/* enter self-refresh */ +setbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR );/* do board specific memory setup */ board_mem_sleep_setup (); temp_sdram_cfg = (in_be32 (&ddr->sdram_cfg) |SDRAM_CFG_BI );@@ -395,10 +395,6 @@ step2:out_be32 (&ddr->sdram_cfg, temp_sdram_cfg |SDRAM_CFG_MEM_EN ); asmvolatile ("sync;isync" ); -/* Exit self-refresh after DDR conf as some ddr memories can fail. */ -clrbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR ); - asmvolatile ("sync;isync" ); - total_gb_size_per_controller =0 ;for (i =0 ; i <CONFIG_CHIP_SELECTS_PER_CTRL ; i++) {if (!(regs->cs[i].config &0x80000000 ))@@ -548,4 +544,9 @@ step2: clrbits_be32(&ddr->sdram_cfg, 0x2); }#endif /* CONFIG_SYS_FSL_ERRATUM_DDR111_DDR134 */ +#ifdef CONFIG_DEEP_SLEEP +if (is_warm_boot ()) +/* exit self-refresh */ +clrbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR ); +#endif } --2.17.1
PATCH 1/1 Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"
Quoted 10 lines
-----Original Message-----
From: Joakim Tjernlund <[email protected]>
Sent: Thursday, April 9, 2020 6:24 PM
To: Priyanka Jain <[email protected]>; Biwen Li (OSS) <[email protected]>
Cc: u-boot at lists.denx.de; Biwen Li <[email protected]>; Jiafei Pan <[email protected]>
Subject: Re: [PATCH] Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"
Quoted 7 lines
On Thu, 2020-04-09 at 20:44 +0800, Biwen Li wrote:
This revert will bring back another bug, can you try finding out why it does work?
May there are some minor tweaks needed ?Jocke
The patch has impacted boot to prompt on many powerpc boards.
I agree with you that we also need to have solution to the original problem reported by you. We are working on fixing of DDR errata workaround implementation issue that you reported.
But I need this workaround patch to be reverted now as a quick fix for v2020.04 release which is only few days away.
Thanks
Priyanka
Quoted 59 lines
Quoted 35 lines
From: Biwen Li <[email protected]>
This reverts commit
2a5d5d27edfbdb0e02a7fcf05569f92c02ae44ee. After applied this patch, failed to boot to uboot(hang in ddr init) on P3041DS, P4080DS and so on.--- drivers/ddr/fsl/mpc85xx_ddr_gen3.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)drivers/ddr/fsl/mpc85xx_ddr_gen3.c +0
-2@@ -370,8 +370,6 @@ step2:debug ("Setting DEBUG_3[21] to 0x%08x\n" ,in_be32 (&ddr->debug[2 ]));#endif /* part 1 of the workaound */ -/* Always start in self-refresh, clear after MEM_EN */ -setbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR );/* * 500 painful micro-seconds must elapse between @@ -384,6
+382,8 @@ step2:#ifdef CONFIG_DEEP_SLEEP if (is_warm_boot()) {drivers/ddr/fsl/mpc85xx_ddr_gen3.c +2
-0+/* enter self-refresh */ +setbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR );/* do board specific memory setup */ board_mem_sleep_setup (); temp_sdram_cfg = (in_be32(&ddr->sdram_cfg) |
SDRAM_CFG_BI); @@ -395,10 +395,6 @@ step2:Quoted 1 line
out_be32(&ddr->sdram_cfg, temp_sdram_cfg |
SDRAM_CFG_MEM_EN);Quoted 22 lines
asm volatile("sync;isync");drivers/ddr/fsl/mpc85xx_ddr_gen3.c +6
-5-/* Exit self-refresh after DDR conf as some ddr memories can fail. */ -clrbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR ); - asmvolatile ("sync;isync" ); - total_gb_size_per_controller =0 ;for (i =0 ; i <CONFIG_CHIP_SELECTS_PER_CTRL ; i++) { if (!(regs->cs[i].config & 0x80000000)) @@ -548,4 +544,9 @@ step2:clrbits_be32 (&ddr->sdram_cfg,0x2 ); }#endif /* CONFIG_SYS_FSL_ERRATUM_DDR111_DDR134 */ +#ifdef CONFIG_DEEP_SLEEP +if (is_warm_boot ()) +/* exit self-refresh */ +clrbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR ); +#endif } --2.17.1
PATCH 1/1 Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"
Quoted 13 lines · Priyanka Jain
Quoted 13 lines
-----Original Message-----
From: Joakim Tjernlund <[email protected]>
Sent: Thursday, April 9, 2020 6:24 PM
To: Priyanka Jain <[email protected]>; Biwen Li (OSS) <[email protected]>
Cc: u-boot at lists.denx.de; Biwen Li <[email protected]>; Jiafei Pan <[email protected]>
Subject: Re: [PATCH] Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"On Thu, 2020-04-09 at 20:44 +0800, Biwen Li wrote:
Quoted 8 lines
Quoted 5 lines
This revert will bring back another bug, can you try finding out why it does work?
May there are some minor tweaks needed ?Jocke
The patch has impacted boot to prompt on many powerpc boards.
I agree with you that we also need to have solution to the original problem reported by you. We are working on fixing of DDR errata workaround implementation issue that you reported.
Is anyone working on the eSPI driver as well? I recall someone at NXP volunteered but cannot recall who.
Quoted 2 lines
But I need this workaround patch to be reverted now as a quick fix for v2020.04 release which is only few days away.
I see
Jocke
Quoted 61 lines
Thanks
PriyankaQuoted 58 lines
Quoted 34 lines
From: Biwen Li <[email protected]>
This reverts commit
2a5d5d27edfbdb0e02a7fcf05569f92c02ae44ee. After applied this patch, failed to boot to uboot(hang in ddr init) on P3041DS, P4080DS and so on.--- drivers/ddr/fsl/mpc85xx_ddr_gen3.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)drivers/ddr/fsl/mpc85xx_ddr_gen3.c +0
-2@@ -370,8 +370,6 @@ step2:debug ("Setting DEBUG_3[21] to 0x%08x\n" ,in_be32 (&ddr->debug[2 ]));#endif /* part 1 of the workaound */ -/* Always start in self-refresh, clear after MEM_EN */ -setbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR );/* * 500 painful micro-seconds must elapse between @@ -384,6
+382,8 @@ step2:#ifdef CONFIG_DEEP_SLEEP if (is_warm_boot()) {drivers/ddr/fsl/mpc85xx_ddr_gen3.c +2
-0+/* enter self-refresh */ +setbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR );/* do board specific memory setup */ board_mem_sleep_setup (); temp_sdram_cfg = (in_be32(&ddr->sdram_cfg) |
SDRAM_CFG_BI); @@ -395,10 +395,6 @@ step2:Quoted 1 line
out_be32(&ddr->sdram_cfg, temp_sdram_cfg |
SDRAM_CFG_MEM_EN);Quoted 22 lines
asm volatile("sync;isync");drivers/ddr/fsl/mpc85xx_ddr_gen3.c +6
-5-/* Exit self-refresh after DDR conf as some ddr memories can fail. */ -clrbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR ); - asmvolatile ("sync;isync" ); - total_gb_size_per_controller =0 ;for (i =0 ; i <CONFIG_CHIP_SELECTS_PER_CTRL ; i++) { if (!(regs->cs[i].config & 0x80000000)) @@ -548,4 +544,9 @@ step2:clrbits_be32 (&ddr->sdram_cfg,0x2 ); }#endif /* CONFIG_SYS_FSL_ERRATUM_DDR111_DDR134 */ +#ifdef CONFIG_DEEP_SLEEP +if (is_warm_boot ()) +/* exit self-refresh */ +clrbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR ); +#endif } --2.17.1
PATCH 1/1 Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"
Quoted 29 lines
-----Original Message-----
From: Joakim Tjernlund <[email protected]>
Sent: Friday, April 10, 2020 5:21 PM
To: Priyanka Jain <[email protected]>; Biwen Li (OSS) <[email protected]>
Cc: u-boot at lists.denx.de; Biwen Li <[email protected]>; Jiafei Pan <[email protected]>
Subject: Re: [PATCH] Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"Quoted 18 lines · Priyanka Jain
Quoted 18 lines
-----Original Message-----
From: Joakim Tjernlund <[email protected]>
Sent: Thursday, April 9, 2020 6:24 PM
To: Priyanka Jain <[email protected]>; Biwen Li (OSS) <[email protected]>
Cc: u-boot at lists.denx.de; Biwen Li <[email protected]>; Jiafei Pan <[email protected]>
Subject: Re: [PATCH] Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"On Thu, 2020-04-09 at 20:44 +0800, Biwen Li wrote:
This revert will bring back another bug, can you try finding out why it does work?
May there are some minor tweaks needed ?Jocke
Quoted 9 lines
Quoted 2 lines
The patch has impacted boot to prompt on many powerpc boards.
I agree with you that we also need to have solution to the original problemreported by you.
Quoted 1 line
We are working on fixing of DDR errata workaround implementation issue
that you reported.
Is anyone working on the eSPI driver as well? I recall someone at NXP volunteered but cannot recall who.
Yes, "Xiaowei Bao" is working on that.
The older version is in-review on maillist. He is working on rebasing to top of tree Priyanka
Quoted 70 lines
Quoted 2 lines
But I need this workaround patch to be reverted now as a quick fix for
v2020.04 release which is only few days away.
I see
Jocke
Quoted 62 lines
Thanks
PriyankaQuoted 59 lines
Quoted 35 lines
From: Biwen Li <[email protected]>
This reverts commit
2a5d5d27edfbdb0e02a7fcf05569f92c02ae44ee. After applied this patch, failed to boot to uboot(hang in ddr init) on P3041DS, P4080DS and so on.--- drivers/ddr/fsl/mpc85xx_ddr_gen3.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)drivers/ddr/fsl/mpc85xx_ddr_gen3.c +0
-2@@ -370,8 +370,6 @@ step2:debug ("Setting DEBUG_3[21] to 0x%08x\n" ,in_be32 (&ddr->debug[2 ]));#endif /* part 1 of the workaound */ -/* Always start in self-refresh, clear after MEM_EN */ -setbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR );/* * 500 painful micro-seconds must elapse between @@ -384,6
+382,8 @@ step2:#ifdef CONFIG_DEEP_SLEEP if (is_warm_boot()) {drivers/ddr/fsl/mpc85xx_ddr_gen3.c +3
-0+/* enter self-refresh */ +setbits_be32 (&ddr->sdram_cfg_2, +SDRAM_CFG2_FRC_SR );/* do board specific memory setup */ board_mem_sleep_setup (); temp_sdram_cfg = (in_be32(&ddr->sdram_cfg) |
SDRAM_CFG_BI); @@ -395,10 +395,6 @@ step2:Quoted 1 line
out_be32(&ddr->sdram_cfg, temp_sdram_cfg |
SDRAM_CFG_MEM_EN);Quoted 22 lines
asm volatile("sync;isync");drivers/ddr/fsl/mpc85xx_ddr_gen3.c +6
-5-/* Exit self-refresh after DDR conf as some ddr memories can fail. */ -clrbits_be32 (&ddr->sdram_cfg_2,SDRAM_CFG2_FRC_SR ); - asmvolatile ("sync;isync" ); - total_gb_size_per_controller =0 ;for (i =0 ; i <CONFIG_CHIP_SELECTS_PER_CTRL ; i++) { if (!(regs->cs[i].config & 0x80000000)) @@ -548,4 +544,9 @@ step2:clrbits_be32 (&ddr->sdram_cfg,0x2 ); }#endif /* CONFIG_SYS_FSL_ERRATUM_DDR111_DDR134 */ +#ifdef CONFIG_DEEP_SLEEP +if (is_warm_boot ()) +/* exit self-refresh */ +clrbits_be32 (&ddr->sdram_cfg_2, +SDRAM_CFG2_FRC_SR );#endif } --2.17.1
eSPI was: [PATCH] Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"
Quoted 35 lines · Priyanka Jain
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Quoted 32 lines
-----Original Message-----
From: Joakim Tjernlund <[email protected]>
Sent: Friday, April 10, 2020 5:21 PM
To: Priyanka Jain <[email protected]>; Biwen Li (OSS) <[email protected]>
Cc: u-boot at lists.denx.de; Biwen Li <[email protected]>; Jiafei Pan <[email protected]>
Subject: Re: [PATCH] Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"Quoted 12 lines · Priyanka Jain
Quoted 12 lines
-----Original Message-----
From: Joakim Tjernlund <[email protected]>
Sent: Thursday, April 9, 2020 6:24 PM
To: Priyanka Jain <[email protected]>; Biwen Li (OSS) <[email protected]>
Cc: u-boot at lists.denx.de; Biwen Li <[email protected]>; Jiafei Pan <[email protected]>
Subject: Re: [PATCH] Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"On Thu, 2020-04-09 at 20:44 +0800, Biwen Li wrote:
Quoted 7 lines
Quoted 5 lines
This revert will bring back another bug, can you try finding out why it does work?
May there are some minor tweaks needed ?Jocke
The patch has impacted boot to prompt on many powerpc boards.
I agree with you that we also need to have solution to the original problemreported by you.
Quoted 1 line
We are working on fixing of DDR errata workaround implementation issue
Quoted 8 lines
Quoted 5 lines
that you reported.
Is anyone working on the eSPI driver as well? I recall someone at NXP volunteered but cannot recall who.
Yes, "Xiaowei Bao" is working on that.
The older version is in-review on maillist. He is working on rebasing to top of tree Priyanka
Now upstream is removing the fsl_espi driver, what is the status?
Jocke
eSPI was: [PATCH] Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"
Quoted 46 lines · On Thu, 28 May, 2020, 00:41 Joakim Tjernlund, <[email protected]>…
Quoted 1 line · Priyanka Jain
CAUTION: This email originated from outside of the organization. Do not
click links or open attachments unless you recognize the sender and know the content is safe.
Quoted 23 lines
Quoted 23 lines
-----Original Message-----
From: Joakim Tjernlund <[email protected]>
Sent: Friday, April 10, 2020 5:21 PM
To: Priyanka Jain <[email protected]>; Biwen Li (OSS) <[email protected]>
Cc: u-boot at lists.denx.de; Biwen Li <[email protected]>; Jiafei Pan <[email protected]>
Subject: Re: [PATCH] Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"Quoted 10 lines · Priyanka Jain
Quoted 10 lines
-----Original Message-----
From: Joakim Tjernlund <[email protected]>
Sent: Thursday, April 9, 2020 6:24 PM
To: Priyanka Jain <[email protected]>; Biwen Li (OSS) <[email protected]>
Cc: u-boot at lists.denx.de; Biwen Li <[email protected]>; Jiafei Pan <[email protected]>
Subject: Re: [PATCH] Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Biwen Li
This revert will bring back another bug, can you try finding out
why
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
it does work?
May there are some minor tweaks needed ?Jocke
The patch has impacted boot to prompt on many powerpc boards. I agree with you that we also need to have solution to the original
problem
Quoted 2 lines
Quoted 2 lines
reported by you.
Quoted 1 line
We are working on fixing of DDR errata workaround implementation
issue
Quoted 5 lines
Quoted 5 lines
that you reported.
Is anyone working on the eSPI driver as well? I recall someone at NXP volunteered but cannot recall who.
Quoted 7 lines
Quoted 2 lines
Yes, "Xiaowei Bao" is working on that.
The older version is in-review on maillist. He is working on rebasing totop of tree
Quoted 1 line
Priyanka
Now upstream is removing the
fsl_espidriver, what is the status?
Fyi: It's not only a driver but also an associated board too.
Jagan.