Lines Matching +full:manufacturer +full:- +full:id
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2016-2017 Micron Technology, Inc.
10 #define pr_fmt(fmt) "spi-nand: " fmt
21 #include <linux/spi/spi-mem.h>
26 spinand->scratchbuf); in spinand_read_reg_op()
29 ret = spi_mem_exec_op(spinand->spimem, &op); in spinand_read_reg_op()
33 *val = *spinand->scratchbuf; in spinand_read_reg_op()
40 spinand->scratchbuf); in spinand_write_reg_op()
42 *spinand->scratchbuf = val; in spinand_write_reg_op()
43 return spi_mem_exec_op(spinand->spimem, &op); in spinand_write_reg_op()
55 if (WARN_ON(spinand->cur_target < 0 || in spinand_get_cfg()
56 spinand->cur_target >= nand->memorg.ntargets)) in spinand_get_cfg()
57 return -EINVAL; in spinand_get_cfg()
59 *cfg = spinand->cfg_cache[spinand->cur_target]; in spinand_get_cfg()
68 if (WARN_ON(spinand->cur_target < 0 || in spinand_set_cfg()
69 spinand->cur_target >= nand->memorg.ntargets)) in spinand_set_cfg()
70 return -EINVAL; in spinand_set_cfg()
72 if (spinand->cfg_cache[spinand->cur_target] == cfg) in spinand_set_cfg()
79 spinand->cfg_cache[spinand->cur_target] = cfg; in spinand_set_cfg()
84 * spinand_upd_cfg() - Update the configuration register
109 * spinand_select_target() - Select a specific NAND target/die
122 if (WARN_ON(target >= nand->memorg.ntargets)) in spinand_select_target()
123 return -EINVAL; in spinand_select_target()
125 if (spinand->cur_target == target) in spinand_select_target()
128 if (nand->memorg.ntargets == 1) { in spinand_select_target()
129 spinand->cur_target = target; in spinand_select_target()
133 ret = spinand->select_target(spinand, target); in spinand_select_target()
137 spinand->cur_target = target; in spinand_select_target()
147 for (target = 0; target < nand->memorg.ntargets; target++) { in spinand_read_cfg()
157 &spinand->cfg_cache[target]); in spinand_read_cfg()
168 struct device *dev = &spinand->spimem->spi->dev; in spinand_init_cfg_cache()
170 spinand->cfg_cache = devm_kcalloc(dev, in spinand_init_cfg_cache()
171 nand->memorg.ntargets, in spinand_init_cfg_cache()
172 sizeof(*spinand->cfg_cache), in spinand_init_cfg_cache()
174 if (!spinand->cfg_cache) in spinand_init_cfg_cache()
175 return -ENOMEM; in spinand_init_cfg_cache()
184 if (!(spinand->flags & SPINAND_HAS_QE_BIT)) in spinand_init_quad_enable()
187 if (spinand->op_templates.read_cache->data.buswidth == 4 || in spinand_init_quad_enable()
188 spinand->op_templates.write_cache->data.buswidth == 4 || in spinand_init_quad_enable()
189 spinand->op_templates.update_cache->data.buswidth == 4) in spinand_init_quad_enable()
206 return spinand->set_cont_read(spinand, enable); in spinand_cont_read_enable()
213 if (spinand->eccinfo.get_status) in spinand_check_ecc_status()
214 return spinand->eccinfo.get_status(spinand, status); in spinand_check_ecc_status()
224 * wear-leveling layers move the data immediately. in spinand_check_ecc_status()
226 return nanddev_get_ecc_conf(nand)->strength; in spinand_check_ecc_status()
229 return -EBADMSG; in spinand_check_ecc_status()
235 return -EINVAL; in spinand_check_ecc_status()
241 return -ERANGE; in spinand_noecc_ooblayout_ecc()
248 return -ERANGE; in spinand_noecc_ooblayout_free()
251 region->offset = 2; in spinand_noecc_ooblayout_free()
252 region->length = 62; in spinand_noecc_ooblayout_free()
268 nand->ecc.ctx.conf.engine_type = NAND_ECC_ENGINE_TYPE_ON_DIE; in spinand_ondie_ecc_init_ctx()
269 nand->ecc.ctx.conf.step_size = nand->ecc.requirements.step_size; in spinand_ondie_ecc_init_ctx()
270 nand->ecc.ctx.conf.strength = nand->ecc.requirements.strength; in spinand_ondie_ecc_init_ctx()
274 return -ENOMEM; in spinand_ondie_ecc_init_ctx()
276 nand->ecc.ctx.priv = engine_conf; in spinand_ondie_ecc_init_ctx()
278 if (spinand->eccinfo.ooblayout) in spinand_ondie_ecc_init_ctx()
279 mtd_set_ooblayout(mtd, spinand->eccinfo.ooblayout); in spinand_ondie_ecc_init_ctx()
288 kfree(nand->ecc.ctx.priv); in spinand_ondie_ecc_cleanup_ctx()
295 bool enable = (req->mode != MTD_OPS_RAW); in spinand_ondie_ecc_prepare_io_req()
297 memset(spinand->oobbuf, 0xff, nanddev_per_page_oobsize(nand)); in spinand_ondie_ecc_prepare_io_req()
306 struct spinand_ondie_ecc_conf *engine_conf = nand->ecc.ctx.priv; in spinand_ondie_ecc_finish_io_req()
311 if (req->mode == MTD_OPS_RAW) in spinand_ondie_ecc_finish_io_req()
315 if (req->type == NAND_PAGE_WRITE) in spinand_ondie_ecc_finish_io_req()
319 ret = spinand_check_ecc_status(spinand, engine_conf->status); in spinand_ondie_ecc_finish_io_req()
320 if (ret == -EBADMSG) { in spinand_ondie_ecc_finish_io_req()
321 mtd->ecc_stats.failed++; in spinand_ondie_ecc_finish_io_req()
329 if (!req->continuous) in spinand_ondie_ecc_finish_io_req()
332 pages = req->datalen / nanddev_page_size(nand); in spinand_ondie_ecc_finish_io_req()
334 mtd->ecc_stats.corrected += ret * pages; in spinand_ondie_ecc_finish_io_req()
353 struct spinand_ondie_ecc_conf *engine_conf = nand->ecc.ctx.priv; in spinand_ondie_ecc_save_status()
355 if (nand->ecc.ctx.conf.engine_type == NAND_ECC_ENGINE_TYPE_ON_DIE && in spinand_ondie_ecc_save_status()
357 engine_conf->status = status; in spinand_ondie_ecc_save_status()
364 return spi_mem_exec_op(spinand->spimem, &op); in spinand_write_enable_op()
371 unsigned int row = nanddev_pos_to_row(nand, &req->pos); in spinand_load_page_op()
374 return spi_mem_exec_op(spinand->spimem, &op); in spinand_load_page_op()
388 if (req->datalen) { in spinand_read_from_cache_op()
389 buf = spinand->databuf; in spinand_read_from_cache_op()
390 if (!req->continuous) in spinand_read_from_cache_op()
393 nbytes = round_up(req->dataoffs + req->datalen, in spinand_read_from_cache_op()
398 if (req->ooblen) { in spinand_read_from_cache_op()
401 buf = spinand->oobbuf; in spinand_read_from_cache_op()
406 if (req->mode == MTD_OPS_RAW) in spinand_read_from_cache_op()
407 rdesc = spinand->dirmaps[req->pos.plane].rdesc; in spinand_read_from_cache_op()
409 rdesc = spinand->dirmaps[req->pos.plane].rdesc_ecc; in spinand_read_from_cache_op()
411 if (spinand->flags & SPINAND_HAS_READ_PLANE_SELECT_BIT) in spinand_read_from_cache_op()
412 column |= req->pos.plane << fls(nanddev_page_size(nand)); in spinand_read_from_cache_op()
420 return -EIO; in spinand_read_from_cache_op()
422 nbytes -= ret; in spinand_read_from_cache_op()
430 if (nbytes && req->continuous) in spinand_read_from_cache_op()
431 return -EIO; in spinand_read_from_cache_op()
434 if (req->datalen) in spinand_read_from_cache_op()
435 memcpy(req->databuf.in, spinand->databuf + req->dataoffs, in spinand_read_from_cache_op()
436 req->datalen); in spinand_read_from_cache_op()
438 if (req->ooblen) { in spinand_read_from_cache_op()
439 if (req->mode == MTD_OPS_AUTO_OOB) in spinand_read_from_cache_op()
440 mtd_ooblayout_get_databytes(mtd, req->oobbuf.in, in spinand_read_from_cache_op()
441 spinand->oobbuf, in spinand_read_from_cache_op()
442 req->ooboffs, in spinand_read_from_cache_op()
443 req->ooblen); in spinand_read_from_cache_op()
445 memcpy(req->oobbuf.in, spinand->oobbuf + req->ooboffs, in spinand_read_from_cache_op()
446 req->ooblen); in spinand_read_from_cache_op()
459 void *buf = spinand->databuf; in spinand_write_to_cache_op()
470 * ECC engines ->prepare_io_req() callback. in spinand_write_to_cache_op()
473 memset(spinand->databuf, 0xff, nanddev_page_size(nand)); in spinand_write_to_cache_op()
475 if (req->datalen) in spinand_write_to_cache_op()
476 memcpy(spinand->databuf + req->dataoffs, req->databuf.out, in spinand_write_to_cache_op()
477 req->datalen); in spinand_write_to_cache_op()
479 if (req->ooblen) { in spinand_write_to_cache_op()
480 if (req->mode == MTD_OPS_AUTO_OOB) in spinand_write_to_cache_op()
481 mtd_ooblayout_set_databytes(mtd, req->oobbuf.out, in spinand_write_to_cache_op()
482 spinand->oobbuf, in spinand_write_to_cache_op()
483 req->ooboffs, in spinand_write_to_cache_op()
484 req->ooblen); in spinand_write_to_cache_op()
486 memcpy(spinand->oobbuf + req->ooboffs, req->oobbuf.out, in spinand_write_to_cache_op()
487 req->ooblen); in spinand_write_to_cache_op()
490 if (req->mode == MTD_OPS_RAW) in spinand_write_to_cache_op()
491 wdesc = spinand->dirmaps[req->pos.plane].wdesc; in spinand_write_to_cache_op()
493 wdesc = spinand->dirmaps[req->pos.plane].wdesc_ecc; in spinand_write_to_cache_op()
495 if (spinand->flags & SPINAND_HAS_PROG_PLANE_SELECT_BIT) in spinand_write_to_cache_op()
496 column |= req->pos.plane << fls(nanddev_page_size(nand)); in spinand_write_to_cache_op()
504 return -EIO; in spinand_write_to_cache_op()
506 nbytes -= ret; in spinand_write_to_cache_op()
518 unsigned int row = nanddev_pos_to_row(nand, &req->pos); in spinand_program_op()
521 return spi_mem_exec_op(spinand->spimem, &op); in spinand_program_op()
531 return spi_mem_exec_op(spinand->spimem, &op); in spinand_erase_op()
540 spinand->scratchbuf); in spinand_wait()
544 ret = spi_mem_poll_status(spinand->spimem, &op, STATUS_BUSY, 0, in spinand_wait()
551 status = *spinand->scratchbuf; in spinand_wait()
567 return status & STATUS_BUSY ? -ETIMEDOUT : 0; in spinand_wait()
574 naddr, ndummy, spinand->scratchbuf, SPINAND_MAX_ID_LEN); in spinand_read_id_op()
577 ret = spi_mem_exec_op(spinand->spimem, &op); in spinand_read_id_op()
579 memcpy(buf, spinand->scratchbuf, SPINAND_MAX_ID_LEN); in spinand_read_id_op()
589 ret = spi_mem_exec_op(spinand->spimem, &op); in spinand_reset_op()
663 return -EIO; in spinand_write_page()
679 if (ops->mode == MTD_OPS_RAW || !mtd->ooblayout) in spinand_mtd_regular_page_read()
691 if (ret < 0 && ret != -EBADMSG) in spinand_mtd_regular_page_read()
694 if (ret == -EBADMSG) in spinand_mtd_regular_page_read()
700 ops->retlen += iter.req.datalen; in spinand_mtd_regular_page_read()
701 ops->oobretlen += iter.req.ooblen; in spinand_mtd_regular_page_read()
705 ret = -EBADMSG; in spinand_mtd_regular_page_read()
728 * Each data read must be a multiple of 4-bytes and full pages should be read; in spinand_mtd_continuous_page_read()
754 ops->retlen += iter.req.datalen; in spinand_mtd_continuous_page_read()
786 enum nand_ecc_engine_type engine_type = nand->ecc.ctx.conf.engine_type; in spinand_cont_read_init()
788 /* OOBs cannot be retrieved so external/on-host ECC engine won't work */ in spinand_cont_read_init()
789 if (spinand->set_cont_read && in spinand_cont_read_init()
792 spinand->cont_read_possible = true; in spinand_cont_read_init()
803 if (!spinand->cont_read_possible) in spinand_use_cont_read()
807 if (ops->ooblen || ops->oobbuf) in spinand_use_cont_read()
811 nanddev_offs_to_pos(nand, from + ops->len - 1, &end_pos); in spinand_use_cont_read()
837 mutex_lock(&spinand->lock); in spinand_mtd_read()
839 old_stats = mtd->ecc_stats; in spinand_mtd_read()
846 if (ops->stats) { in spinand_mtd_read()
847 ops->stats->uncorrectable_errors += in spinand_mtd_read()
848 mtd->ecc_stats.failed - old_stats.failed; in spinand_mtd_read()
849 ops->stats->corrected_bitflips += in spinand_mtd_read()
850 mtd->ecc_stats.corrected - old_stats.corrected; in spinand_mtd_read()
853 mutex_unlock(&spinand->lock); in spinand_mtd_read()
867 if (ops->mode == MTD_OPS_RAW || !mtd->ooblayout) in spinand_mtd_write()
870 mutex_lock(&spinand->lock); in spinand_mtd_write()
884 ops->retlen += iter.req.datalen; in spinand_mtd_write()
885 ops->oobretlen += iter.req.ooblen; in spinand_mtd_write()
888 mutex_unlock(&spinand->lock); in spinand_mtd_write()
905 spinand_select_target(spinand, pos->target); in spinand_isbad()
921 mutex_lock(&spinand->lock); in spinand_mtd_block_isbad()
923 mutex_unlock(&spinand->lock); in spinand_mtd_block_isbad()
941 ret = spinand_select_target(spinand, pos->target); in spinand_markbad()
960 mutex_lock(&spinand->lock); in spinand_mtd_block_markbad()
962 mutex_unlock(&spinand->lock); in spinand_mtd_block_markbad()
973 ret = spinand_select_target(spinand, pos->target); in spinand_erase()
991 ret = -EIO; in spinand_erase()
1002 mutex_lock(&spinand->lock); in spinand_mtd_erase()
1004 mutex_unlock(&spinand->lock); in spinand_mtd_erase()
1017 mutex_lock(&spinand->lock); in spinand_mtd_block_isreserved()
1019 mutex_unlock(&spinand->lock); in spinand_mtd_block_isreserved()
1034 if (spinand->cont_read_possible) in spinand_create_dirmap()
1038 info.offset = plane << fls(nand->memorg.pagesize); in spinand_create_dirmap()
1040 info.op_tmpl = *spinand->op_templates.update_cache; in spinand_create_dirmap()
1041 desc = devm_spi_mem_dirmap_create(&spinand->spimem->spi->dev, in spinand_create_dirmap()
1042 spinand->spimem, &info); in spinand_create_dirmap()
1046 spinand->dirmaps[plane].wdesc = desc; in spinand_create_dirmap()
1048 info.op_tmpl = *spinand->op_templates.read_cache; in spinand_create_dirmap()
1049 desc = devm_spi_mem_dirmap_create(&spinand->spimem->spi->dev, in spinand_create_dirmap()
1050 spinand->spimem, &info); in spinand_create_dirmap()
1054 spinand->dirmaps[plane].rdesc = desc; in spinand_create_dirmap()
1056 if (nand->ecc.engine->integration != NAND_ECC_ENGINE_INTEGRATION_PIPELINED) { in spinand_create_dirmap()
1057 spinand->dirmaps[plane].wdesc_ecc = spinand->dirmaps[plane].wdesc; in spinand_create_dirmap()
1058 spinand->dirmaps[plane].rdesc_ecc = spinand->dirmaps[plane].rdesc; in spinand_create_dirmap()
1063 info.op_tmpl = *spinand->op_templates.update_cache; in spinand_create_dirmap()
1065 desc = devm_spi_mem_dirmap_create(&spinand->spimem->spi->dev, in spinand_create_dirmap()
1066 spinand->spimem, &info); in spinand_create_dirmap()
1070 spinand->dirmaps[plane].wdesc_ecc = desc; in spinand_create_dirmap()
1072 info.op_tmpl = *spinand->op_templates.read_cache; in spinand_create_dirmap()
1074 desc = devm_spi_mem_dirmap_create(&spinand->spimem->spi->dev, in spinand_create_dirmap()
1075 spinand->spimem, &info); in spinand_create_dirmap()
1079 spinand->dirmaps[plane].rdesc_ecc = desc; in spinand_create_dirmap()
1089 spinand->dirmaps = devm_kzalloc(&spinand->spimem->spi->dev, in spinand_create_dirmaps()
1090 sizeof(*spinand->dirmaps) * in spinand_create_dirmaps()
1091 nand->memorg.planes_per_lun, in spinand_create_dirmaps()
1093 if (!spinand->dirmaps) in spinand_create_dirmaps()
1094 return -ENOMEM; in spinand_create_dirmaps()
1096 for (i = 0; i < nand->memorg.planes_per_lun; i++) { in spinand_create_dirmaps()
1128 u8 *id = spinand->id.data; in spinand_manufacturer_match() local
1133 const struct spinand_manufacturer *manufacturer = in spinand_manufacturer_match() local
1136 if (id[0] != manufacturer->id) in spinand_manufacturer_match()
1140 manufacturer->chips, in spinand_manufacturer_match()
1141 manufacturer->nchips, in spinand_manufacturer_match()
1146 spinand->manufacturer = manufacturer; in spinand_manufacturer_match()
1149 return -EOPNOTSUPP; in spinand_manufacturer_match()
1154 u8 *id = spinand->id.data; in spinand_id_detect() local
1157 ret = spinand_read_id_op(spinand, 0, 0, id); in spinand_id_detect()
1164 ret = spinand_read_id_op(spinand, 1, 0, id); in spinand_id_detect()
1172 ret = spinand_read_id_op(spinand, 0, 1, id); in spinand_id_detect()
1183 if (spinand->manufacturer->ops->init) in spinand_manufacturer_init()
1184 return spinand->manufacturer->ops->init(spinand); in spinand_manufacturer_init()
1191 /* Release manufacturer private data */ in spinand_manufacturer_cleanup()
1192 if (spinand->manufacturer->ops->cleanup) in spinand_manufacturer_cleanup()
1193 return spinand->manufacturer->ops->cleanup(spinand); in spinand_manufacturer_cleanup()
1203 for (i = 0; i < variants->nops; i++) { in spinand_select_op_variant()
1204 struct spi_mem_op op = variants->ops[i]; in spinand_select_op_variant()
1213 ret = spi_mem_adjust_op_size(spinand->spimem, &op); in spinand_select_op_variant()
1217 if (!spi_mem_supports_op(spinand->spimem, &op)) in spinand_select_op_variant()
1220 nbytes -= op.data.nbytes; in spinand_select_op_variant()
1224 return &variants->ops[i]; in spinand_select_op_variant()
1231 * spinand_match_and_init() - Try to find a match between a device ID and an
1236 * @rdid_method: read id method to match
1238 * Match between a device ID retrieved through the READ_ID command and an
1250 u8 *id = spinand->id.data; in spinand_match_and_init() local
1258 if (rdid_method != info->devid.method) in spinand_match_and_init()
1261 if (memcmp(id + 1, info->devid.id, info->devid.len)) in spinand_match_and_init()
1264 nand->memorg = table[i].memorg; in spinand_match_and_init()
1266 spinand->eccinfo = table[i].eccinfo; in spinand_match_and_init()
1267 spinand->flags = table[i].flags; in spinand_match_and_init()
1268 spinand->id.len = 1 + table[i].devid.len; in spinand_match_and_init()
1269 spinand->select_target = table[i].select_target; in spinand_match_and_init()
1270 spinand->set_cont_read = table[i].set_cont_read; in spinand_match_and_init()
1273 info->op_variants.read_cache); in spinand_match_and_init()
1275 return -ENOTSUPP; in spinand_match_and_init()
1277 spinand->op_templates.read_cache = op; in spinand_match_and_init()
1280 info->op_variants.write_cache); in spinand_match_and_init()
1282 return -ENOTSUPP; in spinand_match_and_init()
1284 spinand->op_templates.write_cache = op; in spinand_match_and_init()
1287 info->op_variants.update_cache); in spinand_match_and_init()
1288 spinand->op_templates.update_cache = op; in spinand_match_and_init()
1293 return -ENOTSUPP; in spinand_match_and_init()
1298 struct device *dev = &spinand->spimem->spi->dev; in spinand_detect()
1308 dev_err(dev, "unknown raw ID %*phN\n", SPINAND_MAX_ID_LEN, in spinand_detect()
1309 spinand->id.data); in spinand_detect()
1313 if (nand->memorg.ntargets > 1 && !spinand->select_target) { in spinand_detect()
1315 "SPI NANDs with more than one die must implement ->select_target()\n"); in spinand_detect()
1316 return -EINVAL; in spinand_detect()
1319 dev_info(&spinand->spimem->spi->dev, in spinand_detect()
1320 "%s SPI NAND was found.\n", spinand->manufacturer->name); in spinand_detect()
1321 dev_info(&spinand->spimem->spi->dev, in spinand_detect()
1331 struct device *dev = &spinand->spimem->spi->dev; in spinand_init_flash()
1356 for (i = 0; i < nand->memorg.ntargets; i++) { in spinand_init_flash()
1390 struct device *dev = &spinand->spimem->spi->dev; in spinand_init()
1397 * buf passed in spi_mem_op->data.buf be DMA-able. in spinand_init()
1399 spinand->scratchbuf = kzalloc(SPINAND_MAX_ID_LEN, GFP_KERNEL); in spinand_init()
1400 if (!spinand->scratchbuf) in spinand_init()
1401 return -ENOMEM; in spinand_init()
1410 * Memory allocated by devm_ does not guarantee DMA-safe alignment. in spinand_init()
1412 spinand->databuf = kzalloc(nanddev_eraseblock_size(nand), in spinand_init()
1414 if (!spinand->databuf) { in spinand_init()
1415 ret = -ENOMEM; in spinand_init()
1419 spinand->oobbuf = spinand->databuf + nanddev_page_size(nand); in spinand_init()
1433 /* SPI-NAND default ECC engine is on-die */ in spinand_init()
1434 nand->ecc.defaults.engine_type = NAND_ECC_ENGINE_TYPE_ON_DIE; in spinand_init()
1435 nand->ecc.ondie_engine = &spinand_ondie_ecc_engine; in spinand_init()
1443 * Continuous read can only be enabled with an on-die ECC engine, so the in spinand_init()
1448 mtd->_read_oob = spinand_mtd_read; in spinand_init()
1449 mtd->_write_oob = spinand_mtd_write; in spinand_init()
1450 mtd->_block_isbad = spinand_mtd_block_isbad; in spinand_init()
1451 mtd->_block_markbad = spinand_mtd_block_markbad; in spinand_init()
1452 mtd->_block_isreserved = spinand_mtd_block_isreserved; in spinand_init()
1453 mtd->_erase = spinand_mtd_erase; in spinand_init()
1454 mtd->_max_bad_blocks = nanddev_mtd_max_bad_blocks; in spinand_init()
1455 mtd->_resume = spinand_mtd_resume; in spinand_init()
1457 if (nand->ecc.engine) { in spinand_init()
1463 mtd->oobavail = ret; in spinand_init()
1466 mtd->ecc_strength = nanddev_get_ecc_conf(nand)->strength; in spinand_init()
1467 mtd->ecc_step_size = nanddev_get_ecc_conf(nand)->step_size; in spinand_init()
1468 mtd->bitflip_threshold = DIV_ROUND_UP(mtd->ecc_strength * 3, 4); in spinand_init()
1490 kfree(spinand->databuf); in spinand_init()
1491 kfree(spinand->scratchbuf); in spinand_init()
1501 kfree(spinand->databuf); in spinand_cleanup()
1502 kfree(spinand->scratchbuf); in spinand_cleanup()
1511 spinand = devm_kzalloc(&mem->spi->dev, sizeof(*spinand), in spinand_probe()
1514 return -ENOMEM; in spinand_probe()
1516 spinand->spimem = mem; in spinand_probe()
1518 spinand_set_of_node(spinand, mem->spi->dev.of_node); in spinand_probe()
1519 mutex_init(&spinand->lock); in spinand_probe()
1521 mtd->dev.parent = &mem->spi->dev; in spinand_probe()
1558 { .name = "spi-nand" },
1565 { .compatible = "spi-nand" },
1575 .name = "spi-nand",