Skip to contentSkip to conversation

ARM: at91: sam9g45: shutdown ddr1 too when rebooting

PATCH Superseded Jean-Christophe PLAGNIOL-VILLARD 2 participants 3 messages Aug 22, 2013

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: at91: sam9g45: shutdown ddr1 too when rebooting

as on ddr0 we need to cleanly shutdown ddr1 if used before rebootinh

---
 arch/arm/mach-at91/at91sam9g45_reset.S | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-at91/at91sam9g45_reset.S +4 -0
index 721a1a3..3fd634d 100644
@@ -21,6 +21,8 @@
 at91sam9g45_restart:
 			ldr	r5, =at91_ramc_base		@ preload constants
 			ldr	r0, [r5]
+			add	r5, #4				@ ddr1
+			ldr	r5, [r5]
 			ldr	r4, =at91_rstc_base
 			ldr	r1, [r4]
 
@@ -30,6 +32,8 @@ at91sam9g45_restart:
 
 			.balign	32				@ align to cache line
 
+			str	r2, [r5, #AT91_DDRSDRC_RTR]	@ disable DDR1 access
+			str	r3, [r5, #AT91_DDRSDRC_LPR]	@ power down DDR1
 			str	r2, [r0, #AT91_DDRSDRC_RTR]	@ disable DDR0 access
 			str	r3, [r0, #AT91_DDRSDRC_LPR]	@ power down DDR0
 			str	r4, [r1, #AT91_RSTC_CR]		@ reset processor
Signature · 1 line
1.8.4.rc1
#1 lore raw

PATCH 1/1 ARM: at91: sam9g45: shutdown ddr1 too when rebooting

arch/arm/mach-at91/at91sam9g45_reset.S line 25

Quoted 10 lines · Jean-Christophe PLAGNIOL-VILLARD
arch/arm/mach-at91/at91sam9g45_reset.S +2 -0
index 721a1a3..3fd634d 100644
@@ -21,6 +21,8 @@
 at91sam9g45_restart:
 			ldr	r5, =at91_ramc_base		@ preload constants
 			ldr	r0, [r5]
+			add	r5, #4				@ ddr1
+			ldr	r5, [r5]

I know this isn't critical code, but is there any reason why you can't use:

			ldr	r5, [r5, #4]

here?

#2 lore raw

PATCH 1/1 ARM: at91: sam9g45: shutdown ddr1 too when rebooting

Quoted 15 lines · Russell King - ARM Linux

arch/arm/mach-at91/at91sam9g45_reset.S line 25

Quoted 10 lines · Jean-Christophe PLAGNIOL-VILLARD
arch/arm/mach-at91/at91sam9g45_reset.S +2 -0
index 721a1a3..3fd634d 100644
@@ -21,6 +21,8 @@
 at91sam9g45_restart:
 			ldr	r5, =at91_ramc_base		@ preload constants
 			ldr	r0, [r5]
+			add	r5, #4				@ ddr1
+			ldr	r5, [r5]

I know this isn't critical code, but is there any reason why you can't use:

Quoted 3 lines
			ldr	r5, [r5, #4]

here?

none I just forget we can do this too

Best Regards,
J.