public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* Beagleboard rev C memory timings & suspend/resume
@ 2009-04-29 13:53 Jean Pihet
  2009-05-06 23:39 ` Paul Walmsley
  0 siblings, 1 reply; 32+ messages in thread
From: Jean Pihet @ 2009-04-29 13:53 UTC (permalink / raw)
  To: Paul Walmsley, linux-omap

Hi,

The suspend/resume on Beagleboard has some problem due to bad memory timings.
Suspending for more than 5 to 10 seconds shows memory corruption.

The new chips on rev Cx boards are using 2 DDR chip selects and it looks like 
the 2nd memory part is not correctly put into self refresh. As an 
experimentation I tried the same kernel with 'mem=128M' and it resumes 
correctly after 1 min in suspend.

I could not find the latest DDR detailed specs from Micron. The part number is 
MT29C2G48MAKLCJI-6 IT. Are those available? Is this part identical to 2 1Gb 
parts?

Now for the code in the kernel, there are some changes needed to support 2 
CS'es:
- the SDRC parameters need to be updated for the new memory part
- the SDRC parameters need to include the ACTIM_CTRL_A_0, ACTIM_CTRL_A_1, 
ACTIM_CTRL_B_0, ACTIM_CTRL_B_1, RFR_CTRL_0 and RFR_CTRL_1 registers. Since 
the parameters for the 2nd CS are the same, this can be avoided by writing 
the same values to the 2 sets of registers
- is there a need to differentiate between 1Gb and 2Gb chips, or can we just 
write the same params for both CS'es even if only one is being used?
- the 'configure_sdrc' function in arch/arm/mach-omap2/sram34xx.S needs to 
program the 2 sets of registers. Here is a patch excerpt below. This patch 
only does not help the suspend/resume though.

Any idea or suggestion?

Regards,
Jean

---
diff --git a/arch/arm/mach-omap2/sram34xx.S b/arch/arm/mach-omap2/sram34xx.S
index 487fa86..6d5843a 100644
--- a/arch/arm/mach-omap2/sram34xx.S
+++ b/arch/arm/mach-omap2/sram34xx.S
@@ -175,15 +175,24 @@ wait_dll_unlock:
        bne     wait_dll_unlock
        bx      lr
 configure_sdrc:
-       ldr     r11, omap3_sdrc_rfr_ctrl
+       ldr     r11, omap3_sdrc_rfr_ctrl_0
        str     r0, [r11]
-       ldr     r11, omap3_sdrc_actim_ctrla
+       ldr     r11, omap3_sdrc_rfr_ctrl_1
+       str     r0, [r11]
+       ldr     r11, omap3_sdrc_actim_ctrla_0
+       str     r1, [r11]
+       ldr     r11, omap3_sdrc_actim_ctrla_1
        str     r1, [r11]
-       ldr     r11, omap3_sdrc_actim_ctrlb
+       ldr     r11, omap3_sdrc_actim_ctrlb_0
+       str     r2, [r11]
+       ldr     r11, omap3_sdrc_actim_ctrlb_1
        str     r2, [r11]
        ldr     r11, omap3_sdrc_mr_0
        str     r6, [r11]
        ldr     r6, [r11]               @ posted-write barrier for SDRC
+       ldr     r11, omap3_sdrc_mr_1
+       str     r6, [r11]
+       ldr     r6, [r11]               @ posted-write barrier for SDRC
        bx      lr

 omap3_sdrc_power:
@@ -194,14 +203,22 @@ omap3_cm_idlest1_core:
        .word OMAP34XX_CM_REGADDR(CORE_MOD, CM_IDLEST)
 omap3_cm_iclken1_core:
        .word OMAP34XX_CM_REGADDR(CORE_MOD, CM_ICLKEN1)
-omap3_sdrc_rfr_ctrl:
+omap3_sdrc_rfr_ctrl_0:
        .word OMAP34XX_SDRC_REGADDR(SDRC_RFR_CTRL_0)
-omap3_sdrc_actim_ctrla:
+omap3_sdrc_rfr_ctrl_1:
+       .word OMAP34XX_SDRC_REGADDR(SDRC_RFR_CTRL_1)
+omap3_sdrc_actim_ctrla_0:
        .word OMAP34XX_SDRC_REGADDR(SDRC_ACTIM_CTRL_A_0)
-omap3_sdrc_actim_ctrlb:
+omap3_sdrc_actim_ctrla_1:
+       .word OMAP34XX_SDRC_REGADDR(SDRC_ACTIM_CTRL_A_1)
+omap3_sdrc_actim_ctrlb_0:
        .word OMAP34XX_SDRC_REGADDR(SDRC_ACTIM_CTRL_B_0)
+omap3_sdrc_actim_ctrlb_1:
+       .word OMAP34XX_SDRC_REGADDR(SDRC_ACTIM_CTRL_B_1)
 omap3_sdrc_mr_0:
        .word OMAP34XX_SDRC_REGADDR(SDRC_MR_0)
+omap3_sdrc_mr_1:
+       .word OMAP34XX_SDRC_REGADDR(SDRC_MR_1)
 omap3_sdrc_dlla_status:
        .word OMAP34XX_SDRC_REGADDR(SDRC_DLLA_STATUS)
 omap3_sdrc_dlla_ctrl:

^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2009-06-09  8:30 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-29 13:53 Beagleboard rev C memory timings & suspend/resume Jean Pihet
2009-05-06 23:39 ` Paul Walmsley
2009-05-07 11:18   ` Jean Pihet
2009-05-07 16:44     ` Jean Pihet
2009-05-07 18:59       ` Paul Walmsley
2009-05-08  7:05         ` Jean Pihet
2009-05-08 22:43           ` Paul Walmsley
2009-05-11 19:10             ` Jean Pihet
2009-05-11 20:27               ` Paul Walmsley
2009-05-26 13:27                 ` [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume) Jean Pihet
2009-06-02 23:40                   ` Paul Walmsley
2009-06-03  7:03                     ` Jean Pihet
2009-06-05 15:35                     ` Jean Pihet
2009-06-05 18:10                       ` Paul Walmsley
2009-06-08  7:37                         ` Tero.Kristo
2009-06-08  8:59                         ` Jean Pihet
2009-06-08 14:59                           ` Kevin Hilman
2009-06-08 17:08                             ` Jean Pihet
2009-06-08 17:23                               ` [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects Kevin Hilman
2009-06-09  8:14                                 ` Tero.Kristo
2009-06-09  8:23                                   ` Jean Pihet
2009-06-09  8:29                                     ` Tero.Kristo
2009-06-09  7:26                           ` [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume) Paul Walmsley
2009-06-05 19:14                       ` Paul Walmsley
2009-06-06 10:50                         ` Grazvydas Ignotas
2009-06-08  9:02                           ` Jean Pihet
2009-06-08 11:01                             ` Grazvydas Ignotas
2009-06-08 17:11                               ` Jean Pihet
2009-06-08 17:28                                 ` [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects Kevin Hilman
2009-05-07 19:18     ` Beagleboard rev C memory timings & suspend/resume Paul Walmsley
2009-05-08  8:13       ` Jean Pihet
2009-05-08 22:51         ` Paul Walmsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox