mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
mtd: msm_qpic_nand: Use logical unit count in flash density
In an ONFI compliant devices, the flash parameters are calculated by reading the onfi parameter page of the device. Existing flash density is calculated based on a single logical unit(LUN). This shows wrong density information on Multi LUN flashes. So, always use number of LUNS value in flash density calculations. Change-Id: Idba4d4e129e7fdcdab1e509bd8c3149f26fc11f2 Signed-off-by: Pradeep P V K <ppvk@codeaurora.org>
This commit is contained in:
parent
fa43b983dd
commit
3fb0bdab95
1 changed files with 3 additions and 2 deletions
|
|
@ -781,8 +781,9 @@ static int msm_nand_flash_onfi_probe(struct msm_nand_info *info)
|
|||
flash->blksize = onfi_param_page_ptr->number_of_pages_per_block *
|
||||
flash->pagesize;
|
||||
flash->oobsize = onfi_param_page_ptr->number_of_spare_bytes_per_page;
|
||||
flash->density = onfi_param_page_ptr->number_of_blocks_per_logical_unit
|
||||
* flash->blksize;
|
||||
flash->density = onfi_param_page_ptr->number_of_logical_units *
|
||||
onfi_param_page_ptr->number_of_blocks_per_logical_unit *
|
||||
flash->blksize;
|
||||
flash->ecc_correctability =
|
||||
onfi_param_page_ptr->number_of_bits_ecc_correctability;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue