aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2020-10-31 17:32:50 +0100
committerLokesh Vutla <lokeshvutla@ti.com>2020-11-15 15:29:40 +0530
commit914689a204308df47eb60dfbb394fa4cee4fda31 (patch)
treed4df26608140e83ace835ad2ea1e7f7014b3878f /drivers/mtd
parent71c27dbaaeea11b54f36c8f865f0a0cbeddaa19e (diff)
downloadu-boot-914689a204308df47eb60dfbb394fa4cee4fda31.zip
u-boot-914689a204308df47eb60dfbb394fa4cee4fda31.tar.gz
u-boot-914689a204308df47eb60dfbb394fa4cee4fda31.tar.bz2
mtd: OneNAND: Set MTD type
onenand_probe() function is missing to set mtd->type. So set same type as which sets onenand Linux kernel driver. After this change 'mtd list' prints correct type instead of 'Unknown'. Signed-off-by: Pali Rohár <pali@kernel.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/onenand/onenand_base.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 36daef0..09daa0d 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -2657,6 +2657,7 @@ int onenand_probe(struct mtd_info *mtd)
else
mtd->size = this->chipsize;
+ mtd->type = ONENAND_IS_MLC(this) ? MTD_MLCNANDFLASH : MTD_NANDFLASH;
mtd->flags = MTD_CAP_NANDFLASH;
mtd->_erase = onenand_erase;
mtd->_read_oob = onenand_read_oob;