projects
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71c27db
)
mtd: OneNAND: Set MTD type
author
Pali Rohár
<pali@kernel.org>
Sat, 31 Oct 2020 16:32:50 +0000
(17:32 +0100)
committer
Lokesh Vutla
<lokeshvutla@ti.com>
Sun, 15 Nov 2020 09:59:40 +0000
(15:29 +0530)
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>
drivers/mtd/onenand/onenand_base.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/onenand/onenand_base.c
b/drivers/mtd/onenand/onenand_base.c
index 36daef01aec82bb4cc47eba3b3fd8e991e25f955..09daa0dd36ec18c7207c423beabe66ecafee0a4e 100644
(file)
--- 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;