diff options
author | John Crispin <john@phrozen.org> | 2018-05-07 12:07:32 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-05-24 22:11:55 +0200 |
commit | 050da2107a7eb2a571a8a3d0cee21cc6a44b72b8 (patch) | |
tree | 147c3b85ccae12e4b1659acd86ac93b13ecfa15d /target/linux/mediatek/patches-4.14/0162-mtd-nand-mtk-use-nand_reset-to-reset-NAND-devices-in.patch | |
parent | 4f67c1522d92bc4512c3ecf58c38ff9886530b48 (diff) | |
download | upstream-050da2107a7eb2a571a8a3d0cee21cc6a44b72b8.tar.gz upstream-050da2107a7eb2a571a8a3d0cee21cc6a44b72b8.tar.bz2 upstream-050da2107a7eb2a571a8a3d0cee21cc6a44b72b8.zip |
mediatek: backport upstream mediatek patches
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/mediatek/patches-4.14/0162-mtd-nand-mtk-use-nand_reset-to-reset-NAND-devices-in.patch')
-rw-r--r-- | target/linux/mediatek/patches-4.14/0162-mtd-nand-mtk-use-nand_reset-to-reset-NAND-devices-in.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches-4.14/0162-mtd-nand-mtk-use-nand_reset-to-reset-NAND-devices-in.patch b/target/linux/mediatek/patches-4.14/0162-mtd-nand-mtk-use-nand_reset-to-reset-NAND-devices-in.patch new file mode 100644 index 0000000000..df2bd3056f --- /dev/null +++ b/target/linux/mediatek/patches-4.14/0162-mtd-nand-mtk-use-nand_reset-to-reset-NAND-devices-in.patch @@ -0,0 +1,46 @@ +From fb607c7c1eaeb47ec2ffed99cab571892cb6af7d Mon Sep 17 00:00:00 2001 +From: Xiaolei Li <xiaolei.li@mediatek.com> +Date: Thu, 2 Nov 2017 10:05:07 +0800 +Subject: [PATCH 162/224] mtd: nand: mtk: use nand_reset() to reset NAND + devices in resume function + +Previously, we only select chips and then send reset command to a NAND +device during resuming nand driver. There is a lack of deselecting chips. +It is advised to reset and initialize a NAND device using nand_reset(). + +Signed-off-by: Xiaolei Li <xiaolei.li@mediatek.com> +Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> +Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> +--- + drivers/mtd/nand/mtk_nand.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c +index d86a7d131cc0..6d0101e13ef6 100644 +--- a/drivers/mtd/nand/mtk_nand.c ++++ b/drivers/mtd/nand/mtk_nand.c +@@ -1540,7 +1540,6 @@ static int mtk_nfc_resume(struct device *dev) + struct mtk_nfc *nfc = dev_get_drvdata(dev); + struct mtk_nfc_nand_chip *chip; + struct nand_chip *nand; +- struct mtd_info *mtd; + int ret; + u32 i; + +@@ -1553,11 +1552,8 @@ static int mtk_nfc_resume(struct device *dev) + /* reset NAND chip if VCC was powered off */ + list_for_each_entry(chip, &nfc->chips, node) { + nand = &chip->nand; +- mtd = nand_to_mtd(nand); +- for (i = 0; i < chip->nsels; i++) { +- nand->select_chip(mtd, i); +- nand->cmdfunc(mtd, NAND_CMD_RESET, -1, -1); +- } ++ for (i = 0; i < chip->nsels; i++) ++ nand_reset(nand, i); + } + + return 0; +-- +2.11.0 + |