Lines Matching refs:nand_chip

134 	struct nand_chip *nand_chip = mtd_to_nand(mtd);  in lpc32xx_ooblayout_ecc()  local
136 if (section >= nand_chip->ecc.steps) in lpc32xx_ooblayout_ecc()
139 oobregion->offset = ((section + 1) * 16) - nand_chip->ecc.bytes; in lpc32xx_ooblayout_ecc()
140 oobregion->length = nand_chip->ecc.bytes; in lpc32xx_ooblayout_ecc()
148 struct nand_chip *nand_chip = mtd_to_nand(mtd); in lpc32xx_ooblayout_free() local
150 if (section >= nand_chip->ecc.steps) in lpc32xx_ooblayout_free()
154 oobregion->length = 16 - nand_chip->ecc.bytes; in lpc32xx_ooblayout_free()
178 struct nand_chip nand_chip; member
279 static void lpc32xx_nand_cmd_ctrl(struct nand_chip *nand_chip, int cmd, in lpc32xx_nand_cmd_ctrl() argument
282 struct lpc32xx_nand_host *host = nand_get_controller_data(nand_chip); in lpc32xx_nand_cmd_ctrl()
295 static int lpc32xx_nand_device_ready(struct nand_chip *nand_chip) in lpc32xx_nand_device_ready() argument
297 struct lpc32xx_nand_host *host = nand_get_controller_data(nand_chip); in lpc32xx_nand_device_ready()
321 static int lpc32xx_waitfunc_nand(struct nand_chip *chip) in lpc32xx_waitfunc_nand()
341 static int lpc32xx_waitfunc_controller(struct nand_chip *chip) in lpc32xx_waitfunc_controller()
361 static int lpc32xx_waitfunc(struct nand_chip *chip) in lpc32xx_waitfunc()
395 struct nand_chip *chip = mtd_to_nand(mtd); in lpc32xx_xmit_dma()
434 static int lpc32xx_read_page(struct nand_chip *chip, uint8_t *buf, in lpc32xx_read_page()
500 static int lpc32xx_write_page_lowlevel(struct nand_chip *chip, in lpc32xx_write_page_lowlevel()
550 static int lpc32xx_read_oob(struct nand_chip *chip, int page) in lpc32xx_read_oob()
560 static int lpc32xx_write_oob(struct nand_chip *chip, int page) in lpc32xx_write_oob()
567 static void lpc32xx_ecc_enable(struct nand_chip *chip, int mode) in lpc32xx_ecc_enable()
574 struct mtd_info *mtd = nand_to_mtd(&host->nand_chip); in lpc32xx_dma_setup()
645 static int lpc32xx_nand_attach_chip(struct nand_chip *chip) in lpc32xx_nand_attach_chip()
678 struct nand_chip *nand_chip; in lpc32xx_nand_probe() local
696 nand_chip = &host->nand_chip; in lpc32xx_nand_probe()
697 mtd = nand_to_mtd(nand_chip); in lpc32xx_nand_probe()
717 nand_set_controller_data(nand_chip, host); in lpc32xx_nand_probe()
718 nand_set_flash_node(nand_chip, pdev->dev.of_node); in lpc32xx_nand_probe()
732 nand_chip->legacy.cmd_ctrl = lpc32xx_nand_cmd_ctrl; in lpc32xx_nand_probe()
733 nand_chip->legacy.dev_ready = lpc32xx_nand_device_ready; in lpc32xx_nand_probe()
734 nand_chip->legacy.chip_delay = 25; /* us */ in lpc32xx_nand_probe()
735 nand_chip->legacy.IO_ADDR_R = MLC_DATA(host->io_base); in lpc32xx_nand_probe()
736 nand_chip->legacy.IO_ADDR_W = MLC_DATA(host->io_base); in lpc32xx_nand_probe()
744 nand_chip->ecc.hwctl = lpc32xx_ecc_enable; in lpc32xx_nand_probe()
745 nand_chip->ecc.read_page_raw = lpc32xx_read_page; in lpc32xx_nand_probe()
746 nand_chip->ecc.read_page = lpc32xx_read_page; in lpc32xx_nand_probe()
747 nand_chip->ecc.write_page_raw = lpc32xx_write_page_lowlevel; in lpc32xx_nand_probe()
748 nand_chip->ecc.write_page = lpc32xx_write_page_lowlevel; in lpc32xx_nand_probe()
749 nand_chip->ecc.write_oob = lpc32xx_write_oob; in lpc32xx_nand_probe()
750 nand_chip->ecc.read_oob = lpc32xx_read_oob; in lpc32xx_nand_probe()
751 nand_chip->ecc.strength = 4; in lpc32xx_nand_probe()
752 nand_chip->ecc.bytes = 10; in lpc32xx_nand_probe()
753 nand_chip->legacy.waitfunc = lpc32xx_waitfunc; in lpc32xx_nand_probe()
755 nand_chip->options = NAND_NO_SUBPAGE_WRITE; in lpc32xx_nand_probe()
756 nand_chip->bbt_options = NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB; in lpc32xx_nand_probe()
757 nand_chip->bbt_td = &lpc32xx_nand_bbt; in lpc32xx_nand_probe()
758 nand_chip->bbt_md = &lpc32xx_nand_bbt_mirror; in lpc32xx_nand_probe()
792 nand_chip->legacy.dummy_controller.ops = &lpc32xx_nand_controller_ops; in lpc32xx_nand_probe()
793 res = nand_scan(nand_chip, 1); in lpc32xx_nand_probe()
807 nand_cleanup(nand_chip); in lpc32xx_nand_probe()
831 nand_release(&host->nand_chip); in lpc32xx_nand_remove()