From: "Pali Rohár" <pali@kernel.org>
To: u-boot@lists.denx.de
Subject: [PATCH 6/6] mtd: OneNAND: Set MTD type
Date: Sat, 31 Oct 2020 17:32:50 +0100 [thread overview]
Message-ID: <20201031163250.14866-6-pali@kernel.org> (raw)
In-Reply-To: <20201031163250.14866-1-pali@kernel.org>
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 | 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
next prev parent reply other threads:[~2020-10-31 16:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-31 16:32 [PATCH 1/6] Nokia RX-51: Remove old comments from configs/nokia_rx51.h file Pali Rohár
2020-10-31 16:32 ` [PATCH 2/6] Nokia RX-51: Fix crashing in U-Boot mmc function omap_hsmmc_stop_clock() Pali Rohár
2020-10-31 16:32 ` [PATCH 3/6] Nokia RX-51: During init disable lp5523 led instead of resetting it Pali Rohár
2020-10-31 16:32 ` [PATCH 4/6] Nokia RX-51: Update test script Pali Rohár
2020-10-31 16:32 ` [PATCH 5/6] Nokia RX-51: Make onenand working Pali Rohár
2020-10-31 16:32 ` Pali Rohár [this message]
2020-11-15 10:05 ` [PATCH 1/6] Nokia RX-51: Remove old comments from configs/nokia_rx51.h file Lokesh Vutla
2020-11-15 12:06 ` Pali Rohár
2020-11-16 3:27 ` Lokesh Vutla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201031163250.14866-6-pali@kernel.org \
--to=pali@kernel.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox