Skip to content

Commit

Permalink
fix nand patch
Browse files Browse the repository at this point in the history
  • Loading branch information
devbis committed Jul 20, 2024
1 parent 87e613c commit 3908978
Showing 1 changed file with 33 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3908978

Please sign in to comment.