mtd: rawnand: Deprecate the ->select_chip() hook
authorBoris Brezillon <boris.brezillon@bootlin.com>
Sun, 11 Nov 2018 07:55:22 +0000 (08:55 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 7 Dec 2018 09:38:27 +0000 (10:38 +0100)
Now that the CS line to be selected is passed to ->exec_op() and
stored in chip->cur_cs and after patching all drivers implementing
->exec_op() to stop implementing this method, we can deprecate it by
moving it to the nand_legacy structure.

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>
28 files changed:
drivers/mtd/nand/raw/atmel/nand-controller.c
drivers/mtd/nand/raw/au1550nd.c
drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.c
drivers/mtd/nand/raw/cafe_nand.c
drivers/mtd/nand/raw/davinci_nand.c
drivers/mtd/nand/raw/denali.c
drivers/mtd/nand/raw/diskonchip.c
drivers/mtd/nand/raw/fsl_elbc_nand.c
drivers/mtd/nand/raw/fsl_ifc_nand.c
drivers/mtd/nand/raw/fsl_upm.c
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
drivers/mtd/nand/raw/hisi504_nand.c
drivers/mtd/nand/raw/jz4740_nand.c
drivers/mtd/nand/raw/jz4780_nand.c
drivers/mtd/nand/raw/mpc5121_nfc.c
drivers/mtd/nand/raw/mtk_nand.c
drivers/mtd/nand/raw/mxc_nand.c
drivers/mtd/nand/raw/nand_base.c
drivers/mtd/nand/raw/nand_legacy.c
drivers/mtd/nand/raw/ndfc.c
drivers/mtd/nand/raw/plat_nand.c
drivers/mtd/nand/raw/qcom_nandc.c
drivers/mtd/nand/raw/s3c2410.c
drivers/mtd/nand/raw/sh_flctl.c
drivers/mtd/nand/raw/sunxi_nand.c
drivers/mtd/nand/raw/tango_nand.c
drivers/mtd/nand/raw/xway_nand.c
include/linux/mtd/rawnand.h

index fb33f6be7c4ff7306f391931e1843f6712edbdb7..d5c58eb040d8ab263c2f41f19a8ad63c01f08002 100644 (file)
@@ -1477,7 +1477,7 @@ static void atmel_nand_init(struct atmel_nand_controller *nc,
        chip->legacy.write_byte = atmel_nand_write_byte;
        chip->legacy.read_buf = atmel_nand_read_buf;
        chip->legacy.write_buf = atmel_nand_write_buf;
-       chip->select_chip = atmel_nand_select_chip;
+       chip->legacy.select_chip = atmel_nand_select_chip;
 
        if (nc->mck && nc->caps->ops->setup_data_interface)
                chip->setup_data_interface = atmel_nand_setup_data_interface;
@@ -1525,7 +1525,7 @@ static void atmel_hsmc_nand_init(struct atmel_nand_controller *nc,
 
        /* Overload some methods for the HSMC controller. */
        chip->legacy.cmd_ctrl = atmel_hsmc_nand_cmd_ctrl;
-       chip->select_chip = atmel_hsmc_nand_select_chip;
+       chip->legacy.select_chip = atmel_hsmc_nand_select_chip;
 }
 
 static int atmel_nand_controller_remove_nand(struct atmel_nand *nand)
index 9731c1c487f6e723d54d8cad1af98e043c68291d..a963002663ed1d186dc8dae567d779e0d8b631df 100644 (file)
@@ -430,7 +430,7 @@ static int au1550nd_probe(struct platform_device *pdev)
        ctx->cs = cs;
 
        this->legacy.dev_ready = au1550_device_ready;
-       this->select_chip = au1550_select_chip;
+       this->legacy.select_chip = au1550_select_chip;
        this->legacy.cmdfunc = au1550_command;
 
        /* 30 us command delay time */
index 9095a79ebc7db4f3d3273958cff7551ea99ba10f..a37cbfe565677cf2d4bf6fe6e7ac5f2976dbb25e 100644 (file)
@@ -383,7 +383,7 @@ int bcm47xxnflash_ops_bcm4706_init(struct bcm47xxnflash *b47n)
        u8 tbits, col_bits, col_size, row_bits, row_bsize;
        u32 val;
 
-       b47n->nand_chip.select_chip = bcm47xxnflash_ops_bcm4706_select_chip;
+       nand_chip->legacy.select_chip = bcm47xxnflash_ops_bcm4706_select_chip;
        nand_chip->legacy.cmd_ctrl = bcm47xxnflash_ops_bcm4706_cmd_ctrl;
        nand_chip->legacy.dev_ready = bcm47xxnflash_ops_bcm4706_dev_ready;
        b47n->nand_chip.legacy.cmdfunc = bcm47xxnflash_ops_bcm4706_cmdfunc;
index c1a745940d12936123433878b5c63b4a81c39002..a85f5fa5c66d7795caa0ea7380c85ad50c75dcf9 100644 (file)
@@ -708,7 +708,7 @@ static int cafe_nand_probe(struct pci_dev *pdev,
        cafe->nand.legacy.read_byte = cafe_read_byte;
        cafe->nand.legacy.read_buf = cafe_read_buf;
        cafe->nand.legacy.write_buf = cafe_write_buf;
-       cafe->nand.select_chip = cafe_select_chip;
+       cafe->nand.legacy.select_chip = cafe_select_chip;
        cafe->nand.legacy.set_features = nand_get_set_features_notsupp;
        cafe->nand.legacy.get_features = nand_get_set_features_notsupp;
 
index 80f228d23cd26da3c118e595edd4e5406ef0610f..f430aeb917e84d11ab9a5f41be73b0717936a89e 100644 (file)
@@ -762,7 +762,7 @@ static int nand_davinci_probe(struct platform_device *pdev)
        info->chip.legacy.IO_ADDR_R     = vaddr;
        info->chip.legacy.IO_ADDR_W     = vaddr;
        info->chip.legacy.chip_delay    = 0;
-       info->chip.select_chip  = nand_davinci_select_chip;
+       info->chip.legacy.select_chip   = nand_davinci_select_chip;
 
        /* options such as NAND_BBT_USE_FLASH */
        info->chip.bbt_options  = pdata->bbt_options;
index 830ea247277b1cac529e4814834eb20c05212e7f..64895ca68c8d056939746eaa7a228bf371c2b24e 100644 (file)
@@ -1355,7 +1355,7 @@ int denali_init(struct denali_nand_info *denali)
        if (!mtd->name)
                mtd->name = "denali-nand";
 
-       chip->select_chip = denali_select_chip;
+       chip->legacy.select_chip = denali_select_chip;
        chip->legacy.read_byte = denali_read_byte;
        chip->legacy.write_byte = denali_write_byte;
        chip->legacy.cmd_ctrl = denali_cmd_ctrl;
index 3a4c373affab3048866b40cda681c2a1335c3029..53f57e0f007e25654c773b73b1c0f56b35699b14 100644 (file)
@@ -1390,7 +1390,7 @@ static inline int __init doc2001plus_init(struct mtd_info *mtd)
        this->legacy.read_buf = doc2001plus_readbuf;
        doc->late_init = inftl_scan_bbt;
        this->legacy.cmd_ctrl = NULL;
-       this->select_chip = doc2001plus_select_chip;
+       this->legacy.select_chip = doc2001plus_select_chip;
        this->legacy.cmdfunc = doc2001plus_command;
        this->ecc.hwctl = doc2001plus_enable_hwecc;
 
@@ -1568,7 +1568,7 @@ static int __init doc_probe(unsigned long physadr)
        mtd_set_ooblayout(mtd, &doc200x_ooblayout_ops);
 
        nand_set_controller_data(nand, doc);
-       nand->select_chip       = doc200x_select_chip;
+       nand->legacy.select_chip        = doc200x_select_chip;
        nand->legacy.cmd_ctrl           = doc200x_hwcontrol;
        nand->legacy.dev_ready  = doc200x_dev_ready;
        nand->legacy.waitfunc   = doc200x_wait;
index d6ed697fcfe6e6e4ddd8b4ddc97fca7000918502..70f0d2b450ea1fd21a16cec5c19b1ac61e553d02 100644 (file)
@@ -779,7 +779,7 @@ static int fsl_elbc_chip_init(struct fsl_elbc_mtd *priv)
        chip->legacy.read_byte = fsl_elbc_read_byte;
        chip->legacy.write_buf = fsl_elbc_write_buf;
        chip->legacy.read_buf = fsl_elbc_read_buf;
-       chip->select_chip = fsl_elbc_select_chip;
+       chip->legacy.select_chip = fsl_elbc_select_chip;
        chip->legacy.cmdfunc = fsl_elbc_cmdfunc;
        chip->legacy.waitfunc = fsl_elbc_wait;
        chip->legacy.set_features = nand_get_set_features_notsupp;
index 6f4afc44381a3e05affc9bfbe14d2069e876a398..e65d274399f91d213e5141c55291a1fbd094bc2e 100644 (file)
@@ -864,7 +864,7 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
 
        chip->legacy.write_buf = fsl_ifc_write_buf;
        chip->legacy.read_buf = fsl_ifc_read_buf;
-       chip->select_chip = fsl_ifc_select_chip;
+       chip->legacy.select_chip = fsl_ifc_select_chip;
        chip->legacy.cmdfunc = fsl_ifc_cmdfunc;
        chip->legacy.waitfunc = fsl_ifc_wait;
        chip->legacy.set_features = nand_get_set_features_notsupp;
index 673c5a0c9345691160bb76a2415f2a8791d44ec9..5ccc28ec0985651cea6d12e5b94eab69966358f9 100644 (file)
@@ -170,7 +170,7 @@ static int fun_chip_init(struct fsl_upm_nand *fun,
        fun->chip.ecc.mode = NAND_ECC_SOFT;
        fun->chip.ecc.algo = NAND_ECC_HAMMING;
        if (fun->mchip_count > 1)
-               fun->chip.select_chip = fun_select_chip;
+               fun->chip.legacy.select_chip = fun_select_chip;
 
        if (fun->rnb_gpio[0] >= 0)
                fun->chip.legacy.dev_ready = fun_chip_ready;
index 302ddd3d4a5fae6c43d36d5f3da52de541b0fa24..c461d5efabc00bb404ee771b21b5837d934f5466 100644 (file)
@@ -1907,7 +1907,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
        /* init the nand_chip{}, we don't support a 16-bit NAND Flash bus. */
        nand_set_controller_data(chip, this);
        nand_set_flash_node(chip, this->pdev->dev.of_node);
-       chip->select_chip       = gpmi_select_chip;
+       chip->legacy.select_chip        = gpmi_select_chip;
        chip->setup_data_interface = gpmi_setup_data_interface;
        chip->legacy.cmd_ctrl   = gpmi_cmd_ctrl;
        chip->legacy.dev_ready  = gpmi_dev_ready;
index f043938ee36b7fb5848fa505d8edd9c3f5e0e477..e41c13499fd5038d21ee916e44f3280e453a83c3 100644 (file)
@@ -783,7 +783,7 @@ static int hisi_nfc_probe(struct platform_device *pdev)
        nand_set_controller_data(chip, host);
        nand_set_flash_node(chip, np);
        chip->legacy.cmdfunc    = hisi_nfc_cmdfunc;
-       chip->select_chip       = hisi_nfc_select_chip;
+       chip->legacy.select_chip        = hisi_nfc_select_chip;
        chip->legacy.read_byte  = hisi_nfc_read_byte;
        chip->legacy.write_buf  = hisi_nfc_write_buf;
        chip->legacy.read_buf   = hisi_nfc_read_buf;
index d271004f16b047fb11fffcf4273efa30f7963b04..0bcfdd3d66a89e4f8942b5ef2e7438008ddd5f3a 100644 (file)
@@ -427,7 +427,7 @@ static int jz_nand_probe(struct platform_device *pdev)
 
        chip->legacy.chip_delay = 50;
        chip->legacy.cmd_ctrl = jz_nand_cmd_ctrl;
-       chip->select_chip = jz_nand_select_chip;
+       chip->legacy.select_chip = jz_nand_select_chip;
        chip->dummy_controller.ops = &jz_nand_controller_ops;
 
        if (nand->busy_gpio)
index cdf22100ab7719841c63851cd5c6702ed3facdcc..22e58975f0d5e4487c1993db95e13fd5fc88e159 100644 (file)
@@ -279,7 +279,7 @@ static int jz4780_nand_init_chip(struct platform_device *pdev,
        chip->legacy.IO_ADDR_W = cs->base + OFFSET_DATA;
        chip->legacy.chip_delay = RB_DELAY_US;
        chip->options = NAND_NO_SUBPAGE_WRITE;
-       chip->select_chip = jz4780_nand_select_chip;
+       chip->legacy.select_chip = jz4780_nand_select_chip;
        chip->legacy.cmd_ctrl = jz4780_nand_cmd_ctrl;
        chip->ecc.mode = NAND_ECC_HW;
        chip->controller = &nfc->controller;
index 86a0aabe08df941bd6931a40d1f72918ec6fa3e6..062cd1eb28616275dd8080755e23041c082e680e 100644 (file)
@@ -697,7 +697,7 @@ static int mpc5121_nfc_probe(struct platform_device *op)
        chip->legacy.read_byte = mpc5121_nfc_read_byte;
        chip->legacy.read_buf = mpc5121_nfc_read_buf;
        chip->legacy.write_buf = mpc5121_nfc_write_buf;
-       chip->select_chip = mpc5121_nfc_select_chip;
+       chip->legacy.select_chip = mpc5121_nfc_select_chip;
        chip->legacy.set_features = nand_get_set_features_notsupp;
        chip->legacy.get_features = nand_get_set_features_notsupp;
        chip->bbt_options = NAND_BBT_USE_FLASH;
@@ -712,7 +712,7 @@ static int mpc5121_nfc_probe(struct platform_device *op)
                        return retval;
                }
 
-               chip->select_chip = ads5121_select_chip;
+               chip->legacy.select_chip = ads5121_select_chip;
        }
 
        /* Enable NFC clock */
index 2bb0df1b7244795658e2620ace4c6bc4b45d4359..ce124f8c02cd105b0b46b99866f61782734e94e9 100644 (file)
@@ -1333,7 +1333,7 @@ static int mtk_nfc_nand_chip_init(struct device *dev, struct mtk_nfc *nfc,
 
        nand->options |= NAND_USE_BOUNCE_BUFFER | NAND_SUBPAGE_READ;
        nand->legacy.dev_ready = mtk_nfc_dev_ready;
-       nand->select_chip = mtk_nfc_select_chip;
+       nand->legacy.select_chip = mtk_nfc_select_chip;
        nand->legacy.write_byte = mtk_nfc_write_byte;
        nand->legacy.write_buf = mtk_nfc_write_buf;
        nand->legacy.read_byte = mtk_nfc_read_byte;
index 88bd3f6a499c02a213ba84341084ae11ffd23a67..c00b1d408a0429c5cf04c97e3d9b0d42dc6ed247 100644 (file)
@@ -1828,7 +1828,7 @@ static int mxcnd_probe(struct platform_device *pdev)
        this->ecc.bytes = host->devtype_data->eccbytes;
        host->eccsize = host->devtype_data->eccsize;
 
-       this->select_chip = host->devtype_data->select_chip;
+       this->legacy.select_chip = host->devtype_data->select_chip;
        this->ecc.size = 512;
        mtd_set_ooblayout(mtd, host->devtype_data->ooblayout);
 
index 93a19f5517966658f52b2dc6d7514e484386125e..cef6633fdce935a9a1955b22dca29526760e1d15 100644 (file)
@@ -248,8 +248,8 @@ void nand_select_target(struct nand_chip *chip, unsigned int cs)
 
        chip->cur_cs = cs;
 
-       if (chip->select_chip)
-               chip->select_chip(chip, cs);
+       if (chip->legacy.select_chip)
+               chip->legacy.select_chip(chip, cs);
 }
 EXPORT_SYMBOL_GPL(nand_select_target);
 
@@ -262,8 +262,8 @@ EXPORT_SYMBOL_GPL(nand_select_target);
  */
 void nand_deselect_target(struct nand_chip *chip)
 {
-       if (chip->select_chip)
-               chip->select_chip(chip, -1);
+       if (chip->legacy.select_chip)
+               chip->legacy.select_chip(chip, -1);
 
        chip->cur_cs = -1;
 }
index f76b9356ba9c4d9bd74a4f3ae819e703cf8973e1..4596a538b9679236ce3835b2786748afe90a45a2 100644 (file)
@@ -592,8 +592,8 @@ void nand_legacy_set_defaults(struct nand_chip *chip)
        if (chip->legacy.waitfunc == NULL)
                chip->legacy.waitfunc = nand_wait;
 
-       if (!chip->select_chip)
-               chip->select_chip = nand_select_chip;
+       if (!chip->legacy.select_chip)
+               chip->legacy.select_chip = nand_select_chip;
 
        /* If called twice, pointers that depend on busw may need to be reset */
        if (!chip->legacy.read_byte || chip->legacy.read_byte == nand_read_byte)
@@ -626,9 +626,10 @@ int nand_legacy_check_hooks(struct nand_chip *chip)
 
        /*
         * Default functions assigned for ->legacy.cmdfunc() and
-        * ->select_chip() both expect ->legacy.cmd_ctrl() to be populated.
+        * ->legacy.select_chip() both expect ->legacy.cmd_ctrl() to be
+        *  populated.
         */
-       if ((!chip->legacy.cmdfunc || !chip->select_chip) &&
+       if ((!chip->legacy.cmdfunc || !chip->legacy.select_chip) &&
            !chip->legacy.cmd_ctrl) {
                pr_err("->legacy.cmd_ctrl() should be provided\n");
                return -EINVAL;
index d49a7a17146c84e17f917eae0db3da4bb3dad564..9857e0e5acd48cec6ad07b1f4a14af6426b21786 100644 (file)
@@ -146,7 +146,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,
        chip->legacy.IO_ADDR_W = ndfc->ndfcbase + NDFC_DATA;
        chip->legacy.cmd_ctrl = ndfc_hwcontrol;
        chip->legacy.dev_ready = ndfc_ready;
-       chip->select_chip = ndfc_select_chip;
+       chip->legacy.select_chip = ndfc_select_chip;
        chip->legacy.chip_delay = 50;
        chip->controller = &ndfc->ndfc_control;
        chip->legacy.read_buf = ndfc_read_buf;
index 86c536ddaf248d5a99105f89af2d5dd01871a64d..a994b76daa50572930e9f55e40c1eccf3ad2990a 100644 (file)
@@ -63,7 +63,7 @@ static int plat_nand_probe(struct platform_device *pdev)
        data->chip.legacy.IO_ADDR_W = data->io_base;
        data->chip.legacy.cmd_ctrl = pdata->ctrl.cmd_ctrl;
        data->chip.legacy.dev_ready = pdata->ctrl.dev_ready;
-       data->chip.select_chip = pdata->ctrl.select_chip;
+       data->chip.legacy.select_chip = pdata->ctrl.select_chip;
        data->chip.legacy.write_buf = pdata->ctrl.write_buf;
        data->chip.legacy.read_buf = pdata->ctrl.read_buf;
        data->chip.legacy.chip_delay = pdata->chip.chip_delay;
index ef75dfa62a4f816f49d6008dcc3bbd7561293530..6b76fb5c0aed3def7e279aa5b2d9324eef4559ef 100644 (file)
@@ -2804,7 +2804,7 @@ static int qcom_nand_host_init_and_register(struct qcom_nand_controller *nandc,
        mtd->dev.parent = dev;
 
        chip->legacy.cmdfunc    = qcom_nandc_command;
-       chip->select_chip       = qcom_nandc_select_chip;
+       chip->legacy.select_chip        = qcom_nandc_select_chip;
        chip->legacy.read_byte  = qcom_nandc_read_byte;
        chip->legacy.read_buf   = qcom_nandc_read_buf;
        chip->legacy.write_buf  = qcom_nandc_write_buf;
index d2e42e9d0e8c15cfca6b235bb8ea5a96e733545b..a8905463701a7489721e2b65535b245fdfded8bc 100644 (file)
@@ -866,7 +866,7 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
 
        chip->legacy.write_buf    = s3c2410_nand_write_buf;
        chip->legacy.read_buf     = s3c2410_nand_read_buf;
-       chip->select_chip  = s3c2410_nand_select_chip;
+       chip->legacy.select_chip  = s3c2410_nand_select_chip;
        chip->legacy.chip_delay   = 50;
        nand_set_controller_data(chip, nmtd);
        chip->options      = set->options;
index 30edcc77b111c0caf1f6b4a3fea1ff58dae4f0d3..7ab50bc6ad3a30b757a1f5df1bcd173b7c5b5258 100644 (file)
@@ -1170,7 +1170,7 @@ static int flctl_probe(struct platform_device *pdev)
        nand->legacy.read_byte = flctl_read_byte;
        nand->legacy.write_buf = flctl_write_buf;
        nand->legacy.read_buf = flctl_read_buf;
-       nand->select_chip = flctl_select_chip;
+       nand->legacy.select_chip = flctl_select_chip;
        nand->legacy.cmdfunc = flctl_cmdfunc;
        nand->legacy.set_features = nand_get_set_features_notsupp;
        nand->legacy.get_features = nand_get_set_features_notsupp;
index 51b1a548064b60bc263396efde767786550fac00..e489a6ff57d7f966b62bfb5afc7811d3a54bdcf8 100644 (file)
@@ -1922,7 +1922,7 @@ static int sunxi_nand_chip_init(struct device *dev, struct sunxi_nfc *nfc,
         */
        nand->ecc.mode = NAND_ECC_HW;
        nand_set_flash_node(nand, np);
-       nand->select_chip = sunxi_nfc_select_chip;
+       nand->legacy.select_chip = sunxi_nfc_select_chip;
        nand->legacy.cmd_ctrl = sunxi_nfc_cmd_ctrl;
        nand->legacy.read_buf = sunxi_nfc_read_buf;
        nand->legacy.write_buf = sunxi_nfc_write_buf;
index 8818f893f300f1ca26939beb5aff8c5ba00d34ff..ebca4579c033d4b238ed9461738ffbccc5d1a0b9 100644 (file)
@@ -567,7 +567,7 @@ static int chip_init(struct device *dev, struct device_node *np)
        chip->legacy.read_byte = tango_read_byte;
        chip->legacy.write_buf = tango_write_buf;
        chip->legacy.read_buf = tango_read_buf;
-       chip->select_chip = tango_select_chip;
+       chip->legacy.select_chip = tango_select_chip;
        chip->legacy.cmd_ctrl = tango_cmd_ctrl;
        chip->legacy.dev_ready = tango_dev_ready;
        chip->setup_data_interface = tango_set_timings;
index a234a5cb486885bb21c606ff84713b751f1bfc89..4cb78106af14cd159dfd2976dd767903b5ae1d8c 100644 (file)
@@ -176,7 +176,7 @@ static int xway_nand_probe(struct platform_device *pdev)
 
        data->chip.legacy.cmd_ctrl = xway_cmd_ctrl;
        data->chip.legacy.dev_ready = xway_dev_ready;
-       data->chip.select_chip = xway_select_chip;
+       data->chip.legacy.select_chip = xway_select_chip;
        data->chip.legacy.write_buf = xway_write_buf;
        data->chip.legacy.read_buf = xway_read_buf;
        data->chip.legacy.read_byte = xway_read_byte;
index aa1512df38a93fb6bc7154b220f8e1359e928c3f..40b74fb1792def48c4a13ffd0cd0ec1af5e19ea2 100644 (file)
@@ -902,6 +902,7 @@ int nand_op_parser_exec_op(struct nand_chip *chip,
  * struct nand_legacy - NAND chip legacy fields/hooks
  * @IO_ADDR_R: address to read the 8 I/O lines of the flash device
  * @IO_ADDR_W: address to write the 8 I/O lines of the flash device
+ * @select_chip: select/deselect a specific target/die
  * @read_byte: read one byte from the chip
  * @write_byte: write a single byte to the chip on the low 8 I/O lines
  * @write_buf: write data from the buffer to the chip
@@ -927,6 +928,7 @@ int nand_op_parser_exec_op(struct nand_chip *chip,
 struct nand_legacy {
        void __iomem *IO_ADDR_R;
        void __iomem *IO_ADDR_W;
+       void (*select_chip)(struct nand_chip *chip, int cs);
        u8 (*read_byte)(struct nand_chip *chip);
        void (*write_byte)(struct nand_chip *chip, u8 byte);
        void (*write_buf)(struct nand_chip *chip, const u8 *buf, int len);
@@ -954,7 +956,6 @@ struct nand_legacy {
  *                     you're modifying an existing driver that is using those
  *                     fields/hooks, you should consider reworking the driver
  *                     avoid using them.
- * @select_chip:       [REPLACEABLE] select chip nr
  * @exec_op:           controller specific method to execute NAND operations.
  *                     This method replaces ->cmdfunc(),
  *                     ->legacy.{read,write}_{buf,byte,word}(),
@@ -1040,7 +1041,6 @@ struct nand_chip {
 
        struct nand_legacy legacy;
 
-       void (*select_chip)(struct nand_chip *chip, int cs);
        int (*exec_op)(struct nand_chip *chip,
                       const struct nand_operation *op,
                       bool check_only);