- any = 1;
- }
- }
-
- /* Now just wait for 0xff & provide some user feedback while
- * we wait.
- */
- if (any) {
- addr2 = (CFG_FLASH_WORD_SIZE *) (info->start[sect]);
- start = get_timer (0);
- while (*addr2 != 0xff) {
- udelay (1000 * 1000);
- putc ('.');
- if (get_timer (start) > CFG_FLASH_ERASE_TOUT) {
- printf ("timeout\n");
- return 1;
+ /* Now just wait for 0xff & provide some user
+ * feedback while we wait. Here we have to grant
+ * timer interrupts. Otherwise get_timer() can't
+ * work right. */
+ ipri(oldpri);
+ start = get_timer (0);
+ while (*addr2 != 0xff) {
+ udelay (1000 * 1000);
+ putc ('.');
+ if (get_timer (start) > CONFIG_SYS_FLASH_ERASE_TOUT) {
+ printf ("timeout\n");
+ return 1;
+ }