summaryrefslogtreecommitdiff
path: root/drivers/mtd/lpddr/lpddr_cmds.c
diff options
context:
space:
mode:
authorCheng Ming Lin <chengminglin@mxic.com.tw>2025-11-14 10:44:52 +0800
committerRichard Weinberger <richard@nod.at>2025-11-28 21:46:15 +0100
commit77530d1a78ca5c274e37d6494a965223672630b2 (patch)
tree3a8c1975a8ec3129ec2d3370c1c3a704232f343c /drivers/mtd/lpddr/lpddr_cmds.c
parentc0d612b391b219f0119201d6a30514bf00f79066 (diff)
mtd: ubi: skip programming unused bits in ubi headers
This patch prevents unnecessary programming of bits in ec_hdr and vid_hdr that are not used or read during normal UBI operation. These unused bits are typcially already set to 1 in erased flash and do not need to be explicitly programmed to 0 if they are not used. Programming such unused areas offers no functional benefit and may result in unnecessary flash wear, reducing the overall lifetime of the device. By skipping these writes, we preserve the flash state as much as possible and minimize wear caused by redundant operations. This change ensures that only necessary fields are written when preparing UBI headers, improving flash efficiency without affecting functionality. Additionally, the Kioxia TC58NVG1S3HTA00 datasheet (page 63) also notes that continuous program/erase cycling with a high percentage of '0' bits in the data pattern can accelerate block endurance degradation. This further supports avoiding large 0x00 patterns. Link: https://europe.kioxia.com/content/dam/kioxia/newidr/productinfo/datasheet/201910/DST_TC58NVG1S3HTA00-TDE_EN_31442.pdf Signed-off-by: Cheng Ming Lin <chengminglin@mxic.com.tw> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/lpddr/lpddr_cmds.c')
0 files changed, 0 insertions, 0 deletions