mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
mtd: nand: qcom: fix ubi mount error for non ONFI nand devices
Following error is coming during UBI mount for non ONFI nand device since mtd->writebufsize is coming as zero ubi0: attaching mtd2 UBI init error 22 The mtd->writebufsize is being assigned currently for ONFI devices only so move this assigment to common place. Change-Id: Idd22800dd65035952c1afd07ba375a28ffcf76ad Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
This commit is contained in:
parent
2be258bb00
commit
a7ab5a19c2
1 changed files with 1 additions and 1 deletions
|
|
@ -612,7 +612,6 @@ qpic_nand_onfi_save_params(struct mtd_info *mtd,
|
|||
|
||||
dev->page_size = param_page->data_per_pg;
|
||||
mtd->writesize = dev->page_size;
|
||||
mtd->writebufsize = mtd->writesize;
|
||||
dev->block_size = param_page->pgs_per_blk * (dev->page_size);
|
||||
mtd->erasesize = dev->block_size;
|
||||
dev->num_blocks = param_page->blks_per_LUN;
|
||||
|
|
@ -703,6 +702,7 @@ qpic_nand_save_config(struct mtd_info *mtd)
|
|||
mtd->oobavail = (DATA_BYTES_IN_IMG_PER_CW - USER_DATA_BYTES_PER_CW) *
|
||||
dev->cws_per_page;
|
||||
dev->oob_per_page = mtd->oobavail;
|
||||
mtd->writebufsize = mtd->writesize;
|
||||
/* BAD_BLOCK_BYTE_NUM = Page Size - (CW_PER_PAGE * Codeword Size) + 1
|
||||
* Note: Set CW_PER_PAGE to 1 less than the actual number.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue