diff options
author | Wolfgang Denk | 2010-03-29 12:33:43 +0200 |
---|---|---|
committer | Wolfgang Denk | 2010-03-29 12:33:43 +0200 |
commit | 0020db3f0da61f3e2c8a459a87598e07594dc8ac (patch) | |
tree | 2fe0852444f2412149130186bc740914f4ba794f /drivers/mtd/cfi_flash.c | |
parent | 0d41ad7edcd23b6f23a1cf4e07b2d773493306fd (diff) | |
parent | 2883cc2d48e99fd1873ef8af03fee7966611b735 (diff) |
Merge remote branch 'origin/master' into next
Diffstat (limited to 'drivers/mtd/cfi_flash.c')
-rw-r--r-- | drivers/mtd/cfi_flash.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 15a4220d4f3..d0240f55d49 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -537,7 +537,10 @@ static int flash_status_check (flash_info_t * info, flash_sect_t sector, ulong start; #if CONFIG_SYS_HZ != 1000 - tout *= CONFIG_SYS_HZ/1000; + if ((ulong)CONFIG_SYS_HZ > 100000) + tout *= (ulong)CONFIG_SYS_HZ / 1000; /* for a big HZ, avoid overflow */ + else + tout = DIV_ROUND_UP(tout * (ulong)CONFIG_SYS_HZ, 1000); #endif /* Wait for command completion */ |