2
0
forked from Ivasoft/openwrt

kernel: backport MEMREAD ioctl

MEMREAD is a new ioctl for MTD character devices that was first included
in Linux 6.1.  It allows userspace applications to use the Linux
kernel's OOB autoplacement mechanism while reading data from NAND
devices.  The Yafut tool needs this ioctl to do its job.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
This commit is contained in:
Michał Kępień
2023-03-31 12:40:31 +02:00
committed by Christian Marangi
parent 3d110053f8
commit fa4dc86e98
15 changed files with 908 additions and 17 deletions

View File

@@ -264,7 +264,7 @@ Subject: [PATCH] mtd: mtdsplit support
* one chunk. Do that by default.
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -613,6 +613,24 @@ static inline void mtd_align_erase_req(s
@@ -620,6 +620,24 @@ static inline void mtd_align_erase_req(s
req->len += mtd->erasesize - mod;
}
@@ -289,7 +289,7 @@ Subject: [PATCH] mtd: mtdsplit support
static inline uint32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd)
{
if (mtd->writesize_shift)
@@ -686,6 +704,13 @@ extern struct mtd_info *of_get_mtd_devic
@@ -693,6 +711,13 @@ extern struct mtd_info *of_get_mtd_devic
extern struct mtd_info *get_mtd_device_nm(const char *name);
extern void put_mtd_device(struct mtd_info *mtd);