summaryrefslogtreecommitdiff
path: root/multitech/recipes/linux/linux-2.6.39-at91/mtocgd3/linux-2.6.39.4-at91sam9x5-extreset.patch
blob: 31b7441aa2df53ba2675258e71c7b8cde6b3c48f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Index: linux-2.6.39.4/arch/arm/mach-at91/at91sam9x5.c
===================================================================
--- linux-2.6.39.4.orig/arch/arm/mach-at91/at91sam9x5.c	2012-06-25 17:00:27.060489533 -0500
+++ linux-2.6.39.4/arch/arm/mach-at91/at91sam9x5.c	2012-06-25 17:00:33.051404086 -0500
@@ -330,7 +330,10 @@
 
 static void at91sam9x5_reset(void)
 {
-	at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
+	// MTR: generate an external reset (assert the NRST pin) on soft reset
+	// set reset duration to 125 ms --> set ERSTL to 0xb (0xb = 11 = 2^12 slow clock cycles = 4096 clocks = 125 ms)
+	at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY | (0xb << 8));
+	at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST | AT91_RSTC_EXTRST);
 }
 
 static void at91sam9x5_poweroff(void)