Commit 1d017859 authored by Boris Brezillon's avatar Boris Brezillon Committed by Miquel Raynal

mtd: rawnand: Add nand_[de]select_target() helpers

Add a wrapper to prevent drivers and core code from directly calling
the ->select_chip hook which we are about to deprecate.
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
Tested-by: default avatarJanusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parent 9fd6bcff
...@@ -1549,7 +1549,7 @@ static int gpmi_block_markbad(struct nand_chip *chip, loff_t ofs) ...@@ -1549,7 +1549,7 @@ static int gpmi_block_markbad(struct nand_chip *chip, loff_t ofs)
int column, page, chipnr; int column, page, chipnr;
chipnr = (int)(ofs >> chip->chip_shift); chipnr = (int)(ofs >> chip->chip_shift);
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
column = !GPMI_IS_MX23(this) ? mtd->writesize : 0; column = !GPMI_IS_MX23(this) ? mtd->writesize : 0;
...@@ -1562,7 +1562,7 @@ static int gpmi_block_markbad(struct nand_chip *chip, loff_t ofs) ...@@ -1562,7 +1562,7 @@ static int gpmi_block_markbad(struct nand_chip *chip, loff_t ofs)
ret = nand_prog_page_op(chip, page, column, block_mark, 1); ret = nand_prog_page_op(chip, page, column, block_mark, 1);
chip->select_chip(chip, -1); nand_deselect_target(chip);
return ret; return ret;
} }
...@@ -1610,7 +1610,7 @@ static int mx23_check_transcription_stamp(struct gpmi_nand_data *this) ...@@ -1610,7 +1610,7 @@ static int mx23_check_transcription_stamp(struct gpmi_nand_data *this)
search_area_size_in_strides = 1 << rom_geo->search_area_stride_exponent; search_area_size_in_strides = 1 << rom_geo->search_area_stride_exponent;
saved_chip_number = this->current_chip; saved_chip_number = this->current_chip;
chip->select_chip(chip, 0); nand_select_target(chip, 0);
/* /*
* Loop through the first search area, looking for the NCB fingerprint. * Loop through the first search area, looking for the NCB fingerprint.
...@@ -1638,7 +1638,10 @@ static int mx23_check_transcription_stamp(struct gpmi_nand_data *this) ...@@ -1638,7 +1638,10 @@ static int mx23_check_transcription_stamp(struct gpmi_nand_data *this)
} }
chip->select_chip(chip, saved_chip_number); if (saved_chip_number >= 0)
nand_select_target(chip, saved_chip_number);
else
nand_deselect_target(chip);
if (found_an_ncb_fingerprint) if (found_an_ncb_fingerprint)
dev_dbg(dev, "\tFound a fingerprint\n"); dev_dbg(dev, "\tFound a fingerprint\n");
...@@ -1681,7 +1684,7 @@ static int mx23_write_transcription_stamp(struct gpmi_nand_data *this) ...@@ -1681,7 +1684,7 @@ static int mx23_write_transcription_stamp(struct gpmi_nand_data *this)
/* Select chip 0. */ /* Select chip 0. */
saved_chip_number = this->current_chip; saved_chip_number = this->current_chip;
chip->select_chip(chip, 0); nand_select_target(chip, 0);
/* Loop over blocks in the first search area, erasing them. */ /* Loop over blocks in the first search area, erasing them. */
dev_dbg(dev, "Erasing the search area...\n"); dev_dbg(dev, "Erasing the search area...\n");
...@@ -1713,7 +1716,11 @@ static int mx23_write_transcription_stamp(struct gpmi_nand_data *this) ...@@ -1713,7 +1716,11 @@ static int mx23_write_transcription_stamp(struct gpmi_nand_data *this)
} }
/* Deselect chip 0. */ /* Deselect chip 0. */
chip->select_chip(chip, saved_chip_number); if (saved_chip_number >= 0)
nand_select_target(chip, saved_chip_number);
else
nand_deselect_target(chip);
return 0; return 0;
} }
...@@ -1762,10 +1769,10 @@ static int mx23_boot_init(struct gpmi_nand_data *this) ...@@ -1762,10 +1769,10 @@ static int mx23_boot_init(struct gpmi_nand_data *this)
byte = block << chip->phys_erase_shift; byte = block << chip->phys_erase_shift;
/* Send the command to read the conventional block mark. */ /* Send the command to read the conventional block mark. */
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
nand_read_page_op(chip, page, mtd->writesize, NULL, 0); nand_read_page_op(chip, page, mtd->writesize, NULL, 0);
block_mark = chip->legacy.read_byte(chip); block_mark = chip->legacy.read_byte(chip);
chip->select_chip(chip, -1); nand_deselect_target(chip);
/* /*
* Check if the block is marked bad. If so, we need to mark it * Check if the block is marked bad. If so, we need to mark it
......
...@@ -335,14 +335,14 @@ static int jz_nand_detect_bank(struct platform_device *pdev, ...@@ -335,14 +335,14 @@ static int jz_nand_detect_bank(struct platform_device *pdev,
goto notfound_id; goto notfound_id;
/* Retrieve the IDs from the first chip. */ /* Retrieve the IDs from the first chip. */
chip->select_chip(chip, 0); nand_select_target(chip, 0);
nand_reset_op(chip); nand_reset_op(chip);
nand_readid_op(chip, 0, id, sizeof(id)); nand_readid_op(chip, 0, id, sizeof(id));
*nand_maf_id = id[0]; *nand_maf_id = id[0];
*nand_dev_id = id[1]; *nand_dev_id = id[1];
} else { } else {
/* Detect additional chip. */ /* Detect additional chip. */
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
nand_reset_op(chip); nand_reset_op(chip);
nand_readid_op(chip, 0, id, sizeof(id)); nand_readid_op(chip, 0, id, sizeof(id));
if (*nand_maf_id != id[0] || *nand_dev_id != id[1]) { if (*nand_maf_id != id[0] || *nand_dev_id != id[1]) {
......
...@@ -228,6 +228,41 @@ static int check_offs_len(struct nand_chip *chip, loff_t ofs, uint64_t len) ...@@ -228,6 +228,41 @@ static int check_offs_len(struct nand_chip *chip, loff_t ofs, uint64_t len)
return ret; return ret;
} }
/**
* nand_select_target() - Select a NAND target (A.K.A. die)
* @chip: NAND chip object
* @cs: the CS line to select. Note that this CS id is always from the chip
* PoV, not the controller one
*
* Select a NAND target so that further operations executed on @chip go to the
* selected NAND target.
*/
void nand_select_target(struct nand_chip *chip, unsigned int cs)
{
/*
* cs should always lie between 0 and chip->numchips, when that's not
* the case it's a bug and the caller should be fixed.
*/
if (WARN_ON(cs > chip->numchips))
return;
chip->select_chip(chip, cs);
}
EXPORT_SYMBOL_GPL(nand_select_target);
/**
* nand_deselect_target() - Deselect the currently selected target
* @chip: NAND chip object
*
* Deselect the currently selected NAND target. The result of operations
* executed on @chip after the target has been deselected is undefined.
*/
void nand_deselect_target(struct nand_chip *chip)
{
chip->select_chip(chip, -1);
}
EXPORT_SYMBOL_GPL(nand_deselect_target);
/** /**
* nand_release_device - [GENERIC] release chip * nand_release_device - [GENERIC] release chip
* @chip: NAND chip object * @chip: NAND chip object
...@@ -440,14 +475,14 @@ static int nand_do_write_oob(struct nand_chip *chip, loff_t to, ...@@ -440,14 +475,14 @@ static int nand_do_write_oob(struct nand_chip *chip, loff_t to,
*/ */
nand_reset(chip, chipnr); nand_reset(chip, chipnr);
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
/* Shift to get page */ /* Shift to get page */
page = (int)(to >> chip->page_shift); page = (int)(to >> chip->page_shift);
/* Check, if it is write protected */ /* Check, if it is write protected */
if (nand_check_wp(chip)) { if (nand_check_wp(chip)) {
chip->select_chip(chip, -1); nand_deselect_target(chip);
return -EROFS; return -EROFS;
} }
...@@ -462,7 +497,7 @@ static int nand_do_write_oob(struct nand_chip *chip, loff_t to, ...@@ -462,7 +497,7 @@ static int nand_do_write_oob(struct nand_chip *chip, loff_t to,
else else
status = chip->ecc.write_oob(chip, page & chip->pagemask); status = chip->ecc.write_oob(chip, page & chip->pagemask);
chip->select_chip(chip, -1); nand_deselect_target(chip);
if (status) if (status)
return status; return status;
...@@ -816,10 +851,10 @@ static int nand_setup_data_interface(struct nand_chip *chip, int chipnr) ...@@ -816,10 +851,10 @@ static int nand_setup_data_interface(struct nand_chip *chip, int chipnr)
/* Change the mode on the chip side (if supported by the NAND chip) */ /* Change the mode on the chip side (if supported by the NAND chip) */
if (nand_supports_set_features(chip, ONFI_FEATURE_ADDR_TIMING_MODE)) { if (nand_supports_set_features(chip, ONFI_FEATURE_ADDR_TIMING_MODE)) {
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
ret = nand_set_features(chip, ONFI_FEATURE_ADDR_TIMING_MODE, ret = nand_set_features(chip, ONFI_FEATURE_ADDR_TIMING_MODE,
tmode_param); tmode_param);
chip->select_chip(chip, -1); nand_deselect_target(chip);
if (ret) if (ret)
return ret; return ret;
} }
...@@ -834,10 +869,10 @@ static int nand_setup_data_interface(struct nand_chip *chip, int chipnr) ...@@ -834,10 +869,10 @@ static int nand_setup_data_interface(struct nand_chip *chip, int chipnr)
return 0; return 0;
memset(tmode_param, 0, ONFI_SUBFEATURE_PARAM_LEN); memset(tmode_param, 0, ONFI_SUBFEATURE_PARAM_LEN);
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
ret = nand_get_features(chip, ONFI_FEATURE_ADDR_TIMING_MODE, ret = nand_get_features(chip, ONFI_FEATURE_ADDR_TIMING_MODE,
tmode_param); tmode_param);
chip->select_chip(chip, -1); nand_deselect_target(chip);
if (ret) if (ret)
goto err_reset_chip; goto err_reset_chip;
...@@ -855,9 +890,9 @@ static int nand_setup_data_interface(struct nand_chip *chip, int chipnr) ...@@ -855,9 +890,9 @@ static int nand_setup_data_interface(struct nand_chip *chip, int chipnr)
* timing mode. * timing mode.
*/ */
nand_reset_data_interface(chip, chipnr); nand_reset_data_interface(chip, chipnr);
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
nand_reset_op(chip); nand_reset_op(chip);
chip->select_chip(chip, -1); nand_deselect_target(chip);
return ret; return ret;
} }
...@@ -2345,11 +2380,12 @@ int nand_reset(struct nand_chip *chip, int chipnr) ...@@ -2345,11 +2380,12 @@ int nand_reset(struct nand_chip *chip, int chipnr)
/* /*
* The CS line has to be released before we can apply the new NAND * The CS line has to be released before we can apply the new NAND
* interface settings, hence this weird ->select_chip() dance. * interface settings, hence this weird nand_select_target()
* nand_deselect_target() dance.
*/ */
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
ret = nand_reset_op(chip); ret = nand_reset_op(chip);
chip->select_chip(chip, -1); nand_deselect_target(chip);
if (ret) if (ret)
return ret; return ret;
...@@ -3133,7 +3169,7 @@ static int nand_do_read_ops(struct nand_chip *chip, loff_t from, ...@@ -3133,7 +3169,7 @@ static int nand_do_read_ops(struct nand_chip *chip, loff_t from,
bool ecc_fail = false; bool ecc_fail = false;
chipnr = (int)(from >> chip->chip_shift); chipnr = (int)(from >> chip->chip_shift);
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
realpage = (int)(from >> chip->page_shift); realpage = (int)(from >> chip->page_shift);
page = realpage & chip->pagemask; page = realpage & chip->pagemask;
...@@ -3264,11 +3300,11 @@ static int nand_do_read_ops(struct nand_chip *chip, loff_t from, ...@@ -3264,11 +3300,11 @@ static int nand_do_read_ops(struct nand_chip *chip, loff_t from,
/* Check, if we cross a chip boundary */ /* Check, if we cross a chip boundary */
if (!page) { if (!page) {
chipnr++; chipnr++;
chip->select_chip(chip, -1); nand_deselect_target(chip);
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
} }
} }
chip->select_chip(chip, -1); nand_deselect_target(chip);
ops->retlen = ops->len - (size_t) readlen; ops->retlen = ops->len - (size_t) readlen;
if (oob) if (oob)
...@@ -3465,7 +3501,7 @@ static int nand_do_read_oob(struct nand_chip *chip, loff_t from, ...@@ -3465,7 +3501,7 @@ static int nand_do_read_oob(struct nand_chip *chip, loff_t from,
len = mtd_oobavail(mtd, ops); len = mtd_oobavail(mtd, ops);
chipnr = (int)(from >> chip->chip_shift); chipnr = (int)(from >> chip->chip_shift);
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
/* Shift to get page */ /* Shift to get page */
realpage = (int)(from >> chip->page_shift); realpage = (int)(from >> chip->page_shift);
...@@ -3498,11 +3534,11 @@ static int nand_do_read_oob(struct nand_chip *chip, loff_t from, ...@@ -3498,11 +3534,11 @@ static int nand_do_read_oob(struct nand_chip *chip, loff_t from,
/* Check, if we cross a chip boundary */ /* Check, if we cross a chip boundary */
if (!page) { if (!page) {
chipnr++; chipnr++;
chip->select_chip(chip, -1); nand_deselect_target(chip);
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
} }
} }
chip->select_chip(chip, -1); nand_deselect_target(chip);
ops->oobretlen = ops->ooblen - readlen; ops->oobretlen = ops->ooblen - readlen;
...@@ -3946,7 +3982,7 @@ static int nand_do_write_ops(struct nand_chip *chip, loff_t to, ...@@ -3946,7 +3982,7 @@ static int nand_do_write_ops(struct nand_chip *chip, loff_t to,
column = to & (mtd->writesize - 1); column = to & (mtd->writesize - 1);
chipnr = (int)(to >> chip->chip_shift); chipnr = (int)(to >> chip->chip_shift);
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
/* Check, if it is write protected */ /* Check, if it is write protected */
if (nand_check_wp(chip)) { if (nand_check_wp(chip)) {
...@@ -4022,8 +4058,8 @@ static int nand_do_write_ops(struct nand_chip *chip, loff_t to, ...@@ -4022,8 +4058,8 @@ static int nand_do_write_ops(struct nand_chip *chip, loff_t to,
/* Check, if we cross a chip boundary */ /* Check, if we cross a chip boundary */
if (!page) { if (!page) {
chipnr++; chipnr++;
chip->select_chip(chip, -1); nand_deselect_target(chip);
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
} }
} }
...@@ -4032,7 +4068,7 @@ static int nand_do_write_ops(struct nand_chip *chip, loff_t to, ...@@ -4032,7 +4068,7 @@ static int nand_do_write_ops(struct nand_chip *chip, loff_t to,
ops->oobretlen = ops->ooblen; ops->oobretlen = ops->ooblen;
err_out: err_out:
chip->select_chip(chip, -1); nand_deselect_target(chip);
return ret; return ret;
} }
...@@ -4058,7 +4094,7 @@ static int panic_nand_write(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -4058,7 +4094,7 @@ static int panic_nand_write(struct mtd_info *mtd, loff_t to, size_t len,
/* Grab the device */ /* Grab the device */
panic_nand_get_device(chip, FL_WRITING); panic_nand_get_device(chip, FL_WRITING);
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
/* Wait for the device to get ready */ /* Wait for the device to get ready */
panic_nand_wait(chip, 400); panic_nand_wait(chip, 400);
...@@ -4171,7 +4207,7 @@ int nand_erase_nand(struct nand_chip *chip, struct erase_info *instr, ...@@ -4171,7 +4207,7 @@ int nand_erase_nand(struct nand_chip *chip, struct erase_info *instr,
pages_per_block = 1 << (chip->phys_erase_shift - chip->page_shift); pages_per_block = 1 << (chip->phys_erase_shift - chip->page_shift);
/* Select the NAND device */ /* Select the NAND device */
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
/* Check, if it is write protected */ /* Check, if it is write protected */
if (nand_check_wp(chip)) { if (nand_check_wp(chip)) {
...@@ -4225,8 +4261,8 @@ int nand_erase_nand(struct nand_chip *chip, struct erase_info *instr, ...@@ -4225,8 +4261,8 @@ int nand_erase_nand(struct nand_chip *chip, struct erase_info *instr,
/* Check, if we cross a chip boundary */ /* Check, if we cross a chip boundary */
if (len && !(page & chip->pagemask)) { if (len && !(page & chip->pagemask)) {
chipnr++; chipnr++;
chip->select_chip(chip, -1); nand_deselect_target(chip);
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
} }
} }
...@@ -4234,7 +4270,7 @@ int nand_erase_nand(struct nand_chip *chip, struct erase_info *instr, ...@@ -4234,7 +4270,7 @@ int nand_erase_nand(struct nand_chip *chip, struct erase_info *instr,
erase_exit: erase_exit:
/* Deselect and wake up anyone waiting on the device */ /* Deselect and wake up anyone waiting on the device */
chip->select_chip(chip, -1); nand_deselect_target(chip);
nand_release_device(chip); nand_release_device(chip);
/* Return more or less happy */ /* Return more or less happy */
...@@ -4272,11 +4308,11 @@ static int nand_block_isbad(struct mtd_info *mtd, loff_t offs) ...@@ -4272,11 +4308,11 @@ static int nand_block_isbad(struct mtd_info *mtd, loff_t offs)
/* Select the NAND device */ /* Select the NAND device */
nand_get_device(chip, FL_READING); nand_get_device(chip, FL_READING);
chip->select_chip(chip, chipnr); nand_select_target(chip, chipnr);
ret = nand_block_checkbad(chip, offs, 0); ret = nand_block_checkbad(chip, offs, 0);
chip->select_chip(chip, -1); nand_deselect_target(chip);
nand_release_device(chip); nand_release_device(chip);
return ret; return ret;
...@@ -4645,7 +4681,7 @@ static int nand_detect(struct nand_chip *chip, struct nand_flash_dev *type) ...@@ -4645,7 +4681,7 @@ static int nand_detect(struct nand_chip *chip, struct nand_flash_dev *type)
return ret; return ret;
/* Select the device */ /* Select the device */
chip->select_chip(chip, 0); nand_select_target(chip, 0);
/* Send the command for reading device ID */ /* Send the command for reading device ID */
ret = nand_readid_op(chip, 0, id_data, 2); ret = nand_readid_op(chip, 0, id_data, 2);
...@@ -4989,6 +5025,12 @@ static int nand_scan_ident(struct nand_chip *chip, unsigned int maxchips, ...@@ -4989,6 +5025,12 @@ static int nand_scan_ident(struct nand_chip *chip, unsigned int maxchips,
if (ret) if (ret)
return ret; return ret;
/*
* Start with chips->numchips = maxchips to let nand_select_target() do
* its job. chip->numchips will be adjusted after.
*/
chip->numchips = maxchips;
/* Set the default functions */ /* Set the default functions */
nand_set_defaults(chip); nand_set_defaults(chip);
...@@ -4997,14 +5039,14 @@ static int nand_scan_ident(struct nand_chip *chip, unsigned int maxchips, ...@@ -4997,14 +5039,14 @@ static int nand_scan_ident(struct nand_chip *chip, unsigned int maxchips,
if (ret) { if (ret) {
if (!(chip->options & NAND_SCAN_SILENT_NODEV)) if (!(chip->options & NAND_SCAN_SILENT_NODEV))
pr_warn("No NAND device found\n"); pr_warn("No NAND device found\n");
chip->select_chip(chip, -1); nand_deselect_target(chip);
return ret; return ret;
} }
nand_maf_id = chip->id.data[0]; nand_maf_id = chip->id.data[0];
nand_dev_id = chip->id.data[1]; nand_dev_id = chip->id.data[1];
chip->select_chip(chip, -1); nand_deselect_target(chip);
/* Check for a chip array */ /* Check for a chip array */
for (i = 1; i < maxchips; i++) { for (i = 1; i < maxchips; i++) {
...@@ -5013,15 +5055,15 @@ static int nand_scan_ident(struct nand_chip *chip, unsigned int maxchips, ...@@ -5013,15 +5055,15 @@ static int nand_scan_ident(struct nand_chip *chip, unsigned int maxchips,
/* See comment in nand_get_flash_type for reset */ /* See comment in nand_get_flash_type for reset */
nand_reset(chip, i); nand_reset(chip, i);
chip->select_chip(chip, i); nand_select_target(chip, i);
/* Send the command for reading device ID */ /* Send the command for reading device ID */
nand_readid_op(chip, 0, id, sizeof(id)); nand_readid_op(chip, 0, id, sizeof(id));
/* Read manufacturer and device IDs */ /* Read manufacturer and device IDs */
if (nand_maf_id != id[0] || nand_dev_id != id[1]) { if (nand_maf_id != id[0] || nand_dev_id != id[1]) {
chip->select_chip(chip, -1); nand_deselect_target(chip);
break; break;
} }
chip->select_chip(chip, -1); nand_deselect_target(chip);
} }
if (i > 1) if (i > 1)
pr_info("%d chips detected\n", i); pr_info("%d chips detected\n", i);
...@@ -5447,9 +5489,9 @@ static int nand_scan_tail(struct nand_chip *chip) ...@@ -5447,9 +5489,9 @@ static int nand_scan_tail(struct nand_chip *chip)
* to explictly select the relevant die when interacting with the NAND * to explictly select the relevant die when interacting with the NAND
* chip. * chip.
*/ */
chip->select_chip(chip, 0); nand_select_target(chip, 0);
ret = nand_manufacturer_init(chip); ret = nand_manufacturer_init(chip);
chip->select_chip(chip, -1); nand_deselect_target(chip);
if (ret) if (ret)
goto err_free_buf; goto err_free_buf;
......
...@@ -1045,9 +1045,9 @@ static int r852_resume(struct device *device) ...@@ -1045,9 +1045,9 @@ static int r852_resume(struct device *device)
/* Otherwise, initialize the card */ /* Otherwise, initialize the card */
if (dev->card_registered) { if (dev->card_registered) {
r852_engine_enable(dev); r852_engine_enable(dev);
dev->chip->select_chip(dev->chip, 0); nand_select_target(dev->chip, 0);
nand_reset_op(dev->chip); nand_reset_op(dev->chip);
dev->chip->select_chip(dev->chip, -1); nand_deselect_target(dev->chip);
} }
/* Program card detection IRQ */ /* Program card detection IRQ */
......
...@@ -1332,9 +1332,12 @@ void nand_release(struct nand_chip *chip); ...@@ -1332,9 +1332,12 @@ void nand_release(struct nand_chip *chip);
* instruction and have no physical pin to check it. * instruction and have no physical pin to check it.
*/ */
int nand_soft_waitrdy(struct nand_chip *chip, unsigned long timeout_ms); int nand_soft_waitrdy(struct nand_chip *chip, unsigned long timeout_ms);
struct gpio_desc; struct gpio_desc;
int nand_gpio_waitrdy(struct nand_chip *chip, struct gpio_desc *gpiod, int nand_gpio_waitrdy(struct nand_chip *chip, struct gpio_desc *gpiod,
unsigned long timeout_ms); unsigned long timeout_ms);
/* Select/deselect a NAND target. */
void nand_select_target(struct nand_chip *chip, unsigned int cs);
void nand_deselect_target(struct nand_chip *chip);
#endif /* __LINUX_MTD_RAWNAND_H */ #endif /* __LINUX_MTD_RAWNAND_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment