:: [maemo-leste] [PATCH 6/6] mtd: OneN…
Top Page
Delete this message
Reply to this message
Author: Pali Rohár
Date:  
To: u-boot, maemo-leste, Ivaylo Dimitrov, Lokesh Vutla, Tom Rini
CC: Faiz Abbas, Peng Fan, Heiko Schocher, Adam Ford, Anatolij Gustschin, Simon Glass
Old-Topics: [maemo-leste] [PATCH 1/6] Nokia RX-51: Remove old comments from configs/nokia_rx51.h file
Subject: [maemo-leste] [PATCH 6/6] 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@???>
---
drivers/mtd/onenand/onenand_base.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 36daef01ae..09daa0dd36 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;
-- 
2.20.1