diff mbox

[U-Boot] arm: mvebu: increase delay after setting ddr3 training patterns

Message ID 1436951539-9268-1-git-send-email-anton.schubert@gmx.de
State Rejected
Delegated to: Stefan Roese
Headers show

Commit Message

Anton Schubert July 15, 2015, 9:12 a.m. UTC
The mv78260 needs atleast 10ms after setting the ddr3 training patterns
or else the cpu will hang.

This patch increases said delay to 20ms just to be safe.

Signed-off-by: Anton Schubert <anton.schubert@gmx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr> 
---
 drivers/ddr/mvebu/ddr3_hw_training.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Roese July 15, 2015, 1:36 p.m. UTC | #1
Hi Anton,

On 15.07.2015 11:12, Anton Schubert wrote:
> The mv78260 needs atleast 10ms after setting the ddr3 training patterns

s/atleast/at least

> or else the cpu will hang.

Is this documented somewhere? Or just a value from your experiments / tests?

> This patch increases said delay to 20ms just to be safe.
>
> Signed-off-by: Anton Schubert <anton.schubert@gmx.de>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Luka Perkov <luka.perkov@sartura.hr>

In general I'm fine with this patch. But I noticed that this patch 
breaks booting on my AXP board. I then remembered another issue I has 
with timer functions in SPL on MVEBU (A38x). The timer functionality is 
not enabled at all at this early boot time. I'll send another patch 
shortly. Please give it a try and let me know if this works. And if you 
still need this delay increasing patch here.

Thank,
Stefan
Anton Schubert July 15, 2015, 2:47 p.m. UTC | #2
Hi Stefan,

Your timer patch fixes the booting problems for me so this delay isn't
necessary anymore.

Thanks,
Anton
Luka Perkov July 15, 2015, 2:56 p.m. UTC | #3
Hi Anton, hi Stefan,

On Wed, Jul 15, 2015 at 04:47:55PM +0200, Anton Schubert wrote:
> Hi Stefan,
> 
> Your timer patch fixes the booting problems for me so this delay isn't
> necessary anymore.

I've pushed the two patches from you guys to marvell/master:

http://git.denx.de/?p=u-boot/u-boot-marvell.git;a=summary

I'll leave them there for some time before sending pull request.

Luka
Anton Schubert July 15, 2015, 3 p.m. UTC | #4
Hi Luka,

My Patch isn't necessary anymore and as Stefan said potentially breaking on
other chip versions.

Anton
Stefan Roese July 15, 2015, 3 p.m. UTC | #5
Hi Luka,

On 15.07.2015 16:56, Luka Perkov wrote:
> On Wed, Jul 15, 2015 at 04:47:55PM +0200, Anton Schubert wrote:
>> Hi Stefan,
>>
>> Your timer patch fixes the booting problems for me so this delay isn't
>> necessary anymore.
>
> I've pushed the two patches from you guys to marvell/master:
>
> http://git.denx.de/?p=u-boot/u-boot-marvell.git;a=summary
>
> I'll leave them there for some time before sending pull request.

Thanks.

Could you please add the A38x SPL patch series (with the SERDES/PHY and 
DDR setup) as well now that the merge window has opened? Just let me 
know if it does not apply clean any more. I'll respin the patchset then.

Thanks,
Stefan
Luka Perkov July 15, 2015, 3:04 p.m. UTC | #6
Hi Anton,

On Wed, Jul 15, 2015 at 05:00:21PM +0200, Anton Schubert wrote:
> My Patch isn't necessary anymore and as Stefan said potentially breaking on
> other chip versions.

I think everything is merged correctly as was intended. Please check.

Luka
Anton Schubert July 15, 2015, 3:10 p.m. UTC | #7
Hi Luka

2015-07-15 17:04 GMT+02:00 Luka Perkov <luka.perkov@sartura.hr>:

> I think everything is merged correctly as was intended. Please check.
>

Is correct.

Thanks, Anton
Luka Perkov July 18, 2015, 8:27 a.m. UTC | #8
Hi Stefan,

On Wed, Jul 15, 2015 at 05:00:44PM +0200, Stefan Roese wrote:
> >>Your timer patch fixes the booting problems for me so this delay isn't
> >>necessary anymore.
> >
> >I've pushed the two patches from you guys to marvell/master:
> >
> >http://git.denx.de/?p=u-boot/u-boot-marvell.git;a=summary
> >
> >I'll leave them there for some time before sending pull request.
> 
> Thanks.
> 
> Could you please add the A38x SPL patch series (with the SERDES/PHY and DDR
> setup) as well now that the merge window has opened? Just let me know if it
> does not apply clean any more. I'll respin the patchset then.

Can you please respin the patchset? Thanks!

Luka
diff mbox

Patch

diff --git a/drivers/ddr/mvebu/ddr3_hw_training.c b/drivers/ddr/mvebu/ddr3_hw_training.c
index a8c5e6a..c9c9272 100644
--- a/drivers/ddr/mvebu/ddr3_hw_training.c
+++ b/drivers/ddr/mvebu/ddr3_hw_training.c
@@ -674,7 +674,7 @@  int ddr3_load_patterns(MV_DRAM_INFO *dram_info, int resume)
 
 	reg_write(REG_DRAM_TRAINING_ADDR, reg);
 
-	udelay(100);
+	mdelay(20);
 
 	/* Check if Successful */
 	if (reg_read(REG_DRAM_TRAINING_ADDR) &