summaryrefslogtreecommitdiff
path: root/target/linux/at91-2.6/image/romboot/patches/005-erase-flash.patch
blob: b0ddfe3adcd87b9ab69df0d29e97989e126aa970 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- romboot.old/main.cpp	2007-04-05 15:51:51.000000000 +0200
+++ romboot/main.cpp	2007-04-10 10:33:10.000000000 +0200
@@ -34,7 +34,7 @@
 #define DELAY_MAIN_FREQ	1000
 #define DISP_LINE_LEN 16
 
-#define COMPACT 1
+//#define COMPACT 1
 
 //* prototypes
 extern void AT91F_DBGU_Printk(char *);
@@ -65,6 +65,7 @@
 	"3: Copy SD-Card\n\r"
   "4: Start U-BOOT\n\r"
   "5: Clear bootloder\n\r"
+	"6: Erase entire flash\n\r"
 };
 
 //* Globales variables 
@@ -555,6 +556,17 @@
       		command = 0;
       		break;
 	    
+    		case '6':
+      		{
+					int *i;
+	
+					for(i = (int *)0x20000000; i < (int *)0x20840000; i++)
+	  				*i = 0;
+      		}
+      		write_dataflash(0xc0000000, 0x20000000, 0x840000);
+      		command = 0;
+      		break;
+	    
 				default:
       		command = 0;
       		break;