diff options
author | Egbert Eich <eich@suse.com> | 2013-04-10 01:11:56 +0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-05-02 00:24:02 +0400 |
commit | 0472fbfd3250d1a33d3de78afdcbf24f78ac026b (patch) | |
tree | 1d5f822e2d95f800121368bba96a185ae6f7b0fb /common/usb_storage.c | |
parent | bc8d98713f10582f4e35b9208f1b967c6a9f9953 (diff) | |
download | u-boot-0472fbfd3250d1a33d3de78afdcbf24f78ac026b.tar.xz |
part/dev_desc: Add log2 of blocksize to block_dev_desc data struct
log2 of the device block size serves as the shift value used to calculate
the block number to read in file systems when implementing avaiable block
sizes.
It is needed quite often in file systems thus it is pre-calculated and
stored in the block device descriptor.
Signed-off-by: Egbert Eich <eich@suse.com>
Diffstat (limited to 'common/usb_storage.c')
-rw-r--r-- | common/usb_storage.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/usb_storage.c b/common/usb_storage.c index fb322b4015..c5db044165 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1430,6 +1430,7 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *ss, *capacity, *blksz); dev_desc->lba = *capacity; dev_desc->blksz = *blksz; + dev_desc->log2blksz = LOG2(dev_desc->blksz); dev_desc->type = perq; USB_STOR_PRINTF(" address %d\n", dev_desc->target); USB_STOR_PRINTF("partype: %d\n", dev_desc->part_type); |