drivers: rk_nand: zftl static wear leveling strategy optimize

1. Garbage collection does not deal with the updated blocks.
2. Static wear considers the SLC mode erase count and XLC
mode erase count

Change-Id: I3a404a686e48f8ae44f5e7e507f6d1ef633671d4
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
This commit is contained in:
Yifeng Zhao
2018-05-10 14:54:08 +08:00
committed by Tao Huang
parent 6bd134260e
commit 9f091f9fc6
2 changed files with 9655 additions and 10081 deletions

View File

@@ -234,7 +234,7 @@ static int nand_blktrans_thread(void *arg)
int req_empty_times = 0;
spin_lock_irq(rq->queue_lock);
rk_ftl_gc_jiffies = HZ * 5;
rk_ftl_gc_jiffies = HZ / 10; /* do garbage collect after 100ms */
rk_ftl_gc_do = 0;
rk_ftl_gc_timeout.expires = jiffies + rk_ftl_gc_jiffies;
add_timer(&rk_ftl_gc_timeout);
@@ -477,8 +477,9 @@ static int nand_prase_cmdline_part(struct nand_part *pdisk_part)
> cap_size) {
pdisk_part[i].size = cap_size -
pdisk_part[i].offset;
pr_err("partition config error....\n");
if (pdisk_part[i].size)
pr_err("partition error....max cap:%x\n",
cap_size);
if (!pdisk_part[i].size)
return i;
else
return (i + 1);

File diff suppressed because it is too large Load Diff