summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJörg Krause <joerg.krause@embedded.rocks>2018-01-14 19:26:39 +0100
committerStefano Babic <sbabic@denx.de>2018-06-27 12:20:55 +0200
commitf3f2af3bdf2af89d0621aa0fbd94a918e4447081 (patch)
treeed541d8fd137f19186eada9f7026a335a7f550b5 /drivers
parent15e207faa0c32b587c173844936cadd7bf8dee01 (diff)
mtd: nand: mxs_nand_spl: refactor mxs_flash_ident
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/mxs_nand_spl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mtd/nand/mxs_nand_spl.c b/drivers/mtd/nand/mxs_nand_spl.c
index 47857a81bc..adb12c531e 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);