int flash_erase (flash_info_t *info, int s_first, int s_last)
{
- int flag, prot, sect;
+ int prot, sect;
ulong type, start, last;
int rcode = 0;
int cflag, iflag;
*/
cflag = icache_status ();
icache_disable ();
- iflag = disable_interrupts ();
-
/* Disable interrupts which might cause a timeout here */
-/* flag = disable_interrupts (); */
+ iflag = disable_interrupts ();
/* Start erase on unprotected sectors */
for (sect = s_first; sect <= s_last; sect++) {
}
}
- *addr = INTEL_CLEAR; /* clear status register cmd. */
- *addr = INTEL_RESET; /* resest to read mode */
+ *addr = (FPWV)INTEL_CLEAR; /* clear status register cmd. */
+ *addr = (FPWV)INTEL_RESET; /* resest to read mode */
printf (" done\n");
}
FPWV *addr = (FPWV *) dest;
ulong status;
int cflag, iflag;
- int flag;
/* Check if Flash is (sufficiently) erased */
if ((*addr & data) != data) {
*/
cflag = icache_status ();
icache_disable ();
- iflag = disable_interrupts ();
-
/* Disable interrupts which might cause a timeout here */
- /*flag = disable_interrupts (); */
+ iflag = disable_interrupts ();
*addr = (FPW) INTEL_PROG; /* write setup */
*addr = data;