Lines Matching refs:nand_chip

26 	struct nand_chip	nand_chip;  member
37 static void socrates_nand_write_buf(struct nand_chip *this, const uint8_t *buf, in socrates_nand_write_buf()
56 static void socrates_nand_read_buf(struct nand_chip *this, uint8_t *buf, in socrates_nand_read_buf()
76 static uint8_t socrates_nand_read_byte(struct nand_chip *this) in socrates_nand_read_byte()
86 static void socrates_nand_cmd_ctrl(struct nand_chip *nand_chip, int cmd, in socrates_nand_cmd_ctrl() argument
89 struct socrates_nand_host *host = nand_get_controller_data(nand_chip); in socrates_nand_cmd_ctrl()
111 static int socrates_nand_device_ready(struct nand_chip *nand_chip) in socrates_nand_device_ready() argument
113 struct socrates_nand_host *host = nand_get_controller_data(nand_chip); in socrates_nand_device_ready()
120 static int socrates_attach_chip(struct nand_chip *chip) in socrates_attach_chip()
140 struct nand_chip *nand_chip; in socrates_nand_probe() local
154 nand_chip = &host->nand_chip; in socrates_nand_probe()
155 mtd = nand_to_mtd(nand_chip); in socrates_nand_probe()
160 nand_chip->controller = &host->controller; in socrates_nand_probe()
163 nand_set_controller_data(nand_chip, host); in socrates_nand_probe()
164 nand_set_flash_node(nand_chip, ofdev->dev.of_node); in socrates_nand_probe()
168 nand_chip->legacy.cmd_ctrl = socrates_nand_cmd_ctrl; in socrates_nand_probe()
169 nand_chip->legacy.read_byte = socrates_nand_read_byte; in socrates_nand_probe()
170 nand_chip->legacy.write_buf = socrates_nand_write_buf; in socrates_nand_probe()
171 nand_chip->legacy.read_buf = socrates_nand_read_buf; in socrates_nand_probe()
172 nand_chip->legacy.dev_ready = socrates_nand_device_ready; in socrates_nand_probe()
175 nand_chip->legacy.chip_delay = 20; /* 20us command delay time */ in socrates_nand_probe()
182 nand_chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT; in socrates_nand_probe()
186 res = nand_scan(nand_chip, 1); in socrates_nand_probe()
194 nand_cleanup(nand_chip); in socrates_nand_probe()
207 struct nand_chip *chip = &host->nand_chip; in socrates_nand_remove()