005-erase-flash.patch 804 B

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