diff options
author | Michał Kępień <openwrt@kempniu.pl> | 2023-03-31 12:40:31 +0200 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-04-18 13:53:03 +0200 |
commit | fa4dc86e980851f01e243f94ffe7e0a928f6c16d (patch) | |
tree | 128407f050363a1640636a512329de2d56416a7a /target/linux/mediatek | |
parent | 3d110053f80be9d118cdc499e25076c202f79945 (diff) | |
download | openwrt-fa4dc86e980851f01e243f94ffe7e0a928f6c16d.tar.gz openwrt-fa4dc86e980851f01e243f94ffe7e0a928f6c16d.tar.bz2 openwrt-fa4dc86e980851f01e243f94ffe7e0a928f6c16d.zip |
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>
Diffstat (limited to 'target/linux/mediatek')
7 files changed, 12 insertions, 12 deletions
diff --git a/target/linux/mediatek/patches-5.15/120-08-v5.18-mtd-spinand-Delay-a-little-bit-the-dirmap-creation.patch b/target/linux/mediatek/patches-5.15/120-08-v5.18-mtd-spinand-Delay-a-little-bit-the-dirmap-creation.patch index 0f69b30e94..87c7b7cd29 100644 --- a/target/linux/mediatek/patches-5.15/120-08-v5.18-mtd-spinand-Delay-a-little-bit-the-dirmap-creation.patch +++ b/target/linux/mediatek/patches-5.15/120-08-v5.18-mtd-spinand-Delay-a-little-bit-the-dirmap-creation.patch @@ -18,7 +18,7 @@ Link: https://lore.kernel.org/linux-mtd/20220127091808.1043392-8-miquel.raynal@b --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c -@@ -1211,14 +1211,6 @@ static int spinand_init(struct spinand_d +@@ -1221,14 +1221,6 @@ static int spinand_init(struct spinand_d if (ret) goto err_free_bufs; @@ -33,7 +33,7 @@ Link: https://lore.kernel.org/linux-mtd/20220127091808.1043392-8-miquel.raynal@b ret = nanddev_init(nand, &spinand_ops, THIS_MODULE); if (ret) goto err_manuf_cleanup; -@@ -1253,6 +1245,14 @@ static int spinand_init(struct spinand_d +@@ -1263,6 +1255,14 @@ static int spinand_init(struct spinand_d mtd->ecc_strength = nanddev_get_ecc_conf(nand)->strength; mtd->ecc_step_size = nanddev_get_ecc_conf(nand)->step_size; diff --git a/target/linux/mediatek/patches-5.15/120-09-v5.18-mtd-spinand-Create-direct-mapping-descriptors-for-EC.patch b/target/linux/mediatek/patches-5.15/120-09-v5.18-mtd-spinand-Create-direct-mapping-descriptors-for-EC.patch index 1188872bd7..35912cd2cd 100644 --- a/target/linux/mediatek/patches-5.15/120-09-v5.18-mtd-spinand-Create-direct-mapping-descriptors-for-EC.patch +++ b/target/linux/mediatek/patches-5.15/120-09-v5.18-mtd-spinand-Create-direct-mapping-descriptors-for-EC.patch @@ -53,7 +53,7 @@ Link: https://lore.kernel.org/linux-mtd/20220127091808.1043392-9-miquel.raynal@b while (nbytes) { ret = spi_mem_dirmap_write(wdesc, column, nbytes, buf); -@@ -865,6 +871,31 @@ static int spinand_create_dirmap(struct +@@ -875,6 +881,31 @@ static int spinand_create_dirmap(struct spinand->dirmaps[plane].rdesc = desc; diff --git a/target/linux/mediatek/patches-5.15/121-hack-spi-nand-1b-bbm.patch b/target/linux/mediatek/patches-5.15/121-hack-spi-nand-1b-bbm.patch index 770a7ff9bd..ff5521c44e 100644 --- a/target/linux/mediatek/patches-5.15/121-hack-spi-nand-1b-bbm.patch +++ b/target/linux/mediatek/patches-5.15/121-hack-spi-nand-1b-bbm.patch @@ -1,6 +1,6 @@ --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c -@@ -714,7 +714,7 @@ static int spinand_mtd_write(struct mtd_ +@@ -724,7 +724,7 @@ static int spinand_mtd_write(struct mtd_ static bool spinand_isbad(struct nand_device *nand, const struct nand_pos *pos) { struct spinand_device *spinand = nand_to_spinand(nand); @@ -9,7 +9,7 @@ struct nand_page_io_req req = { .pos = *pos, .ooblen = sizeof(marker), -@@ -725,7 +725,7 @@ static bool spinand_isbad(struct nand_de +@@ -735,7 +735,7 @@ static bool spinand_isbad(struct nand_de spinand_select_target(spinand, pos->target); spinand_read_page(spinand, &req); diff --git a/target/linux/mediatek/patches-5.15/330-snand-mtk-bmt-support.patch b/target/linux/mediatek/patches-5.15/330-snand-mtk-bmt-support.patch index cd1745dd7a..6814e5f5e9 100644 --- a/target/linux/mediatek/patches-5.15/330-snand-mtk-bmt-support.patch +++ b/target/linux/mediatek/patches-5.15/330-snand-mtk-bmt-support.patch @@ -8,7 +8,7 @@ static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val) { -@@ -1333,6 +1334,7 @@ static int spinand_probe(struct spi_mem +@@ -1343,6 +1344,7 @@ static int spinand_probe(struct spi_mem if (ret) return ret; @@ -16,7 +16,7 @@ ret = mtd_device_register(mtd, NULL, 0); if (ret) goto err_spinand_cleanup; -@@ -1340,6 +1342,7 @@ static int spinand_probe(struct spi_mem +@@ -1350,6 +1352,7 @@ static int spinand_probe(struct spi_mem return 0; err_spinand_cleanup: @@ -24,7 +24,7 @@ spinand_cleanup(spinand); return ret; -@@ -1358,6 +1361,7 @@ static int spinand_remove(struct spi_mem +@@ -1368,6 +1371,7 @@ static int spinand_remove(struct spi_mem if (ret) return ret; diff --git a/target/linux/mediatek/patches-5.15/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch b/target/linux/mediatek/patches-5.15/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch index 823630b3c4..6baa32879b 100644 --- a/target/linux/mediatek/patches-5.15/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch +++ b/target/linux/mediatek/patches-5.15/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch @@ -23,7 +23,7 @@ Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> obj-$(CONFIG_MTD_SPI_NAND) += spinand.o --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c -@@ -929,6 +929,7 @@ static const struct nand_ops spinand_ops +@@ -939,6 +939,7 @@ static const struct nand_ops spinand_ops static const struct spinand_manufacturer *spinand_manufacturers[] = { &esmt_c8_spinand_manufacturer, diff --git a/target/linux/mediatek/patches-5.15/435-drivers-mtd-spinand-Add-calibration-support-for-spin.patch b/target/linux/mediatek/patches-5.15/435-drivers-mtd-spinand-Add-calibration-support-for-spin.patch index f71a1d2d58..e2684eebb7 100644 --- a/target/linux/mediatek/patches-5.15/435-drivers-mtd-spinand-Add-calibration-support-for-spin.patch +++ b/target/linux/mediatek/patches-5.15/435-drivers-mtd-spinand-Add-calibration-support-for-spin.patch @@ -11,7 +11,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com> --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c -@@ -967,6 +967,56 @@ static int spinand_manufacturer_match(st +@@ -977,6 +977,56 @@ static int spinand_manufacturer_match(st return -ENOTSUPP; } @@ -68,7 +68,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com> static int spinand_id_detect(struct spinand_device *spinand) { u8 *id = spinand->id.data; -@@ -1217,6 +1267,10 @@ static int spinand_init(struct spinand_d +@@ -1227,6 +1277,10 @@ static int spinand_init(struct spinand_d if (!spinand->scratchbuf) return -ENOMEM; diff --git a/target/linux/mediatek/patches-5.15/436-drivers-mtd-spi-nor-Add-calibration-support-for-spi-.patch b/target/linux/mediatek/patches-5.15/436-drivers-mtd-spi-nor-Add-calibration-support-for-spi-.patch index a08b19870c..25a7cd3861 100644 --- a/target/linux/mediatek/patches-5.15/436-drivers-mtd-spi-nor-Add-calibration-support-for-spi-.patch +++ b/target/linux/mediatek/patches-5.15/436-drivers-mtd-spi-nor-Add-calibration-support-for-spi-.patch @@ -12,7 +12,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com> --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c -@@ -1008,7 +1008,10 @@ int spinand_cal_read(void *priv, u32 *ad +@@ -1018,7 +1018,10 @@ int spinand_cal_read(void *priv, u32 *ad if (ret) return ret; |