aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/s3c2410.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-11-11 08:55:24 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2018-12-07 10:38:27 +0100
commit7a08dbaedd365fa4eb7c9cd504c075e3336eb0c6 (patch)
tree1cfeeb069cffc1883c56d076cd53acb85cbe4173 /drivers/mtd/nand/raw/s3c2410.c
parentmtd: rawnand: Move the ->exec_op() method to nand_controller_ops (diff)
downloadlinux-dev-7a08dbaedd365fa4eb7c9cd504c075e3336eb0c6.tar.xz
linux-dev-7a08dbaedd365fa4eb7c9cd504c075e3336eb0c6.zip
mtd: rawnand: Move ->setup_data_interface() to nand_controller_ops
->setup_data_interface() is a controller specific method and should thus be placed in nand_controller_ops. In order to make that work with controllers that support keeping pre-configured timings we need to add a new NAND_KEEP_TIMINGS flag to inform the core it should skip the timings selection step. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Tested-by: Janusz Krzysztofik <jmkrzyszt@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/s3c2410.c')
-rw-r--r--drivers/mtd/nand/raw/s3c2410.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/s3c2410.c b/drivers/mtd/nand/raw/s3c2410.c
index a8905463701a..adc7a196e383 100644
--- a/drivers/mtd/nand/raw/s3c2410.c
+++ b/drivers/mtd/nand/raw/s3c2410.c
@@ -876,8 +876,8 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
* let's keep behavior unchanged for legacy boards booting via pdata and
* auto-detect timings only when booting with a device tree.
*/
- if (np)
- chip->setup_data_interface = s3c2410_nand_setup_data_interface;
+ if (!np)
+ chip->options |= NAND_KEEP_TIMINGS;
switch (info->cpu_type) {
case TYPE_S3C2410:
@@ -1011,6 +1011,7 @@ static int s3c2410_nand_attach_chip(struct nand_chip *chip)
static const struct nand_controller_ops s3c24xx_nand_controller_ops = {
.attach_chip = s3c2410_nand_attach_chip,
+ .setup_data_interface = s3c2410_nand_setup_data_interface,
};
static const struct of_device_id s3c24xx_nand_dt_ids[] = {