diff options
| author | Wolfgang Denk <[email protected]> | 2010-03-28 00:15:20 +0100 |
|---|---|---|
| committer | Wolfgang Denk <[email protected]> | 2010-03-28 00:15:20 +0100 |
| commit | cc3074c322bd8023cbebe475e4e4e413b1c06da3 (patch) | |
| tree | df6040da7d90147f46edf8a82b667b802f549cd9 /drivers | |
| parent | 04387d24a17b1ee13024dd4779da4b84d47c65cc (diff) | |
| parent | 4284f36a3e7d534b533ce733e088f226c3eda733 (diff) | |
Merge branch 'master' of /home/wd/git/u-boot/custodians
Diffstat (limited to 'drivers')
| -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 fdba297c88b..cd1a86ebad2 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 */ |
