Lines Matching refs:nand_chip

133 	struct nand_chip *nand_chip = mtd_to_nand(mtd);  in lpc32xx_ooblayout_ecc()  local
135 if (section >= nand_chip->ecc.steps) in lpc32xx_ooblayout_ecc()
138 oobregion->offset = ((section + 1) * 16) - nand_chip->ecc.bytes; in lpc32xx_ooblayout_ecc()
139 oobregion->length = nand_chip->ecc.bytes; in lpc32xx_ooblayout_ecc()
147 struct nand_chip *nand_chip = mtd_to_nand(mtd); in lpc32xx_ooblayout_free() local
149 if (section >= nand_chip->ecc.steps) in lpc32xx_ooblayout_free()
153 oobregion->length = 16 - nand_chip->ecc.bytes; in lpc32xx_ooblayout_free()
177 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()
644 static int lpc32xx_nand_attach_chip(struct nand_chip *chip) in lpc32xx_nand_attach_chip()
689 struct nand_chip *nand_chip; in lpc32xx_nand_probe() local
707 nand_chip = &host->nand_chip; in lpc32xx_nand_probe()
708 mtd = nand_to_mtd(nand_chip); in lpc32xx_nand_probe()
728 nand_set_controller_data(nand_chip, host); in lpc32xx_nand_probe()
729 nand_set_flash_node(nand_chip, pdev->dev.of_node); in lpc32xx_nand_probe()
743 nand_chip->legacy.cmd_ctrl = lpc32xx_nand_cmd_ctrl; in lpc32xx_nand_probe()
744 nand_chip->legacy.dev_ready = lpc32xx_nand_device_ready; in lpc32xx_nand_probe()
745 nand_chip->legacy.chip_delay = 25; /* us */ in lpc32xx_nand_probe()
746 nand_chip->legacy.IO_ADDR_R = MLC_DATA(host->io_base); in lpc32xx_nand_probe()
747 nand_chip->legacy.IO_ADDR_W = MLC_DATA(host->io_base); in lpc32xx_nand_probe()
755 nand_chip->legacy.waitfunc = lpc32xx_waitfunc; in lpc32xx_nand_probe()
757 nand_chip->options = NAND_NO_SUBPAGE_WRITE; in lpc32xx_nand_probe()
758 nand_chip->bbt_options = NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB; in lpc32xx_nand_probe()
759 nand_chip->bbt_td = &lpc32xx_nand_bbt; in lpc32xx_nand_probe()
760 nand_chip->bbt_md = &lpc32xx_nand_bbt_mirror; in lpc32xx_nand_probe()
793 nand_chip->legacy.dummy_controller.ops = &lpc32xx_nand_controller_ops; in lpc32xx_nand_probe()
794 res = nand_scan(nand_chip, 1); in lpc32xx_nand_probe()
808 nand_cleanup(nand_chip); in lpc32xx_nand_probe()
831 struct nand_chip *chip = &host->nand_chip; in lpc32xx_nand_remove()