Lines Matching refs:nand_chip

132 	struct nand_chip *nand_chip = mtd_to_nand(mtd);  in lpc32xx_ooblayout_ecc()  local
134 if (section >= nand_chip->ecc.steps) in lpc32xx_ooblayout_ecc()
137 oobregion->offset = ((section + 1) * 16) - nand_chip->ecc.bytes; in lpc32xx_ooblayout_ecc()
138 oobregion->length = nand_chip->ecc.bytes; in lpc32xx_ooblayout_ecc()
146 struct nand_chip *nand_chip = mtd_to_nand(mtd); in lpc32xx_ooblayout_free() local
148 if (section >= nand_chip->ecc.steps) in lpc32xx_ooblayout_free()
152 oobregion->length = 16 - nand_chip->ecc.bytes; in lpc32xx_ooblayout_free()
176 struct nand_chip nand_chip; member
278 static void lpc32xx_nand_cmd_ctrl(struct nand_chip *nand_chip, int cmd, in lpc32xx_nand_cmd_ctrl() argument
281 struct lpc32xx_nand_host *host = nand_get_controller_data(nand_chip); in lpc32xx_nand_cmd_ctrl()
294 static int lpc32xx_nand_device_ready(struct nand_chip *nand_chip) in lpc32xx_nand_device_ready() argument
296 struct lpc32xx_nand_host *host = nand_get_controller_data(nand_chip); in lpc32xx_nand_device_ready()
320 static int lpc32xx_waitfunc_nand(struct nand_chip *chip) in lpc32xx_waitfunc_nand()
340 static int lpc32xx_waitfunc_controller(struct nand_chip *chip) in lpc32xx_waitfunc_controller()
360 static int lpc32xx_waitfunc(struct nand_chip *chip) in lpc32xx_waitfunc()
394 struct nand_chip *chip = mtd_to_nand(mtd); in lpc32xx_xmit_dma()
433 static int lpc32xx_read_page(struct nand_chip *chip, uint8_t *buf, in lpc32xx_read_page()
499 static int lpc32xx_write_page_lowlevel(struct nand_chip *chip, in lpc32xx_write_page_lowlevel()
549 static int lpc32xx_read_oob(struct nand_chip *chip, int page) in lpc32xx_read_oob()
559 static int lpc32xx_write_oob(struct nand_chip *chip, int page) in lpc32xx_write_oob()
566 static void lpc32xx_ecc_enable(struct nand_chip *chip, int mode) in lpc32xx_ecc_enable()
573 struct mtd_info *mtd = nand_to_mtd(&host->nand_chip); in lpc32xx_dma_setup()
642 static int lpc32xx_nand_attach_chip(struct nand_chip *chip) in lpc32xx_nand_attach_chip()
687 struct nand_chip *nand_chip; in lpc32xx_nand_probe() local
705 nand_chip = &host->nand_chip; in lpc32xx_nand_probe()
706 mtd = nand_to_mtd(nand_chip); in lpc32xx_nand_probe()
730 nand_set_controller_data(nand_chip, host); in lpc32xx_nand_probe()
731 nand_set_flash_node(nand_chip, pdev->dev.of_node); in lpc32xx_nand_probe()
745 nand_chip->legacy.cmd_ctrl = lpc32xx_nand_cmd_ctrl; in lpc32xx_nand_probe()
746 nand_chip->legacy.dev_ready = lpc32xx_nand_device_ready; in lpc32xx_nand_probe()
747 nand_chip->legacy.chip_delay = 25; /* us */ in lpc32xx_nand_probe()
748 nand_chip->legacy.IO_ADDR_R = MLC_DATA(host->io_base); in lpc32xx_nand_probe()
749 nand_chip->legacy.IO_ADDR_W = MLC_DATA(host->io_base); in lpc32xx_nand_probe()
757 nand_chip->legacy.waitfunc = lpc32xx_waitfunc; in lpc32xx_nand_probe()
759 nand_chip->options = NAND_NO_SUBPAGE_WRITE; in lpc32xx_nand_probe()
760 nand_chip->bbt_options = NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB; in lpc32xx_nand_probe()
761 nand_chip->bbt_td = &lpc32xx_nand_bbt; in lpc32xx_nand_probe()
762 nand_chip->bbt_md = &lpc32xx_nand_bbt_mirror; in lpc32xx_nand_probe()
795 nand_chip->legacy.dummy_controller.ops = &lpc32xx_nand_controller_ops; in lpc32xx_nand_probe()
796 res = nand_scan(nand_chip, 1); in lpc32xx_nand_probe()
810 nand_cleanup(nand_chip); in lpc32xx_nand_probe()
833 struct nand_chip *chip = &host->nand_chip; in lpc32xx_nand_remove()