diff options
author | Angelo Dureghello <angelo@kernel-space.org> | 2023-03-15 00:43:07 +0100 |
---|---|---|
committer | Angelo Dureghello <angelo@kernel-space.org> | 2023-03-15 01:52:15 +0100 |
commit | 791840fdc41d7e937158a6ac56e9316391fde7ab (patch) | |
tree | 8d34f046c9b8921b354eeb3134b9f1570f4cd5cb | |
parent | ec4322e70ba74f6ab81a73558cff88d6a51e785d (diff) | |
download | u-boot-791840fdc41d7e937158a6ac56e9316391fde7ab.zip u-boot-791840fdc41d7e937158a6ac56e9316391fde7ab.tar.gz u-boot-791840fdc41d7e937158a6ac56e9316391fde7ab.tar.bz2 |
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>
-rw-r--r-- | board/freescale/m5253demo/flash.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c index fbd4835..eeb9cfd 100644 --- a/board/freescale/m5253demo/flash.c +++ b/board/freescale/m5253demo/flash.c @@ -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) { |