]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mtd: nand: Rename nand_get_flash_type() into nand_detect()
authorMichael Trimarchi <michael@amarulasolutions.com>
Mon, 25 Jul 2022 08:18:51 +0000 (10:18 +0200)
committerMichael Trimarchi <michael@amarulasolutions.com>
Mon, 22 Aug 2022 09:15:15 +0000 (11:15 +0200)
Upstream linux commit 7bb427990ee364.

Rename the function to match this new behavior.

NOTE: fix nand_detect/nand_get_flash_type parameters in
mxs_nand_spl. This code seems never executed by any board
as alternative for nand detect

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
drivers/mtd/nand/raw/mt7621_nand.c
drivers/mtd/nand/raw/mxs_nand_spl.c
drivers/mtd/nand/raw/nand_base.c
include/linux/mtd/rawnand.h

index a4a0bce35d9424185d403d12405ad939de253913..f6eddb84a9b800aa3f9c8e0b5c12f2a5adc3ec4b 100644 (file)
@@ -1186,8 +1186,7 @@ int mt7621_nfc_spl_post_init(struct mt7621_nfc *nfc)
        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;
index 773d375fc22f0e5f2090d53184476c6373c1a1b3..ef03b7789dd915afb52e7cceed77b6686a00eaf2 100644 (file)
@@ -83,7 +83,7 @@ static int mxs_flash_full_ident(struct mtd_info *mtd)
        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);
index b4fa618dc4d05e40a57e298201dda2217f5ab249..1a1a7579328a05cde1d8ea014688eb29a822b69c 100644 (file)
@@ -4276,8 +4276,8 @@ static const struct nand_manufacturer *nand_get_manufacturer_desc(u8 id)
 /*
  * 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;
@@ -4461,7 +4461,7 @@ ident_done:
                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)
 
@@ -4558,8 +4558,7 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips,
        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))
@@ -4591,7 +4590,7 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips,
        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);
index 8178f36b49fb6a17625b5865bb0dc9f5af4ea4e7..fb002ae641198e2dfd30be33705f1f62a71ec6ae 100644 (file)
@@ -29,8 +29,8 @@ struct nand_flash_dev;
 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);