The existing `mxs_flash_ident()` is limited to identify ONFi compliant
NAND chips only. In order to support non-ONFi NAND chips refactor the
function and rename it to `mxs_flash_onfi_ident()`.

A follow-up patch will add `mxs_flash_full_ident()` which allows to use
the chip ID list to lookup for supported NAND flashs.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
---
 drivers/mtd/nand/mxs_nand_spl.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/mxs_nand_spl.c b/drivers/mtd/nand/mxs_nand_spl.c
index 910f76dd9d..11d8503127 100644
--- a/drivers/mtd/nand/mxs_nand_spl.c
+++ b/drivers/mtd/nand/mxs_nand_spl.c
@@ -49,7 +49,7 @@ static void mxs_nand_command(struct mtd_info *mtd, unsigned 
int command,
        }
 }
 
-static int mxs_flash_ident(struct mtd_info *mtd)
+static int mxs_flash_onfi_ident(struct mtd_info *mtd)
 {
        register struct nand_chip *chip = mtd_to_nand(mtd);
        int i;
@@ -109,6 +109,13 @@ static int mxs_flash_ident(struct mtd_info *mtd)
        return 0;
 }
 
+static int mxs_flash_ident(struct mtd_info *mtd)
+{
+       int ret;
+       ret = mxs_flash_onfi_ident(mtd);
+       return ret;
+}
+
 static int mxs_read_page_ecc(struct mtd_info *mtd, void *buf, unsigned int 
page)
 {
        register struct nand_chip *chip = mtd_to_nand(mtd);
-- 
2.15.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to