Convert CONFIG_SYS_FLASH_ERASE_TOUT et al to Kconfig
[platform/kernel/u-boot.git] / board / cobra5272 / flash.c
index 5860cd0..5d15ed4 100644 (file)
@@ -10,6 +10,7 @@
 #include <flash.h>
 #include <irq_func.h>
 #include <uuid.h>
+#include <linux/delay.h>
 
 #define PHYS_FLASH_1 CONFIG_SYS_FLASH_BASE
 #define FLASH_BANK_SIZE 0x200000
@@ -199,8 +200,8 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
                        do {
                                result = *addr;
 
-                               /* check timeout */
-                               if (get_timer(start) > CONFIG_SYS_FLASH_ERASE_TOUT) {
+                               /* check timeout, 1000ms */
+                               if (get_timer(start) > 1000) {
                                        MEM_FLASH_ADDR1 = CMD_READ_ARRAY;
                                        chip1 = TMO;
                                        break;
@@ -235,7 +236,7 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
 
       outahere:
        /* allow flash to settle - wait 10 ms */
-       udelay (10000);
+       mdelay(10);
 
        if (iflag)
                enable_interrupts();
@@ -288,8 +289,8 @@ static int write_word(flash_info_t *info, ulong dest, ulong data)
        do {
                result = *addr;
 
-               /* check timeout */
-               if (get_timer(start) > CONFIG_SYS_FLASH_ERASE_TOUT) {
+               /* check timeout, 1000ms */
+               if (get_timer(start) > 1000) {
                        chip1 = ERR | TMO;
                        break;
                }