int nand_maf_id, nand_dev_id;
int ret;
- ret = nand_get_flash_type(nand, &nand_maf_id,
- &nand_dev_id, NULL);
+ ret = nand_detect(nand, &nand_maf_id, &nand_dev_id, NULL);
if (ret)
return ret;
struct nand_chip *chip = mtd_to_nand(mtd);
int ret;
- ret = nand_get_flash_type(mtd, chip, &nand_maf_id, &nand_dev_id, NULL);
+ ret = nand_detect(chip, &nand_maf_id, &nand_dev_id, NULL);
if (ret) {
chip->select_chip(mtd, -1);
/*
* Get the flash and manufacturer id and lookup if the type is supported.
*/
-int nand_get_flash_type(struct nand_chip *chip, int *maf_id,
- int *dev_id, struct nand_flash_dev *type)
+int nand_detect(struct nand_chip *chip, int *maf_id,
+ int *dev_id, struct nand_flash_dev *type)
{
struct mtd_info *mtd = &chip->mtd;
const struct nand_manufacturer *manufacturer_desc;
mtd->erasesize >> 10, mtd->writesize, mtd->oobsize);
return 0;
}
-EXPORT_SYMBOL(nand_get_flash_type);
+EXPORT_SYMBOL(nand_detect);
#if CONFIG_IS_ENABLED(OF_CONTROL)
nand_set_defaults(chip, chip->options & NAND_BUSWIDTH_16);
/* Read the flash type */
- ret = nand_get_flash_type(chip, &nand_maf_id,
- &nand_dev_id, table);
+ ret = nand_detect(chip, &nand_maf_id, &nand_dev_id, table);
if (ret) {
if (!(chip->options & NAND_SCAN_SILENT_NODEV))
for (i = 1; i < maxchips; i++) {
u8 id[2];
- /* See comment in nand_get_flash_type for reset */
+ /* See comment in nand_detect for reset */
nand_reset(chip, i);
chip->select_chip(mtd, i);
struct device_node;
/* Get the flash and manufacturer id and lookup if the type is supported. */
-int nand_get_flash_type(struct nand_chip *chip, int *maf_id, int *dev_id,
- struct nand_flash_dev *type);
+int nand_detect(struct nand_chip *chip, int *maf_id, int *dev_id,
+ struct nand_flash_dev *type);
/* Scan and identify a NAND device */
int nand_scan(struct mtd_info *mtd, int max_chips);