summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/fsmc_nand.c
diff options
context:
space:
mode:
authorBoris Brezillon2017-03-16 09:35:58 +0100
committerBoris Brezillon2017-06-01 10:09:28 +0200
commit104e442a67cfba4d0cc982384761befb917fb6a1 (patch)
treeee1d3ebd8d575823d10eb236dca14d4717aeb0af /drivers/mtd/nand/fsmc_nand.c
parentmtd: nand: gpmi: Kill gpmi_nand_exit() (diff)
downloadkernel-qcow2-linux-104e442a67cfba4d0cc982384761befb917fb6a1.tar.gz
kernel-qcow2-linux-104e442a67cfba4d0cc982384761befb917fb6a1.tar.xz
kernel-qcow2-linux-104e442a67cfba4d0cc982384761befb917fb6a1.zip
mtd: nand: Pass the CS line to ->setup_data_interface()
Some NAND controllers can assign different NAND timings to different CS lines. Pass the CS line information to ->setup_data_interface() so that the NAND controller driver knows which CS line is concerned by the setup_data_interface() request. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/nand/fsmc_nand.c')
-rw-r--r--drivers/mtd/nand/fsmc_nand.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index de57554b8c4f..9d8b051d3187 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -388,9 +388,8 @@ static int fsmc_calc_timings(struct fsmc_nand_data *host,
return 0;
}
-static int fsmc_setup_data_interface(struct mtd_info *mtd,
- const struct nand_data_interface *conf,
- bool check_only)
+static int fsmc_setup_data_interface(struct mtd_info *mtd, int csline,
+ const struct nand_data_interface *conf)
{
struct nand_chip *nand = mtd_to_nand(mtd);
struct fsmc_nand_data *host = nand_get_controller_data(nand);
@@ -406,7 +405,7 @@ static int fsmc_setup_data_interface(struct mtd_info *mtd,
if (ret)
return ret;
- if (check_only)
+ if (csline == NAND_DATA_IFACE_CHECK_ONLY)
return 0;
fsmc_nand_setup(host, &tims);