mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
mtd: rawnand: Deprecate ->{read, write}_{byte, buf}() hooks
All those hooks have been replaced by ->exec_op(). Move them to the nand_legacy struct. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
1 parent
82fc509974
commit
716bbbabcc
42 files changed
+200
-200
No files matched your search
@@ -210,9 +210,9 @@ static int ams_delta_init(struct platform_device *pdev)
|
||||
/* Set address of NAND IO lines */
|
||||
this->legacy.IO_ADDR_R = io_base + OMAP_MPUIO_INPUT_LATCH;
|
||||
this->legacy.IO_ADDR_W = io_base + OMAP_MPUIO_OUTPUT;
|
||||
this->read_byte = ams_delta_read_byte;
|
||||
this->write_buf = ams_delta_write_buf;
|
||||
this->read_buf = ams_delta_read_buf;
|
||||
this->legacy.read_byte = ams_delta_read_byte;
|
||||
this->legacy.write_buf = ams_delta_write_buf;
|
||||
this->legacy.read_buf = ams_delta_read_buf;
|
||||
this->cmd_ctrl = ams_delta_hwcontrol;
|
||||
if (gpio_request(AMS_DELTA_GPIO_PIN_NAND_RB, "nand_rdy") == 0) {
|
||||
this->dev_ready = ams_delta_nand_ready;
|
||||
|
||||
@@ -1473,10 +1473,10 @@ static void atmel_nand_init(struct atmel_nand_controller *nc,
|
||||
nand->base.controller = &nc->base;
|
||||
|
||||
chip->cmd_ctrl = atmel_nand_cmd_ctrl;
|
||||
chip->read_byte = atmel_nand_read_byte;
|
||||
chip->write_byte = atmel_nand_write_byte;
|
||||
chip->read_buf = atmel_nand_read_buf;
|
||||
chip->write_buf = atmel_nand_write_buf;
|
||||
chip->legacy.read_byte = atmel_nand_read_byte;
|
||||
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;
|
||||
|
||||
if (nc->mck && nc->caps->ops->setup_data_interface)
|
||||
|
||||
@@ -440,10 +440,10 @@ static int au1550nd_probe(struct platform_device *pdev)
|
||||
if (pd->devwidth)
|
||||
this->options |= NAND_BUSWIDTH_16;
|
||||
|
||||
this->read_byte = (pd->devwidth) ? au_read_byte16 : au_read_byte;
|
||||
this->legacy.read_byte = (pd->devwidth) ? au_read_byte16 : au_read_byte;
|
||||
ctx->write_byte = (pd->devwidth) ? au_write_byte16 : au_write_byte;
|
||||
this->write_buf = (pd->devwidth) ? au_write_buf16 : au_write_buf;
|
||||
this->read_buf = (pd->devwidth) ? au_read_buf16 : au_read_buf;
|
||||
this->legacy.write_buf = (pd->devwidth) ? au_write_buf16 : au_write_buf;
|
||||
this->legacy.read_buf = (pd->devwidth) ? au_read_buf16 : au_read_buf;
|
||||
|
||||
ret = nand_scan(this, 1);
|
||||
if (ret) {
|
||||
|
||||
@@ -387,9 +387,9 @@ int bcm47xxnflash_ops_bcm4706_init(struct bcm47xxnflash *b47n)
|
||||
nand_chip->cmd_ctrl = bcm47xxnflash_ops_bcm4706_cmd_ctrl;
|
||||
nand_chip->dev_ready = bcm47xxnflash_ops_bcm4706_dev_ready;
|
||||
b47n->nand_chip.cmdfunc = bcm47xxnflash_ops_bcm4706_cmdfunc;
|
||||
b47n->nand_chip.read_byte = bcm47xxnflash_ops_bcm4706_read_byte;
|
||||
b47n->nand_chip.read_buf = bcm47xxnflash_ops_bcm4706_read_buf;
|
||||
b47n->nand_chip.write_buf = bcm47xxnflash_ops_bcm4706_write_buf;
|
||||
b47n->nand_chip.legacy.read_byte = bcm47xxnflash_ops_bcm4706_read_byte;
|
||||
b47n->nand_chip.legacy.read_buf = bcm47xxnflash_ops_bcm4706_read_buf;
|
||||
b47n->nand_chip.legacy.write_buf = bcm47xxnflash_ops_bcm4706_write_buf;
|
||||
b47n->nand_chip.set_features = nand_get_set_features_notsupp;
|
||||
b47n->nand_chip.get_features = nand_get_set_features_notsupp;
|
||||
|
||||
|
||||
@@ -2273,9 +2273,9 @@ static int brcmnand_init_cs(struct brcmnand_host *host, struct device_node *dn)
|
||||
chip->cmd_ctrl = brcmnand_cmd_ctrl;
|
||||
chip->cmdfunc = brcmnand_cmdfunc;
|
||||
chip->waitfunc = brcmnand_waitfunc;
|
||||
chip->read_byte = brcmnand_read_byte;
|
||||
chip->read_buf = brcmnand_read_buf;
|
||||
chip->write_buf = brcmnand_write_buf;
|
||||
chip->legacy.read_byte = brcmnand_read_byte;
|
||||
chip->legacy.read_buf = brcmnand_read_buf;
|
||||
chip->legacy.write_buf = brcmnand_write_buf;
|
||||
|
||||
chip->ecc.mode = NAND_ECC_HW;
|
||||
chip->ecc.read_page = brcmnand_read_page;
|
||||
|
||||
@@ -378,7 +378,7 @@ static int cafe_nand_read_page(struct nand_chip *chip, uint8_t *buf,
|
||||
cafe_readl(cafe, NAND_ECC_SYN01));
|
||||
|
||||
nand_read_page_op(chip, page, 0, buf, mtd->writesize);
|
||||
chip->read_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
chip->legacy.read_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
|
||||
if (checkecc && cafe_readl(cafe, NAND_ECC_RESULT) & (1<<18)) {
|
||||
unsigned short syn[8], pat[4];
|
||||
@@ -537,7 +537,7 @@ static int cafe_nand_write_page_lowlevel(struct nand_chip *chip,
|
||||
struct cafe_priv *cafe = nand_get_controller_data(chip);
|
||||
|
||||
nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize);
|
||||
chip->write_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
chip->legacy.write_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
|
||||
/* Set up ECC autogeneration */
|
||||
cafe->ctl2 |= (1<<30);
|
||||
@@ -705,9 +705,9 @@ static int cafe_nand_probe(struct pci_dev *pdev,
|
||||
|
||||
cafe->nand.cmdfunc = cafe_nand_cmdfunc;
|
||||
cafe->nand.dev_ready = cafe_device_ready;
|
||||
cafe->nand.read_byte = cafe_read_byte;
|
||||
cafe->nand.read_buf = cafe_read_buf;
|
||||
cafe->nand.write_buf = cafe_write_buf;
|
||||
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.set_features = nand_get_set_features_notsupp;
|
||||
cafe->nand.get_features = nand_get_set_features_notsupp;
|
||||
|
||||
@@ -184,9 +184,9 @@ static int __init cmx270_init(void)
|
||||
this->ecc.algo = NAND_ECC_HAMMING;
|
||||
|
||||
/* read/write functions */
|
||||
this->read_byte = cmx270_read_byte;
|
||||
this->read_buf = cmx270_read_buf;
|
||||
this->write_buf = cmx270_write_buf;
|
||||
this->legacy.read_byte = cmx270_read_byte;
|
||||
this->legacy.read_buf = cmx270_read_buf;
|
||||
this->legacy.write_buf = cmx270_write_buf;
|
||||
|
||||
/* Scan to find existence of the device */
|
||||
ret = nand_scan(this, 1);
|
||||
|
||||
@@ -208,9 +208,9 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr)
|
||||
|
||||
this->cmd_ctrl = cs553x_hwcontrol;
|
||||
this->dev_ready = cs553x_device_ready;
|
||||
this->read_byte = cs553x_read_byte;
|
||||
this->read_buf = cs553x_read_buf;
|
||||
this->write_buf = cs553x_write_buf;
|
||||
this->legacy.read_byte = cs553x_read_byte;
|
||||
this->legacy.read_buf = cs553x_read_buf;
|
||||
this->legacy.write_buf = cs553x_write_buf;
|
||||
|
||||
this->chip_delay = 0;
|
||||
|
||||
|
||||
@@ -785,8 +785,8 @@ static int nand_davinci_probe(struct platform_device *pdev)
|
||||
info->chip.dev_ready = nand_davinci_dev_ready;
|
||||
|
||||
/* Speed up buffer I/O */
|
||||
info->chip.read_buf = nand_davinci_read_buf;
|
||||
info->chip.write_buf = nand_davinci_write_buf;
|
||||
info->chip.legacy.read_buf = nand_davinci_read_buf;
|
||||
info->chip.legacy.write_buf = nand_davinci_write_buf;
|
||||
|
||||
/* Use board-specific ECC config */
|
||||
info->chip.ecc.mode = pdata->ecc_mode;
|
||||
|
||||
@@ -1262,11 +1262,11 @@ static int denali_attach_chip(struct nand_chip *chip)
|
||||
mtd_set_ooblayout(mtd, &denali_ooblayout_ops);
|
||||
|
||||
if (chip->options & NAND_BUSWIDTH_16) {
|
||||
chip->read_buf = denali_read_buf16;
|
||||
chip->write_buf = denali_write_buf16;
|
||||
chip->legacy.read_buf = denali_read_buf16;
|
||||
chip->legacy.write_buf = denali_write_buf16;
|
||||
} else {
|
||||
chip->read_buf = denali_read_buf;
|
||||
chip->write_buf = denali_write_buf;
|
||||
chip->legacy.read_buf = denali_read_buf;
|
||||
chip->legacy.write_buf = denali_write_buf;
|
||||
}
|
||||
chip->ecc.read_page = denali_read_page;
|
||||
chip->ecc.read_page_raw = denali_read_page_raw;
|
||||
@@ -1343,8 +1343,8 @@ int denali_init(struct denali_nand_info *denali)
|
||||
mtd->name = "denali-nand";
|
||||
|
||||
chip->select_chip = denali_select_chip;
|
||||
chip->read_byte = denali_read_byte;
|
||||
chip->write_byte = denali_write_byte;
|
||||
chip->legacy.read_byte = denali_read_byte;
|
||||
chip->legacy.write_byte = denali_write_byte;
|
||||
chip->cmd_ctrl = denali_cmd_ctrl;
|
||||
chip->dev_ready = denali_dev_ready;
|
||||
chip->waitfunc = denali_waitfunc;
|
||||
|
||||
@@ -382,8 +382,8 @@ static uint16_t __init doc200x_ident_chip(struct mtd_info *mtd, int nr)
|
||||
*/
|
||||
udelay(50);
|
||||
|
||||
ret = this->read_byte(this) << 8;
|
||||
ret |= this->read_byte(this);
|
||||
ret = this->legacy.read_byte(this) << 8;
|
||||
ret |= this->legacy.read_byte(this);
|
||||
|
||||
if (doc->ChipID == DOC_ChipID_Doc2k && try_dword && !nr) {
|
||||
/* First chip probe. See if we get same results by 32-bit access */
|
||||
@@ -404,7 +404,7 @@ static uint16_t __init doc200x_ident_chip(struct mtd_info *mtd, int nr)
|
||||
ident.dword = readl(docptr + DoC_2k_CDSN_IO);
|
||||
if (((ident.byte[0] << 8) | ident.byte[1]) == ret) {
|
||||
pr_info("DiskOnChip 2000 responds to DWORD access\n");
|
||||
this->read_buf = &doc2000_readbuf_dword;
|
||||
this->legacy.read_buf = &doc2000_readbuf_dword;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,7 +442,7 @@ static int doc200x_wait(struct nand_chip *this)
|
||||
DoC_WaitReady(doc);
|
||||
nand_status_op(this, NULL);
|
||||
DoC_WaitReady(doc);
|
||||
status = (int)this->read_byte(this);
|
||||
status = (int)this->legacy.read_byte(this);
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -721,7 +721,7 @@ static void doc2001plus_command(struct nand_chip *this, unsigned command,
|
||||
WriteDOC(NAND_CMD_STATUS, docptr, Mplus_FlashCmd);
|
||||
WriteDOC(0, docptr, Mplus_WritePipeTerm);
|
||||
WriteDOC(0, docptr, Mplus_WritePipeTerm);
|
||||
while (!(this->read_byte(this) & 0x40)) ;
|
||||
while (!(this->legacy.read_byte(this) & 0x40)) ;
|
||||
return;
|
||||
|
||||
/* This applies to read commands */
|
||||
@@ -1339,9 +1339,9 @@ static inline int __init doc2000_init(struct mtd_info *mtd)
|
||||
struct nand_chip *this = mtd_to_nand(mtd);
|
||||
struct doc_priv *doc = nand_get_controller_data(this);
|
||||
|
||||
this->read_byte = doc2000_read_byte;
|
||||
this->write_buf = doc2000_writebuf;
|
||||
this->read_buf = doc2000_readbuf;
|
||||
this->legacy.read_byte = doc2000_read_byte;
|
||||
this->legacy.write_buf = doc2000_writebuf;
|
||||
this->legacy.read_buf = doc2000_readbuf;
|
||||
doc->late_init = nftl_scan_bbt;
|
||||
|
||||
doc->CDSNControl = CDSN_CTRL_FLASH_IO | CDSN_CTRL_ECC_IO;
|
||||
@@ -1355,9 +1355,9 @@ static inline int __init doc2001_init(struct mtd_info *mtd)
|
||||
struct nand_chip *this = mtd_to_nand(mtd);
|
||||
struct doc_priv *doc = nand_get_controller_data(this);
|
||||
|
||||
this->read_byte = doc2001_read_byte;
|
||||
this->write_buf = doc2001_writebuf;
|
||||
this->read_buf = doc2001_readbuf;
|
||||
this->legacy.read_byte = doc2001_read_byte;
|
||||
this->legacy.write_buf = doc2001_writebuf;
|
||||
this->legacy.read_buf = doc2001_readbuf;
|
||||
|
||||
ReadDOC(doc->virtadr, ChipID);
|
||||
ReadDOC(doc->virtadr, ChipID);
|
||||
@@ -1385,9 +1385,9 @@ static inline int __init doc2001plus_init(struct mtd_info *mtd)
|
||||
struct nand_chip *this = mtd_to_nand(mtd);
|
||||
struct doc_priv *doc = nand_get_controller_data(this);
|
||||
|
||||
this->read_byte = doc2001plus_read_byte;
|
||||
this->write_buf = doc2001plus_writebuf;
|
||||
this->read_buf = doc2001plus_readbuf;
|
||||
this->legacy.read_byte = doc2001plus_read_byte;
|
||||
this->legacy.write_buf = doc2001plus_writebuf;
|
||||
this->legacy.read_buf = doc2001plus_readbuf;
|
||||
doc->late_init = inftl_scan_bbt;
|
||||
this->cmd_ctrl = NULL;
|
||||
this->select_chip = doc2001plus_select_chip;
|
||||
|
||||
@@ -776,9 +776,9 @@ static int fsl_elbc_chip_init(struct fsl_elbc_mtd *priv)
|
||||
|
||||
/* fill in nand_chip structure */
|
||||
/* set up function call table */
|
||||
chip->read_byte = fsl_elbc_read_byte;
|
||||
chip->write_buf = fsl_elbc_write_buf;
|
||||
chip->read_buf = fsl_elbc_read_buf;
|
||||
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->cmdfunc = fsl_elbc_cmdfunc;
|
||||
chip->waitfunc = fsl_elbc_wait;
|
||||
|
||||
@@ -858,12 +858,12 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
|
||||
/* set up function call table */
|
||||
if ((ifc_in32(&ifc_global->cspr_cs[priv->bank].cspr))
|
||||
& CSPR_PORT_SIZE_16)
|
||||
chip->read_byte = fsl_ifc_read_byte16;
|
||||
chip->legacy.read_byte = fsl_ifc_read_byte16;
|
||||
else
|
||||
chip->read_byte = fsl_ifc_read_byte;
|
||||
chip->legacy.read_byte = fsl_ifc_read_byte;
|
||||
|
||||
chip->write_buf = fsl_ifc_write_buf;
|
||||
chip->read_buf = fsl_ifc_read_buf;
|
||||
chip->legacy.write_buf = fsl_ifc_write_buf;
|
||||
chip->legacy.read_buf = fsl_ifc_read_buf;
|
||||
chip->select_chip = fsl_ifc_select_chip;
|
||||
chip->cmdfunc = fsl_ifc_cmdfunc;
|
||||
chip->waitfunc = fsl_ifc_wait;
|
||||
@@ -881,10 +881,10 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
|
||||
|
||||
if (ifc_in32(&ifc_global->cspr_cs[priv->bank].cspr)
|
||||
& CSPR_PORT_SIZE_16) {
|
||||
chip->read_byte = fsl_ifc_read_byte16;
|
||||
chip->legacy.read_byte = fsl_ifc_read_byte16;
|
||||
chip->options |= NAND_BUSWIDTH_16;
|
||||
} else {
|
||||
chip->read_byte = fsl_ifc_read_byte;
|
||||
chip->legacy.read_byte = fsl_ifc_read_byte;
|
||||
}
|
||||
|
||||
chip->controller = &ifc_nand_ctrl->controller;
|
||||
|
||||
@@ -164,9 +164,9 @@ static int fun_chip_init(struct fsl_upm_nand *fun,
|
||||
fun->chip.legacy.IO_ADDR_W = fun->io_base;
|
||||
fun->chip.cmd_ctrl = fun_cmd_ctrl;
|
||||
fun->chip.chip_delay = fun->chip_delay;
|
||||
fun->chip.read_byte = fun_read_byte;
|
||||
fun->chip.read_buf = fun_read_buf;
|
||||
fun->chip.write_buf = fun_write_buf;
|
||||
fun->chip.legacy.read_byte = fun_read_byte;
|
||||
fun->chip.legacy.read_buf = fun_read_buf;
|
||||
fun->chip.legacy.write_buf = fun_write_buf;
|
||||
fun->chip.ecc.mode = NAND_ECC_SOFT;
|
||||
fun->chip.ecc.algo = NAND_ECC_HAMMING;
|
||||
if (fun->mchip_count > 1)
|
||||
|
||||
@@ -1330,7 +1330,7 @@ static int gpmi_ecc_read_oob(struct nand_chip *chip, int page)
|
||||
|
||||
/* Read out the conventional OOB. */
|
||||
nand_read_page_op(chip, page, mtd->writesize, NULL, 0);
|
||||
chip->read_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
chip->legacy.read_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
|
||||
/*
|
||||
* Now, we want to make sure the block mark is correct. In the
|
||||
@@ -1340,7 +1340,7 @@ static int gpmi_ecc_read_oob(struct nand_chip *chip, int page)
|
||||
if (GPMI_IS_MX23(this)) {
|
||||
/* Read the block mark into the first byte of the OOB buffer. */
|
||||
nand_read_page_op(chip, page, 0, NULL, 0);
|
||||
chip->oob_poi[0] = chip->read_byte(chip);
|
||||
chip->oob_poi[0] = chip->legacy.read_byte(chip);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1628,7 +1628,7 @@ static int mx23_check_transcription_stamp(struct gpmi_nand_data *this)
|
||||
* and starts in the 12th byte of the page.
|
||||
*/
|
||||
nand_read_page_op(chip, page, 12, NULL, 0);
|
||||
chip->read_buf(chip, buffer, strlen(fingerprint));
|
||||
chip->legacy.read_buf(chip, buffer, strlen(fingerprint));
|
||||
|
||||
/* Look for the fingerprint. */
|
||||
if (!memcmp(buffer, fingerprint, strlen(fingerprint))) {
|
||||
@@ -1764,7 +1764,7 @@ static int mx23_boot_init(struct gpmi_nand_data *this)
|
||||
/* Send the command to read the conventional block mark. */
|
||||
chip->select_chip(chip, chipnr);
|
||||
nand_read_page_op(chip, page, mtd->writesize, NULL, 0);
|
||||
block_mark = chip->read_byte(chip);
|
||||
block_mark = chip->legacy.read_byte(chip);
|
||||
chip->select_chip(chip, -1);
|
||||
|
||||
/*
|
||||
@@ -1904,9 +1904,9 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
|
||||
chip->setup_data_interface = gpmi_setup_data_interface;
|
||||
chip->cmd_ctrl = gpmi_cmd_ctrl;
|
||||
chip->dev_ready = gpmi_dev_ready;
|
||||
chip->read_byte = gpmi_read_byte;
|
||||
chip->read_buf = gpmi_read_buf;
|
||||
chip->write_buf = gpmi_write_buf;
|
||||
chip->legacy.read_byte = gpmi_read_byte;
|
||||
chip->legacy.read_buf = gpmi_read_buf;
|
||||
chip->legacy.write_buf = gpmi_write_buf;
|
||||
chip->badblock_pattern = &gpmi_bbt_descr;
|
||||
chip->block_markbad = gpmi_block_markbad;
|
||||
chip->options |= NAND_NO_SUBPAGE_WRITE;
|
||||
|
||||
@@ -533,7 +533,7 @@ static int hisi_nand_read_page_hwecc(struct nand_chip *chip, uint8_t *buf,
|
||||
int stat_1, stat_2;
|
||||
|
||||
nand_read_page_op(chip, page, 0, buf, mtd->writesize);
|
||||
chip->read_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
chip->legacy.read_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
|
||||
/* errors which can not be corrected by ECC */
|
||||
if (host->irq_status & HINFC504_INTS_UE) {
|
||||
@@ -581,7 +581,7 @@ static int hisi_nand_write_page_hwecc(struct nand_chip *chip,
|
||||
|
||||
nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize);
|
||||
if (oob_required)
|
||||
chip->write_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
chip->legacy.write_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
|
||||
return nand_prog_page_end_op(chip);
|
||||
}
|
||||
@@ -784,9 +784,9 @@ static int hisi_nfc_probe(struct platform_device *pdev)
|
||||
nand_set_flash_node(chip, np);
|
||||
chip->cmdfunc = hisi_nfc_cmdfunc;
|
||||
chip->select_chip = hisi_nfc_select_chip;
|
||||
chip->read_byte = hisi_nfc_read_byte;
|
||||
chip->write_buf = hisi_nfc_write_buf;
|
||||
chip->read_buf = hisi_nfc_read_buf;
|
||||
chip->legacy.read_byte = hisi_nfc_read_byte;
|
||||
chip->legacy.write_buf = hisi_nfc_write_buf;
|
||||
chip->legacy.read_buf = hisi_nfc_read_buf;
|
||||
chip->chip_delay = HINFC504_CHIP_DELAY;
|
||||
chip->set_features = nand_get_set_features_notsupp;
|
||||
chip->get_features = nand_get_set_features_notsupp;
|
||||
|
||||
@@ -624,7 +624,7 @@ static int lpc32xx_nand_read_page_syndrome(struct nand_chip *chip, uint8_t *buf,
|
||||
status = lpc32xx_xfer(mtd, buf, chip->ecc.steps, 1);
|
||||
|
||||
/* Get OOB data */
|
||||
chip->read_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
chip->legacy.read_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
|
||||
/* Convert to stored ECC format */
|
||||
lpc32xx_slc_ecc_copy(tmpecc, (uint32_t *) host->ecc_buf, chip->ecc.steps);
|
||||
@@ -665,8 +665,8 @@ static int lpc32xx_nand_read_page_raw_syndrome(struct nand_chip *chip,
|
||||
nand_read_page_op(chip, page, 0, NULL, 0);
|
||||
|
||||
/* Raw reads can just use the FIFO interface */
|
||||
chip->read_buf(chip, buf, chip->ecc.size * chip->ecc.steps);
|
||||
chip->read_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
chip->legacy.read_buf(chip, buf, chip->ecc.size * chip->ecc.steps);
|
||||
chip->legacy.read_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -704,7 +704,7 @@ static int lpc32xx_nand_write_page_syndrome(struct nand_chip *chip,
|
||||
lpc32xx_slc_ecc_copy(pb, (uint32_t *)host->ecc_buf, chip->ecc.steps);
|
||||
|
||||
/* Write ECC data to device */
|
||||
chip->write_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
chip->legacy.write_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
|
||||
return nand_prog_page_end_op(chip);
|
||||
}
|
||||
@@ -722,7 +722,7 @@ static int lpc32xx_nand_write_page_raw_syndrome(struct nand_chip *chip,
|
||||
/* Raw writes can just use the FIFO interface */
|
||||
nand_prog_page_begin_op(chip, page, 0, buf,
|
||||
chip->ecc.size * chip->ecc.steps);
|
||||
chip->write_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
chip->legacy.write_buf(chip, chip->oob_poi, mtd->oobsize);
|
||||
|
||||
return nand_prog_page_end_op(chip);
|
||||
}
|
||||
@@ -891,9 +891,9 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
|
||||
|
||||
/* NAND callbacks for LPC32xx SLC hardware */
|
||||
chip->ecc.mode = NAND_ECC_HW_SYNDROME;
|
||||
chip->read_byte = lpc32xx_nand_read_byte;
|
||||
chip->read_buf = lpc32xx_nand_read_buf;
|
||||
chip->write_buf = lpc32xx_nand_write_buf;
|
||||
chip->legacy.read_byte = lpc32xx_nand_read_byte;
|
||||
chip->legacy.read_buf = lpc32xx_nand_read_buf;
|
||||
chip->legacy.write_buf = lpc32xx_nand_write_buf;
|
||||
chip->ecc.read_page_raw = lpc32xx_nand_read_page_raw_syndrome;
|
||||
chip->ecc.read_page = lpc32xx_nand_read_page_syndrome;
|
||||
chip->ecc.write_page_raw = lpc32xx_nand_write_page_raw_syndrome;
|
||||
|
||||
@@ -694,9 +694,9 @@ static int mpc5121_nfc_probe(struct platform_device *op)
|
||||
mtd->name = "MPC5121 NAND";
|
||||
chip->dev_ready = mpc5121_nfc_dev_ready;
|
||||
chip->cmdfunc = mpc5121_nfc_command;
|
||||
chip->read_byte = mpc5121_nfc_read_byte;
|
||||
chip->read_buf = mpc5121_nfc_read_buf;
|
||||
chip->write_buf = mpc5121_nfc_write_buf;
|
||||
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->set_features = nand_get_set_features_notsupp;
|
||||
chip->get_features = nand_get_set_features_notsupp;
|
||||
|
||||
@@ -1334,10 +1334,10 @@ static int mtk_nfc_nand_chip_init(struct device *dev, struct mtk_nfc *nfc,
|
||||
nand->options |= NAND_USE_BOUNCE_BUFFER | NAND_SUBPAGE_READ;
|
||||
nand->dev_ready = mtk_nfc_dev_ready;
|
||||
nand->select_chip = mtk_nfc_select_chip;
|
||||
nand->write_byte = mtk_nfc_write_byte;
|
||||
nand->write_buf = mtk_nfc_write_buf;
|
||||
nand->read_byte = mtk_nfc_read_byte;
|
||||
nand->read_buf = mtk_nfc_read_buf;
|
||||
nand->legacy.write_byte = mtk_nfc_write_byte;
|
||||
nand->legacy.write_buf = mtk_nfc_write_buf;
|
||||
nand->legacy.read_byte = mtk_nfc_read_byte;
|
||||
nand->legacy.read_buf = mtk_nfc_read_buf;
|
||||
nand->cmd_ctrl = mtk_nfc_cmd_ctrl;
|
||||
nand->setup_data_interface = mtk_nfc_setup_data_interface;
|
||||
|
||||
|
||||
@@ -1402,7 +1402,7 @@ static int mxc_nand_set_features(struct nand_chip *chip, int addr,
|
||||
host->buf_start = 0;
|
||||
|
||||
for (i = 0; i < ONFI_SUBFEATURE_PARAM_LEN; ++i)
|
||||
chip->write_byte(chip, subfeature_param[i]);
|
||||
chip->legacy.write_byte(chip, subfeature_param[i]);
|
||||
|
||||
memcpy32_toio(host->main_area0, host->data_buf, mtd->writesize);
|
||||
host->devtype_data->send_cmd(host, NAND_CMD_SET_FEATURES, false);
|
||||
@@ -1426,7 +1426,7 @@ static int mxc_nand_get_features(struct nand_chip *chip, int addr,
|
||||
host->buf_start = 0;
|
||||
|
||||
for (i = 0; i < ONFI_SUBFEATURE_PARAM_LEN; ++i)
|
||||
*subfeature_param++ = chip->read_byte(chip);
|
||||
*subfeature_param++ = chip->legacy.read_byte(chip);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1775,9 +1775,9 @@ static int mxcnd_probe(struct platform_device *pdev)
|
||||
nand_set_flash_node(this, pdev->dev.of_node),
|
||||
this->dev_ready = mxc_nand_dev_ready;
|
||||
this->cmdfunc = mxc_nand_command;
|
||||
this->read_byte = mxc_nand_read_byte;
|
||||
this->write_buf = mxc_nand_write_buf;
|
||||
this->read_buf = mxc_nand_read_buf;
|
||||
this->legacy.read_byte = mxc_nand_read_byte;
|
||||
this->legacy.write_buf = mxc_nand_write_buf;
|
||||
this->legacy.read_buf = mxc_nand_read_buf;
|
||||
this->set_features = mxc_nand_set_features;
|
||||
this->get_features = mxc_nand_get_features;
|
||||
|
||||
|
||||
Loaded 20 of 42 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user