From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 1/2 v2] nand: allow delayed initialization
Date: Sun, 3 Oct 2010 18:19:34 -0400 [thread overview]
Message-ID: <201010031819.35739.vapier@gentoo.org> (raw)
In-Reply-To: <20101003214032.E901A1539A0@gemini.denx.de>
On Sunday, October 03, 2010 17:40:32 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > > Would it not be esier to rename your nand_delayed_init() into
> > > nand_init(), and add a "#ifndef CONFIG_SYS_NAND_DELAYED_INIT" around
> > > the current call to nand_init()?
> >
> > nand_init() cant handle being called multiple times. and i need to add
> > more nand_init() points that only apply to when things are delayed. so
> > when delayed init is not enabled (the default), there is no change in
> > compiled code size.
>
> Well, you have this in your new nand_init() code:
>
> + static uint8_t initialized;
> + if (initialized)
> + return;
> + initialized = 1;
>
> Why cannot we call nand_init() multiple times, then?
because of the whole of my statement. i did not want to affect code size if
this option was disabled.
in a preious patch, i had the env code doing:
#ifdef CONFIG_SYS_NAND_DELAYED_INIT
nand_init();
#endif
but i thought it made more sense to rework it so the #ifdef existed in one
place (the header) and not in the source.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20101003/0c40c8df/attachment.pgp
next prev parent reply other threads:[~2010-10-03 22:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 23:45 [U-Boot] [RFC PATCH 1/2] nand: allow delayed initialization Mike Frysinger
2010-09-21 23:45 ` [U-Boot] [PATCH 2/2] Blackfin: nand: support " Mike Frysinger
2010-10-02 19:47 ` [U-Boot] [RFC PATCH 1/2 v2] nand: allow " Mike Frysinger
2010-10-03 18:27 ` Wolfgang Denk
2010-10-03 20:32 ` Mike Frysinger
2010-10-03 21:40 ` Wolfgang Denk
2010-10-03 22:19 ` Mike Frysinger [this message]
2010-10-06 20:40 ` Wolfgang Denk
2010-10-07 17:00 ` Mike Frysinger
2010-10-07 19:35 ` Wolfgang Denk
2010-10-07 21:26 ` Mike Frysinger
2010-10-08 2:00 ` Mike Frysinger
2010-10-10 8:37 ` Mike Frysinger
2010-10-10 9:20 ` Wolfgang Denk
2010-10-04 17:36 ` Scott Wood
2010-10-05 8:08 ` Mike Frysinger
2010-10-05 16:31 ` Scott Wood
2010-10-05 18:27 ` Wolfgang Denk
2010-10-05 19:18 ` 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=201010031819.35739.vapier@gentoo.org \
--to=vapier@gentoo.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