vendor: rockchip: fix mtd write issue
The page offset is need point to empty page. Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Change-Id: Ib677e2937fd39b4b56622066cecfbe9a0da297ce
This commit is contained in:
parent
39c952ae4e
commit
b1c0e43cef
|
|
@ -220,13 +220,13 @@ static int mtd_vendor_storage_init(struct blk_desc *dev_desc)
|
|||
1,
|
||||
(u8 *)buf);
|
||||
|
||||
/* the page is not programed */
|
||||
/* the page is not programmed */
|
||||
if (ret == 1 && vendor_info.hdr->tag == 0xFFFFFFFF)
|
||||
continue;
|
||||
|
||||
/* point to the last programed page */
|
||||
/* point to the next free page */
|
||||
if (s_flash_info.page_offset < offset)
|
||||
s_flash_info.page_offset = offset;
|
||||
s_flash_info.page_offset = offset + s_flash_info.ops_size;
|
||||
|
||||
if (ret != 1 || vendor_info.hdr->tag != VENDOR_TAG)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue