From 3908978549f5652a5db889c9a5f0bdfb21d03626 Mon Sep 17 00:00:00 2001 From: Ivan Belokobylskiy Date: Sat, 20 Jul 2024 19:16:56 +0300 Subject: [PATCH] fix nand patch --- ...38-mtd-ralink-add-mt7620-nand-driver.patch | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/target/linux/ramips/patches-5.15/0038-mtd-ralink-add-mt7620-nand-driver.patch b/target/linux/ramips/patches-5.15/0038-mtd-ralink-add-mt7620-nand-driver.patch index 07fafef83583f0..2b1a1daba1e079 100644 --- a/target/linux/ramips/patches-5.15/0038-mtd-ralink-add-mt7620-nand-driver.patch +++ b/target/linux/ramips/patches-5.15/0038-mtd-ralink-add-mt7620-nand-driver.patch @@ -15,9 +15,9 @@ Subject: [PATCH] mtd ralink add mt7620-nand driver --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig @@ -401,4 +401,8 @@ config MTD_PISMO - + When built as a module, it will be called pismo.ko - + +config MTD_NAND_MT7620 + tristate "Support for NAND on Mediatek MT7620" + depends on RALINK && SOC_MT7620 @@ -1819,37 +1819,37 @@ Subject: [PATCH] mtd ralink add mt7620-nand driver + return ret; +} + -+static int -+ramtd_nand_readoob(struct mtd_info *mtd, loff_t from, -+ struct mtd_oob_ops *ops) -+{ -+ struct ra_nand_chip *ra = mtd->priv; -+ int ret; -+ -+ ra_dbg("%s: \n", __func__); -+ -+ nand_get_device(ra, FL_READING); -+ -+ ret = nand_do_read_ops(ra, from, ops); -+ -+ nand_release_device(ra); -+ -+ return ret; -+} -+ -+static int -+ramtd_nand_writeoob(struct mtd_info *mtd, loff_t to, -+ struct mtd_oob_ops *ops) -+{ -+ struct ra_nand_chip *ra = mtd->priv; -+ int ret; -+ -+ nand_get_device(ra, FL_READING); -+ ret = nand_do_write_ops(ra, to, ops); -+ nand_release_device(ra); -+ -+ return ret; -+} ++//static int ++//ramtd_nand_readoob(struct mtd_info *mtd, loff_t from, ++// struct mtd_oob_ops *ops) ++//{ ++// struct ra_nand_chip *ra = mtd->priv; ++// int ret; ++// ++// ra_dbg("%s: \n", __func__); ++// ++// nand_get_device(ra, FL_READING); ++// ++// ret = nand_do_read_ops(ra, from, ops); ++// ++// nand_release_device(ra); ++// ++// return ret; ++//} ++ ++//static int ++//ramtd_nand_writeoob(struct mtd_info *mtd, loff_t to, ++// struct mtd_oob_ops *ops) ++//{ ++// struct ra_nand_chip *ra = mtd->priv; ++// int ret; ++// ++// nand_get_device(ra, FL_READING); ++// ret = nand_do_write_ops(ra, to, ops); ++// nand_release_device(ra); ++// ++// return ret; ++//} + +static int +ramtd_nand_block_isbad(struct mtd_info *mtd, loff_t offs)