From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mtdparts: Call nand_init() during mtdparts_init().
Date: Fri, 15 Oct 2010 21:36:40 +0200 [thread overview]
Message-ID: <20101015193640.722281365CF@gemini.denx.de> (raw)
In-Reply-To: <20101015185902.GA7581@udp111988uds.am.freescale.net>
Dear Scott Wood,
In message <20101015185902.GA7581@udp111988uds.am.freescale.net> you wrote:
> The mtdparts code depends on the devices referred to by
> partition specs actually existing, both for error checking,
> when the spread feature is used, for bad block checking.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> common/cmd_mtdparts.c | 5 +----
> include/nand.h | 6 ++++++
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> Applied to u-boot-nand-flash
>
> diff --git a/common/cmd_mtdparts.c b/common/cmd_mtdparts.c
> index 5481c88..8e8ba47 100644
> --- a/common/cmd_mtdparts.c
> +++ b/common/cmd_mtdparts.c
> @@ -96,15 +96,11 @@
> #include <linux/err.h>
> #include <linux/mtd/mtd.h>
>
> -#if defined(CONFIG_CMD_NAND)
> #include <linux/mtd/nand.h>
> #include <nand.h>
> -#endif
>
> -#if defined(CONFIG_CMD_ONENAND)
> #include <linux/mtd/onenand.h>
> #include <onenand_uboot.h>
> -#endif
I don't like this. We should include this stuff only on systems that
really need it.
> /* special size referring to all the remaining space in a partition */
> #define SIZE_REMAINING 0xFFFFFFFF
> @@ -1711,6 +1707,7 @@ int mtdparts_init(void)
> memset(last_ids, 0, MTDIDS_MAXLEN);
> memset(last_parts, 0, MTDPARTS_MAXLEN);
> memset(last_partition, 0, PARTITION_MAXLEN);
> + nand_init();
> initialized = 1;
> }
I don't like this either. I don't want to see a nand_init() for
systems that have no NAND at all (not even an empty one).
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"If you can, help others. If you can't, at least don't hurt others."
- the Dalai Lama
next prev parent reply other threads:[~2010-10-15 19:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-15 18:59 [U-Boot] [PATCH] mtdparts: Call nand_init() during mtdparts_init() Scott Wood
2010-10-15 19:36 ` Wolfgang Denk [this message]
2010-10-15 19:47 ` Scott Wood
2010-10-15 20:08 ` Mike Frysinger
2010-10-15 21:39 ` Wolfgang Denk
2010-10-15 21:48 ` Scott Wood
2010-10-15 22:17 ` Wolfgang Denk
2010-10-15 22:35 ` Scott Wood
2010-10-15 22:48 ` Wolfgang Denk
2010-10-15 23:05 ` Scott Wood
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=20101015193640.722281365CF@gemini.denx.de \
--to=wd@denx.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.