diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-11-09 13:30:51 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2018-11-09 13:31:47 +0100 |
commit | 9a3c805584b6adf3fa4f0db5c127a056b0c6d667 (patch) | |
tree | 3d2b30b9baf9ea1044daa8b00f5e26a7beca7cb1 /target/linux/ramips/patches-4.14/0040-nand-hack.patch | |
parent | dbba87aa6a03f7a85e9acc910df26364235220a9 (diff) | |
download | upstream-9a3c805584b6adf3fa4f0db5c127a056b0c6d667.tar.gz upstream-9a3c805584b6adf3fa4f0db5c127a056b0c6d667.tar.bz2 upstream-9a3c805584b6adf3fa4f0db5c127a056b0c6d667.zip |
ramips: use separated mtd patch reverting write_page() removal
This helps understanding mtd changes needed to get downstream NAND
driver working.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/ramips/patches-4.14/0040-nand-hack.patch')
-rw-r--r-- | target/linux/ramips/patches-4.14/0040-nand-hack.patch | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/target/linux/ramips/patches-4.14/0040-nand-hack.patch b/target/linux/ramips/patches-4.14/0040-nand-hack.patch index c906d7fa6a..58cdf1bce7 100644 --- a/target/linux/ramips/patches-4.14/0040-nand-hack.patch +++ b/target/linux/ramips/patches-4.14/0040-nand-hack.patch @@ -18,37 +18,9 @@ if (ret < 0) { if (use_bufpoi) /* Invalidate page cache */ -@@ -2761,9 +2765,14 @@ static int nand_do_write_ops(struct mtd_ - memset(chip->oob_poi, 0xff, mtd->oobsize); - } - -- ret = nand_write_page(mtd, chip, column, bytes, wbuf, -- oob_required, page, -- (ops->mode == MTD_OPS_RAW)); -+ if (chip->write_page) -+ ret = chip->write_page(mtd, chip, column, bytes, wbuf, -+ oob_required, page, -+ (ops->mode == MTD_OPS_RAW)); -+ else -+ ret = nand_write_page(mtd, chip, column, bytes, wbuf, -+ oob_required, page, -+ (ops->mode == MTD_OPS_RAW)); - if (ret) - break; - --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h -@@ -885,6 +885,9 @@ struct nand_chip { - int(*waitfunc)(struct mtd_info *mtd, struct nand_chip *this); - int (*erase)(struct mtd_info *mtd, int page); - int (*scan_bbt)(struct mtd_info *mtd); -+ int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, -+ uint32_t offset, int data_len, const uint8_t *buf, -+ int oob_required, int page, int raw); - int (*onfi_set_features)(struct mtd_info *mtd, struct nand_chip *chip, - int feature_addr, uint8_t *subfeature_para); - int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip, -@@ -893,6 +896,9 @@ struct nand_chip { +@@ -897,6 +897,9 @@ struct nand_chip { int (*setup_data_interface)(struct mtd_info *mtd, int chipnr, const struct nand_data_interface *conf); |