Skip to content
Snippets Groups Projects
Commit ffad5603 authored by Patrick O'Grady's avatar Patrick O'Grady Committed by Miquel Raynal
Browse files

mtd: phram: Allow the user to set the erase page size.


Permit the user to specify the erase page size as a parameter.
This solves two problems:

- phram can access images made by mkfs.jffs2.  mkfs.jffs2 won't
create images with erase sizes less than 8KiB; many architectures
define PAGE_SIZE as 4KiB.

- Allows more effective use of small capacity devices.  JFFS2
needs somewhere between 2 and 5 empty pages for garbage collection;
and for an NVRAM part with only 32KiB of space, a smaller erase page
allows much better utilization in applications where garbage collection
is important.

Signed-off-by: default avatarPatrick O'Grady <patrick@baymotion.com>
Reviewed-by: default avatarJoern Engel <joern@logfs.org>
Link: https://lore.kernel.org/lkml/CAJ7m5OqYv_=JB9NhHsqBsa8YU0DFRoP7C+W10PY22wonAGJK=A@mail.gmail.com/


[Guohua Zhong: fix token array index out of bounds and update patch for kernel master branch]
Signed-off-by: default avatarGuohua Zhong <zhongguohua1@huawei.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20201207095529.20896-1-zhongguohua1@huawei.com
parent 1ca71415
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment