Lines Matching refs:nand_chip

144 	struct nand_chip *nand_chip = mtd_to_nand(mtd);  in lpc32xx_ooblayout_ecc()  local
146 if (section >= nand_chip->ecc.steps) in lpc32xx_ooblayout_ecc()
149 oobregion->offset = ((section + 1) * 16) - nand_chip->ecc.bytes; in lpc32xx_ooblayout_ecc()
150 oobregion->length = nand_chip->ecc.bytes; in lpc32xx_ooblayout_ecc()
158 struct nand_chip *nand_chip = mtd_to_nand(mtd); in lpc32xx_ooblayout_free() local
160 if (section >= nand_chip->ecc.steps) in lpc32xx_ooblayout_free()
164 oobregion->length = 16 - nand_chip->ecc.bytes; in lpc32xx_ooblayout_free()
188 struct nand_chip nand_chip; member
292 struct nand_chip *nand_chip = mtd_to_nand(mtd); in lpc32xx_nand_cmd_ctrl() local
293 struct lpc32xx_nand_host *host = nand_get_controller_data(nand_chip); in lpc32xx_nand_cmd_ctrl()
308 struct nand_chip *nand_chip = mtd_to_nand(mtd); in lpc32xx_nand_device_ready() local
309 struct lpc32xx_nand_host *host = nand_get_controller_data(nand_chip); in lpc32xx_nand_device_ready()
333 static int lpc32xx_waitfunc_nand(struct mtd_info *mtd, struct nand_chip *chip) in lpc32xx_waitfunc_nand()
353 struct nand_chip *chip) in lpc32xx_waitfunc_controller()
372 static int lpc32xx_waitfunc(struct mtd_info *mtd, struct nand_chip *chip) in lpc32xx_waitfunc()
406 struct nand_chip *chip = mtd_to_nand(mtd); in lpc32xx_xmit_dma()
445 static int lpc32xx_read_page(struct mtd_info *mtd, struct nand_chip *chip, in lpc32xx_read_page()
511 struct nand_chip *chip, in lpc32xx_write_page_lowlevel()
560 static int lpc32xx_read_oob(struct mtd_info *mtd, struct nand_chip *chip, in lpc32xx_read_oob()
571 static int lpc32xx_write_oob(struct mtd_info *mtd, struct nand_chip *chip, in lpc32xx_write_oob()
586 struct mtd_info *mtd = nand_to_mtd(&host->nand_chip); in lpc32xx_dma_setup()
657 static int lpc32xx_nand_attach_chip(struct nand_chip *chip) in lpc32xx_nand_attach_chip()
690 struct nand_chip *nand_chip; in lpc32xx_nand_probe() local
708 nand_chip = &host->nand_chip; in lpc32xx_nand_probe()
709 mtd = nand_to_mtd(nand_chip); in lpc32xx_nand_probe()
729 nand_set_controller_data(nand_chip, host); in lpc32xx_nand_probe()
730 nand_set_flash_node(nand_chip, pdev->dev.of_node); in lpc32xx_nand_probe()
744 nand_chip->cmd_ctrl = lpc32xx_nand_cmd_ctrl; in lpc32xx_nand_probe()
745 nand_chip->dev_ready = lpc32xx_nand_device_ready; in lpc32xx_nand_probe()
746 nand_chip->chip_delay = 25; /* us */ in lpc32xx_nand_probe()
747 nand_chip->IO_ADDR_R = MLC_DATA(host->io_base); in lpc32xx_nand_probe()
748 nand_chip->IO_ADDR_W = MLC_DATA(host->io_base); in lpc32xx_nand_probe()
756 nand_chip->ecc.hwctl = lpc32xx_ecc_enable; in lpc32xx_nand_probe()
757 nand_chip->ecc.read_page_raw = lpc32xx_read_page; in lpc32xx_nand_probe()
758 nand_chip->ecc.read_page = lpc32xx_read_page; in lpc32xx_nand_probe()
759 nand_chip->ecc.write_page_raw = lpc32xx_write_page_lowlevel; in lpc32xx_nand_probe()
760 nand_chip->ecc.write_page = lpc32xx_write_page_lowlevel; in lpc32xx_nand_probe()
761 nand_chip->ecc.write_oob = lpc32xx_write_oob; in lpc32xx_nand_probe()
762 nand_chip->ecc.read_oob = lpc32xx_read_oob; in lpc32xx_nand_probe()
763 nand_chip->ecc.strength = 4; in lpc32xx_nand_probe()
764 nand_chip->ecc.bytes = 10; in lpc32xx_nand_probe()
765 nand_chip->waitfunc = lpc32xx_waitfunc; in lpc32xx_nand_probe()
767 nand_chip->options = NAND_NO_SUBPAGE_WRITE; in lpc32xx_nand_probe()
768 nand_chip->bbt_options = NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB; in lpc32xx_nand_probe()
769 nand_chip->bbt_td = &lpc32xx_nand_bbt; in lpc32xx_nand_probe()
770 nand_chip->bbt_md = &lpc32xx_nand_bbt_mirror; in lpc32xx_nand_probe()
804 nand_chip->dummy_controller.ops = &lpc32xx_nand_controller_ops; in lpc32xx_nand_probe()
819 nand_cleanup(nand_chip); in lpc32xx_nand_probe()
842 struct mtd_info *mtd = nand_to_mtd(&host->nand_chip); in lpc32xx_nand_remove()