mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-16 05:58:49 +00:00
board: m5253demo: remove floating point flash size calculation
This board is using floating point arithmetic to display the SST39VF6401B flash size. This actually generates errors with toolchains without appropriate sw fp math functions available. SST39VF6401B is the only flash for wich the size is displayed, it's size is 8192KB and floating point calculation seems not needed. Removing it. Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
This commit is contained in:
parent
ec4322e70b
commit
791840fdc4
1 changed files with 2 additions and 18 deletions
|
@ -96,24 +96,8 @@ void flash_print_info(flash_info_t * info)
|
|||
return;
|
||||
}
|
||||
|
||||
if (info->size > 0x100000) {
|
||||
int remainder;
|
||||
|
||||
printf(" Size: %ld", info->size >> 20);
|
||||
|
||||
remainder = (info->size % 0x100000);
|
||||
if (remainder) {
|
||||
remainder >>= 10;
|
||||
remainder = (int)((float)
|
||||
(((float)remainder / (float)1024) *
|
||||
10000));
|
||||
printf(".%d ", remainder);
|
||||
}
|
||||
|
||||
printf("MB in %d Sectors\n", info->sector_count);
|
||||
} else
|
||||
printf(" Size: %ld KB in %d Sectors\n",
|
||||
info->size >> 10, info->sector_count);
|
||||
printf(" Size: %ld KB in %d Sectors\n",
|
||||
info->size >> 10, info->sector_count);
|
||||
|
||||
printf(" Sector Start Addresses:");
|
||||
for (i = 0; i < info->sector_count; ++i) {
|
||||
|
|
Loading…
Add table
Reference in a new issue